summaryrefslogtreecommitdiff
path: root/sysdep/unix/unix.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-16 23:12:47 +0000
committerMartin Mares <mj@ucw.cz>2000-06-16 23:12:47 +0000
commit4daf03e5138dea8e5c409ab20a07f35667caa89e (patch)
tree1edcb327630e449cf1542ff1089aa1c74a7b6c66 /sysdep/unix/unix.h
parent365211d5886ec59a543e9fbc2151d6218561c18c (diff)
Use our own SUN_LEN if libc doesn't provide it.
Diffstat (limited to 'sysdep/unix/unix.h')
-rw-r--r--sysdep/unix/unix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h
index 5da925c4..bb4d063d 100644
--- a/sysdep/unix/unix.h
+++ b/sysdep/unix/unix.h
@@ -34,6 +34,10 @@ typedef struct sockaddr_in6 sockaddr;
typedef struct sockaddr_in sockaddr;
#endif
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path))
+#endif
+
struct birdsock;
void io_init(void);