]> granicus.if.org Git - sudo/commitdiff
We still need to include string.h for AIX (and possibly others)
authorTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 22 Aug 2018 14:22:56 +0000 (08:22 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 22 Aug 2018 14:22:56 +0000 (08:22 -0600)
when we are not using the system memset_r() function and rsize_t
is defined by the system headers.

include/sudo_compat.h

index 1355f950a2e7fe094f6ab396be0ff4a63dac619b..b5fb9bfb4b68400c997af01226eb3527fe035df6 100644 (file)
 
 #include <stdio.h>
 #include <stdarg.h>
-#ifndef HAVE_MEMSET_S
+#if !defined(HAVE_MEMSET_S) && !defined(rsize_t)
 # include <stddef.h>   /* for rsize_t */
-#endif /* HAVE_MEMSET_S */
+# ifdef HAVE_STRING_H
+#  include <string.h>  /* for rsize_t on AIX */
+# endif /* HAVE_STRING_H */
+#endif /* HAVE_MEMSET_S && rsize_t */
 
 /*
  * Macros and functions that may be missing on some operating systems.