summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxenosys
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-10-25 07:18:18 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-10-25 07:18:18 +0000
commit9c54ec30be4dd4b2a2d2a988d212716cb8666886 (patch)
treedb8fdbbf634494dfe521553d3dea2a398f6d9d93 /testsuites/psxtests/psxenosys
parent2009-10-25 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-9c54ec30be4dd4b2a2d2a988d212716cb8666886.tar.bz2
2009-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* 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.
Diffstat (limited to 'testsuites/psxtests/psxenosys')
-rw-r--r--testsuites/psxtests/psxenosys/init.c12
1 files changed, 11 insertions, 1 deletions
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 <sys/types.h>
+#include <sys/wait.h>
+#if HAVE_SYS_MMAN_H
+/* POSIX mandates mprotect in sys/mman.h, but newlib doesn't have this */
+#include <sys/mman.h>
+#endif
+
#define CONFIGURE_INIT
#include "system.h"
#include "tmacros.h"
#include <aio.h>
-#include <sys/types.h>
#include <time.h>
#include <devctl.h>
#include <unistd.h>
#include <sched.h>
+#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)