diff --git a/include/sudo_compat.h b/include/sudo_compat.h index 1355f950a..b5fb9bfb4 100644 --- a/include/sudo_compat.h +++ b/include/sudo_compat.h @@ -24,9 +24,12 @@ #include #include -#ifndef HAVE_MEMSET_S +#if !defined(HAVE_MEMSET_S) && !defined(rsize_t) # include /* for rsize_t */ -#endif /* HAVE_MEMSET_S */ +# ifdef HAVE_STRING_H +# include /* 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.