From 3241fa15eab83af79bfda709ffe6d235705d614d Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 18 Aug 2000 14:59:59 +1000 Subject: [PATCH] - (djm) SUN_LEN macro for systems which lack it --- ChangeLog | 1 + defines.h | 6 ++++++ includes.h | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2fd41fa6e..ae8ae56e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,6 +47,7 @@ Charles Levert - (djm) Seperate arc4random into seperate file and use OpenSSL's RC4 implementation. + - (djm) SUN_LEN macro for systems which lack it 20000815 - (djm) More SunOS 4.1.x fixes from Nate Itkin diff --git a/defines.h b/defines.h index 0480006d1..cd322f9b8 100644 --- a/defines.h +++ b/defines.h @@ -6,6 +6,7 @@ #include /* For [u]intxx_t */ #include /* For SHUT_XXXX */ #include /* For MAXPATHLEN */ +#include /* For SUN_LEN */ #include /* For typedefs */ #include /* For IPv6 macros */ #include /* 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 */ diff --git a/includes.h b/includes.h index 13042fd21..5102c97ad 100644 --- a/includes.h +++ b/includes.h @@ -27,7 +27,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } #include #include #include -#include #include #include