noip.c, uopen.c: Provide fallback implementation of `SUN_LEN'.
[preload-hacks] / uopen.c
diff --git a/uopen.c b/uopen.c
index 3c0d1d4..22b09db 100644 (file)
--- a/uopen.c
+++ b/uopen.c
 #include <sys/stat.h>
 #include <sys/un.h>
 
+#ifndef SUN_LEN
+#  define SUN_LEN (sun) \
+       (strlen((sun)->sun_path) + offsetof(struct sockaddr_un, sun_path))
+#endif
+
 /*----- Import the real versions of functions -----------------------------*/
 
 /* The list of functions to immport. */