[Nickle] nickle: Branch 'master'

Bart Massey bart at keithp.com
Thu Nov 19 10:29:50 PST 2009


 builtin-sockets.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit ba82f22cf8eafa406618a93ec26bfc08e069627e
Author: Bart Massey <bart at cs.pdx.edu>
Date:   Thu Nov 19 10:28:17 2009 -0800

    Included a definition of SUN_LEN for systems that don't have it.
    
    This fix responded to a bug report from Claude Marinier
    <claude.marinier at drdc-rddc.gc.ca> that Nickle networking
    wouldn't build on Solaris.

diff --git a/builtin-sockets.c b/builtin-sockets.c
index 213f0d4..9bbdbbb 100644
--- a/builtin-sockets.c
+++ b/builtin-sockets.c
@@ -17,6 +17,10 @@
 #include	<sys/types.h>
 #include	<sys/socket.h>
 #include	<sys/un.h>
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) \
+    (sizeof(*(ptr)) - sizeof((ptr)->sun_path) + strlen((ptr)->sun_path) + 1)
+#endif
 #include	<limits.h>
 #include        <netinet/in.h>
 #include	<netdb.h>


More information about the Nickle mailing list