From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9118 invoked by alias); 24 Aug 2018 13:09:13 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 7570 invoked by uid 10080); 24 Aug 2018 13:09:13 -0000 Date: Fri, 24 Aug 2018 13:09:00 -0000 Message-ID: <20180824130913.7554.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] mprotect(): Change prototype to comply to POSIX. X-Act-Checkin: newlib-cygwin X-Git-Author: ed@FreeBSD.org X-Git-Refname: refs/heads/master X-Git-Oldrev: c3df6d5155f0ffc3337991fbc1796952edf2cd82 X-Git-Newrev: 08139e557be6b50cc87c4804293168644b7d6e97 X-SW-Source: 2018-q3/txt/msg00058.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=08139e557be6b50cc87c4804293168644b7d6e97 commit 08139e557be6b50cc87c4804293168644b7d6e97 Author: ed@FreeBSD.org Date: Wed Aug 3 06:33:04 2016 +0000 mprotect(): Change prototype to comply to POSIX. Our mprotect() function seems to take a "const void *" address to the pages whose permissions need to be adjusted. POSIX uses "void *". Simply stick to the POSIX one to prevent us from writing unportable code. PR: 211423 (exp-run) Tested by: antoine@ (Thanks!) Diff: --- newlib/libc/sys/rtems/include/sys/mman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h index 1fce960..0894555 100644 --- a/newlib/libc/sys/rtems/include/sys/mman.h +++ b/newlib/libc/sys/rtems/include/sys/mman.h @@ -258,7 +258,7 @@ int mlock(const void *, size_t); #define _MMAP_DECLARED void * mmap(void *, size_t, int, int, int, off_t); #endif -int mprotect(const void *, size_t, int); +int mprotect(void *, size_t, int); int msync(void *, size_t, int); int munlock(const void *, size_t); int munmap(void *, size_t);