[Cryptech-Commits] [sw/libhal] branch macosx updated: glibc "feature test" insanity bites again.

git at cryptech.is git at cryptech.is
Sat Jul 2 01:00:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch macosx
in repository sw/libhal.

The following commit(s) were added to refs/heads/macosx by this push:
       new  93d6f4a   glibc "feature test" insanity bites again.
93d6f4a is described below

commit 93d6f4ace94c1198e7befdea370df594af211a83
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Fri Jul 1 20:57:39 2016 -0400

    glibc "feature test" insanity bites again.
---
 daemon.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/daemon.c b/daemon.c
index 81851ed..f22ad45 100644
--- a/daemon.c
+++ b/daemon.c
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list