From 4e44bd46febd61d0cdc547bd9f90ab7f268660eb Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 6 Apr 2020 07:05:20 -0600 Subject: [PATCH] Disable -Wstrict-prototypes for sudo_hook_fn_t typedef. --- include/sudo_plugin.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sudo_plugin.h b/include/sudo_plugin.h index 955b0cc96..2ab5cbcac 100644 --- a/include/sudo_plugin.h +++ b/include/sudo_plugin.h @@ -90,6 +90,10 @@ typedef int (*sudo_printf_t)(int msg_type, const char *fmt, ...); * Hooks allow a plugin to hook into specific sudo and/or libc functions. */ +#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4) +# pragma GCC diagnostic ignored "-Wstrict-prototypes" +#endif + /* Hook functions typedefs. */ typedef int (*sudo_hook_fn_t)(); typedef int (*sudo_hook_fn_setenv_t)(const char *name, const char *value, int overwrite, void *closure);