Summary: MSG_NOSIGNAL is not portable
Submitted by: jtn
Submitted on: Thursday 26/11/09 at 00:00
Severity: 3 - Normal
Priority: 5 - Normal
Assigned to: None
Discussion Lock: Any
Operating System: None
Planned Release: None
dmarks mentioned running into "`MSG_NOSIGNAL' undeclared" errors on trunk/S_2
Looks like MSG_NOSIGNAL is a Linux thing, and isn't portable to (e.g.) Mac OS
X and various BSDs (see e.g. here
I think this came in in the fix for bug #14607 on trunk/S2_2. In this case,
there doesn't seem to be any need to suppress SIGPIPE in fc_writesocket(), as
fc_init_network() already sets up to ignore SIGPIPE. So, I think it's OK to
just revert to write().
Attached a trivial patch against S2_2 which does that. However, I don't know
how exactly to reproduce the problem of bug #14607, so I can't say I've
thoroughly tested it.
If I'm wrong about my fix, the links above suggest how to do this on
different systems, so we'll probably need some horrid autoconf stuff.
Date: Thursday 26/11/09 at 00:00 Name: msg_nosignal.diff Size: 339B By:
Avoid non-portable MSG_NOSIGNAL [S2_2]
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list