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.
This commit is contained in:
Ralf Corsepius
2009-10-25 07:18:18 +00:00
parent 74c881d268
commit 9c54ec30be

View File

@@ -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)