diff options
author | Rob Austein <sra@hactrn.net> | 2016-07-01 20:57:39 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-07-01 20:57:39 -0400 |
commit | 93d6f4ace94c1198e7befdea370df594af211a83 (patch) | |
tree | 555af1e049b5f739cf88914aca3e5282f57b5bc6 /daemon.c | |
parent | 7bae0000584e4b704c75cfdf7e97a80db412e08e (diff) |
glibc "feature test" insanity bites again.
Diffstat (limited to 'daemon.c')
-rw-r--r-- | daemon.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -49,6 +49,16 @@ static char usage[] = "usage: %s [-n socketname] [-d ttydevice] [-s ttyspeed]\n"; +/* + * Work around glibc "feature test" insanity. This isn't the correct + * definition according to the POSIX, but it does what seems to be the + * normal hack on Linux (where this is broken more often than not). + */ + +#ifndef SUN_LEN +#define SUN_LEN(_sun_ptr_) (sizeof(*(_sun_ptr_))) +#endif + /* select() is hopelessly broken, and epoll() is Linux-specific, so we'll use * poll() until such a time as libevent or libev seems more appropriate. * Unfortunately, poll() doesn't come with any macros or functions to manage |