--- posix/gawkmisc.c	2025-03-09 19:13:49
+++ posix/gawkmisc.c	2025-06-08 06:33:39
@@ -33,6 +33,10 @@
 
 #ifdef HAVE_SPAWN_H
 #include <spawn.h>	// for macos
+#endif
+
+#ifdef __APPLE__
+#include <mach-o/dyld.h>
 #endif
 
 const char quote = '\'';
