--- src/sudo_intercept.c.orig	2023-06-27 19:25:51
+++ src/sudo_intercept.c	2023-06-27 19:26:13
@@ -46,6 +46,10 @@
 #elif defined(HAVE_DLOPEN)
 # include <dlfcn.h>
 #endif
+#if defined(__APPLE__)
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
 
 #include "sudo_compat.h"
 #include "sudo_debug.h"
--- src/sudo_intercept_common.c.orig	2023-11-06 11:15:42
+++ src/sudo_intercept_common.c	2023-11-06 18:16:25
@@ -60,6 +60,11 @@
 #include <sudo_util.h>
 #include <intercept.pb-c.h>
 
+#if defined(__APPLE__)
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+
 #ifdef HAVE__NSGETENVIRON
 # define environ (*_NSGetEnviron())
 #else
