When going to war, is not linked with a friend (4)

I believe the answer is:
ship
'friend' is the definition.
Although both the answer and definition are singular nouns, I don't see how they can define each other.
I can't explain the remainder of the clue.
Can you help me to learn more?
(Other definitions for ship that I've seen before include "Ocean vessel" , "Large boat, dispatch" , "Convey (goods); a vessel" , "craft of 1d [ADVENTURE]" , "See 18" .)
