summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mprotect.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-09-02 18:07:15 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-09-04 09:08:04 -0500
commit9d95ef9cef39edcf54eb7d512d8f651a0c36ea72 (patch)
treea3c05a287859b921bee3541faccc859e61846bed /cpukit/posix/src/mprotect.c
parenttms570/Makefile.am: Remove bad networking build info (diff)
downloadrtems-9d95ef9cef39edcf54eb7d512d8f651a0c36ea72.tar.bz2
mprotect.c: Remove warning for no prototype
Diffstat (limited to 'cpukit/posix/src/mprotect.c')
-rw-r--r--cpukit/posix/src/mprotect.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/cpukit/posix/src/mprotect.c b/cpukit/posix/src/mprotect.c
index f2f8af6a70..51b565ea54 100644
--- a/cpukit/posix/src/mprotect.c
+++ b/cpukit/posix/src/mprotect.c
@@ -3,10 +3,19 @@
*
* @brief Change Memory Protection
* @ingroup POSIXAPI
+ *
+ * 12.2.3 Change Memory Protection, P1003.1b-1996, p. 277.
+ *
+ * This is not a functional version of mprotect() but the SPARC backend
+ * for at least gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to
+ * be there and return 0.
+ *
+ * As of gcc 4.2.2, the gcc SPARC backend doesn't appear to have a
+ * way to call this for RTEMS anymore but it doesn't hurt to leave it.
*/
/*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,16 +30,12 @@
#include <unistd.h>
/*
- * 12.2.3 Change Memory Protection, P1003.1b-1996, p. 277.
- *
- * This is not a functional version but the SPARC backend for at least
- * gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and
- * return 0.
- *
- * As of gcc 4.2.2, the gcc SPARC backend doesn't appear to have a
- * way to call this for RTEMS anymore but it doesn't hurt to leave it.
+ * RTEMS does not have <sys/mman.h> so we need a prototype here to
+ * avoid warnings.
*/
+int mprotect( const void *, size_t, int );
+
int mprotect(
const void *addr __attribute__((unused)),
size_t len __attribute__((unused)),