[PATCH] Include unistd.h for getpagesize in AC_FUNC_MMAP

Matt Turner <[email protected]> Wed, 10 May 2023 10:36:24 -0400
Newsgroups gmane.comp.sysutils.autoconf.patches,gmane.comp.sysutils.autoconf.bugs
Message-ID <[email protected]>
* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Include unistd.h for
  getpagesize function.
---
Here's an untested patch that I expect fixes the issue.

 lib/autoconf/functions.m4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index 499e4c02..4c2bda5a 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -1313,6 +1313,7 @@ AC_CACHE_CHECK([for working mmap], [ac_cv_func_mmap_fixed_mapped],
    * how to use it (BSD variants)  */
 
 #include <fcntl.h>
+#include <unistd.h>
 #include <sys/mman.h>
 
 /* This mess was copied from the GNU getpagesize.h.  */
-- 
2.39.3