>From 75c25892e136b43862fc7028c12d50f592a3cf41 Mon Sep 17 00:00:00 2001 From: Yavor Doganov Date: Tue, 24 Nov 2009 12:18:20 +0200 Subject: [PATCH] Fix AC_FUNC_MMAP regression from 2009-11-09. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Add a cast to char * to make the test work for C++ compilers. * THANKS: Update. Reported by Michal Čihař. --- ChangeLog | 8 ++++++++ THANKS | 1 + lib/autoconf/functions.m4 | 3 ++- 3 files changed, 11 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index aeacaa4..5b05ed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-24 Yavor Doganov (tiny change) + + Fix AC_FUNC_MMAP regression from 2009-11-09. + * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Add a cast to char * + to make the test work for C++ compilers. + * THANKS: Update. + Reported by Michal Čihař. + 2009-11-22 Bruno Haible Fix failure of test 35 when the user has a .autom4te.cfg file. diff --git a/THANKS b/THANKS index b288163..d93ed4c 100644 --- a/THANKS +++ b/THANKS @@ -255,6 +255,7 @@ Michael Jenning ? Michael Matz address@hidden Michael Schoene address@hidden Michael Wardle ? +Michal Čihař address@hidden Mike Frysinger address@hidden Mike Hopkirk address@hidden Mike Stump address@hidden diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 6b6e7fc..9a79479 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1285,7 +1285,8 @@ main () data2 = ""; if (write (fd2, data2, 1) != 1) return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, + fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) -- 1.6.5