When one of these women gave birth to a child without knowing which sailor had fathered it, the paternity was logged as  gun,  perhaps alluding to the midship gun, which was often located near the makeshift maternity room.
The woman gave birth with no known father, so it was recorded as gun.