add build deps to enable use of autoreconf in rules
[debian/sudo] / include / missing.h
index 7ac9588cd903b6fec0c600a807029c49dc4366c9..6f00a5760624b93c9d143f0b9988638e2e8be2eb 100644 (file)
 # 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)
 # define MAX(a,b) (((a)>(b))?(a):(b))
 #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.
  */
@@ -335,6 +337,9 @@ int mkstemps(char *, int);
 #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);
 #endif