diff options
author | Damien Miller <djm@mindrot.org> | 2000-08-18 14:59:59 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-08-18 14:59:59 +1000 |
commit | 3241fa15eab83af79bfda709ffe6d235705d614d (patch) | |
tree | 0892a8bb67145e2945a55e5ac5cedc52ee9f7867 /defines.h | |
parent | a7f58293f7340fc022c025b482614d5bd8dada50 (diff) | |
download | openssh-git-3241fa15eab83af79bfda709ffe6d235705d614d.tar.gz |
- (djm) SUN_LEN macro for systems which lack it
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 */ |