diff options
author | Todd C. Miller <Todd.Miller@sudo.ws> | 2018-08-27 13:50:23 -0600 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@sudo.ws> | 2018-08-27 13:50:23 -0600 |
commit | 82a401d190e4ebec3cc48e9128a7bb47c7f757e0 (patch) | |
tree | e99eeb2643ed5e4fa90be4fdca083ab743ba7c9e /m4/sudo.m4 | |
parent | a333d205b8bbcadcd9082b9e50935ef5ba7c5b97 (diff) | |
download | sudo-82a401d190e4ebec3cc48e9128a7bb47c7f757e0.tar.gz |
Add a test for the 4-argument au_close() function found in Solaris
11 instead of assuming it is present if __sun is defined. Fixes a
compilation error on OpenIndiana and older Solaris versions.
Diffstat (limited to 'm4/sudo.m4')
-rw-r--r-- | m4/sudo.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/sudo.m4 b/m4/sudo.m4 index 6eda7d87a..df8966026 100644 --- a/m4/sudo.m4 +++ b/m4/sudo.m4 @@ -266,6 +266,26 @@ int putenv(const char *string) {return 0;}], [])], ]) dnl +dnl check whether au_close() takes 3 or 4 arguments +dnl +AC_DEFUN([SUDO_FUNC_AU_CLOSE_SOLARIS11], +[AC_CACHE_CHECK([whether au_close() takes 4 arguments], +sudo_cv_func_au_close_solaris11, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT +#include <bsm/audit.h> +#include <bsm/libbsm.h> +#include <bsm/audit_uevents.h> + +int au_close(int d, int keep, au_event_t event, au_emod_t emod) {return 0;}], [])], + [sudo_cv_func_au_close_solaris11=yes], + [sudo_cv_func_au_close_solaris11=no]) + ]) + if test $sudo_cv_func_au_close_solaris11 = yes; then + AC_DEFINE(HAVE_AU_CLOSE_SOLARIS11, 1, [Define to 1 if the `au_close' functions takes 4 arguments like Solaris 11.]) + fi +]) + +dnl dnl Check if the data argument for the sha2 functions is void * or u_char * dnl AC_DEFUN([SUDO_FUNC_SHA2_VOID_PTR], |