--- embedaddon/sudo/include/missing.h 2012/02/21 16:23:02 1.1.1.1 +++ embedaddon/sudo/include/missing.h 2012/05/29 12:26:49 1.1.1.2 @@ -34,15 +34,6 @@ # define __attribute__(x) #endif -/* For silencing gcc warnings about rcsids */ -#ifndef __unused -# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7) -# define __unused __attribute__((__unused__)) -# else -# define __unused -# endif -#endif - /* For catching format string mismatches */ #ifndef __printflike # if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7) @@ -132,6 +123,17 @@ #endif /* + * Older systems may be missing stddef.h and/or offsetof macro + */ +#ifndef offsetof +# ifdef __offsetof +# define offsetof(type, field) __offsetof(type, field) +# else +# define offsetof(type, field) ((size_t)(&((type *)0)->field)) +# endif +#endif + +/* * Simple isblank() macro and function for systems without it. */ #ifndef HAVE_ISBLANK @@ -334,6 +336,9 @@ int mkstemps(char *, int); #endif #ifndef HAVE_NANOSLEEP int nanosleep(const struct timespec *, struct timespec *); +#endif +#ifndef HAVE_PW_DUP +struct passwd *pw_dup(const struct passwd *); #endif #ifndef HAVE_SETENV int setenv(const char *, const char *, int);