]> granicus.if.org Git - sudo/commitdiff
Only include stdarg.h if we need it.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 22 Aug 2018 18:36:28 +0000 (12:36 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 22 Aug 2018 18:36:28 +0000 (12:36 -0600)
include/sudo_compat.h

index b5fb9bfb4b68400c997af01226eb3527fe035df6..5c3284014bb3dbae5206e0427aea077571cb1089 100644 (file)
 #define SUDO_COMPAT_H
 
 #include <stdio.h>
-#include <stdarg.h>
+#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF) || \
+    !defined(HAVE_VSYSLOG) || defined(PREFER_PORTABLE_SNPRINTF)
+# include <stdarg.h>
+#endif
 #if !defined(HAVE_MEMSET_S) && !defined(rsize_t)
 # include <stddef.h>   /* for rsize_t */
 # ifdef HAVE_STRING_H