chiark / gitweb /
noip.c, uopen.c: Provide fallback implementation of `SUN_LEN'.
[preload-hacks] / noip.c
diff --git a/noip.c b/noip.c
index aca7b75e7d4e907b99e748d03a27b38d39a64d1a..b9c040b21025a7ed1035fe3bf610c45a70360316 100644 (file)
--- a/noip.c
+++ b/noip.c
 #include <ifaddrs.h>
 #include <netdb.h>
 
+#ifndef SUN_LEN
+#  define SUN_LEN (sun) \
+       (strlen((sun)->sun_path) + offsetof(struct sockaddr_un, sun_path))
+#endif
+
 /*----- Data structures ---------------------------------------------------*/
 
 /* Unix socket status values. */