]> andersk Git - openssh.git/blobdiff - defines.h
- (djm) SUN_LEN macro for systems which lack it
[openssh.git] / defines.h
index 0480006d19cce9d6f7797ca8899b2de5a900b9de..cd322f9b8ba1ee110f516e154829403d6e797b4d 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -6,6 +6,7 @@
 #include <sys/types.h> /* For [u]intxx_t */
 #include <sys/socket.h> /* For SHUT_XXXX */
 #include <sys/param.h> /* For MAXPATHLEN */
+#include <sys/un.h> /* For SUN_LEN */
 #include <netinet/in_systm.h> /* For typedefs */
 #include <netinet/in.h> /* For IPv6 macros */
 #include <netinet/ip.h> /* For IPTOS macros */
@@ -282,6 +283,11 @@ typedef int mode_t;
 # define USE_PAM
 #endif /* defined(HAVE_SECURITY_PAM_APPL_H) && !defined(DISABLE_PAM) */
 
+#ifndef SUN_LEN
+#define SUN_LEN(su) \
+        (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif /* SUN_LEN */
+
 /* Function replacement / compatibility hacks */
 
 /* In older versions of libpam, pam_strerror takes a single argument */
This page took 0.062876 seconds and 4 git commands to generate.