source: rtems/cpukit/posix/src/mprotect.c @ 9d95ef9

4.115
Last change on this file since 9d95ef9 was 9d95ef9, checked in by Joel Sherrill <joel.sherrill@…>, on 09/02/14 at 23:07:15

mprotect.c: Remove warning for no prototype

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[a0e6c73]1/**
2 * @file
3 *
4 * @brief Change Memory Protection
[5cb175bb]5 * @ingroup POSIXAPI
[9d95ef9]6 *
7 * 12.2.3 Change Memory Protection, P1003.1b-1996, p. 277.
8 *
9 * This is not a functional version of mprotect() but the SPARC backend
10 * for at least gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to
11 * be there and return 0.
12 *
13 * As of gcc 4.2.2, the gcc SPARC backend doesn't appear to have a
14 * way to call this for RTEMS anymore but it doesn't hurt to leave it.
[a0e6c73]15 */
16
[bc51d7e9]17/*
[9d95ef9]18 *  COPYRIGHT (c) 1989-2014.
[66386040]19 *  On-Line Applications Research Corporation (OAR).
20 *
21 *  The license and distribution terms for this file may be
22 *  found in the file LICENSE in this distribution or at
[c499856]23 *  http://www.rtems.org/license/LICENSE.
[bc51d7e9]24 */
25
26#if HAVE_CONFIG_H
27#include "config.h"
28#endif
29
30#include <unistd.h>
31
[64adc13]32/*
[9d95ef9]33 * RTEMS does not have <sys/mman.h> so we need a prototype here to
34 * avoid warnings.
[bc51d7e9]35 */
36
[9d95ef9]37int mprotect( const void *, size_t, int );
38
[92f4671]39int mprotect(
40  const void *addr __attribute__((unused)),
41  size_t len __attribute__((unused)),
42  int prot __attribute__((unused)) )
[bc51d7e9]43{
44  return 0;
45}
Note: See TracBrowser for help on using the repository browser.