0005-openbsd-compat-bsd-getpagesize.c-include-includes.h-.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 9a43657a3dcb868b4f36ade3aba5dcf0871fb412 Mon Sep 17 00:00:00 2001
  2. From: Peter Korsgaard <peter@korsgaard.com>
  3. Date: Mon, 30 Oct 2017 23:36:56 +0100
  4. Subject: [PATCH] openbsd-compat/bsd-getpagesize.c: include includes.h for
  5. config.h defines
  6. The configure script checks for getpagesize() and sets HAVE_GETPAGESIZE in
  7. config.h, but bsd-getpagesize.c forgot to include includes.h (which
  8. indirectly includes config.h) so the checks always fails, causing linker
  9. issues when linking statically on systems with getpagesize():
  10. http://autobuild.buildroot.net/results/8cc/8cc30818a400c7a392a3de787cabc9cd8425495f/build-end.log
  11. Fix it by including includes.h
  12. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  13. ---
  14. openbsd-compat/bsd-getpagesize.c | 2 ++
  15. 1 file changed, 2 insertions(+)
  16. diff --git a/openbsd-compat/bsd-getpagesize.c b/openbsd-compat/bsd-getpagesize.c
  17. index 9daddfbd..416a8d4c 100644
  18. --- a/openbsd-compat/bsd-getpagesize.c
  19. +++ b/openbsd-compat/bsd-getpagesize.c
  20. @@ -1,5 +1,7 @@
  21. /* Placed in the public domain */
  22. +#include "includes.h"
  23. +
  24. #ifndef HAVE_GETPAGESIZE
  25. #include <unistd.h>
  26. --
  27. 2.11.0