From 9c54ec30be4dd4b2a2d2a988d212716cb8666886 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sun, 25 Oct 2009 07:18:18 +0000 Subject: =?UTF-8?q?2009-10-25=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * configure.ac: Check for sys/mman.h. Check for mprotect in sys/mman.h. * psxenosys/init.c: Conditionally add local prototype for mprotect() if sys/mman.h doesn't supply it. --- testsuites/psxtests/psxenosys/init.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'testsuites/psxtests/psxenosys') diff --git a/testsuites/psxtests/psxenosys/init.c b/testsuites/psxtests/psxenosys/init.c index 500e003c3c..e0ac089240 100644 --- a/testsuites/psxtests/psxenosys/init.c +++ b/testsuites/psxtests/psxenosys/init.c @@ -9,17 +9,27 @@ * $Id$ */ +#include +#include +#if HAVE_SYS_MMAN_H +/* POSIX mandates mprotect in sys/mman.h, but newlib doesn't have this */ +#include +#endif + #define CONFIGURE_INIT #include "system.h" #include "tmacros.h" #include -#include #include #include #include #include +#if !HAVE_DECL_MPROTECT +extern int mprotect(const void *addr, size_t len, int prot); +#endif + void check_enosys(int status); void check_enosys(int status) -- cgit v1.2.3