INN commit: branches/2.5 (contrib/reset-cnfs.c include/portable/mmap.h)
INN Commit
rra at isc.org
Mon Sep 22 19:19:41 UTC 2014
Date: Monday, September 22, 2014 @ 12:19:40
Author: iulius
Revision: 9719
Fix build issues on AIX 7.1
mmap is redefined to mmap64 when large file support is enabled.
Modified:
branches/2.5/contrib/reset-cnfs.c
branches/2.5/include/portable/mmap.h
-------------------------+
contrib/reset-cnfs.c | 3 ++-
include/portable/mmap.h | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
Modified: contrib/reset-cnfs.c
===================================================================
--- contrib/reset-cnfs.c 2014-09-22 19:18:44 UTC (rev 9718)
+++ contrib/reset-cnfs.c 2014-09-22 19:19:40 UTC (rev 9719)
@@ -45,7 +45,8 @@
* fuzz. buf has 512 bytes in it, therefore containing data
* for (512 * 8) * 512 bytes of data. */
numwr = (st.st_size / (512*8) / sizeof(buf)) + 50;
- printf("File %s: %lu %u\n", argv[i], st.st_size, numwr);
+ printf("File %s: %lu %u\n", argv[i],
+ (long unsigned) st.st_size, numwr);
for (j = 0; j < numwr; j++) {
if (!(j % 100)) {
printf("\t%d/%d\n", j, numwr);
Modified: include/portable/mmap.h
===================================================================
--- include/portable/mmap.h 2014-09-22 19:18:44 UTC (rev 9718)
+++ include/portable/mmap.h 2014-09-22 19:19:40 UTC (rev 9719)
@@ -23,8 +23,8 @@
(actually a caddr_t, which is a typedef for a char *) instead of void * as
is required by the standard. These macros add casts that silences compiler
warnings on Solaris 8 without adversely affecting other platforms. (ISO C
- allows macro definitions of this sort; this macro is not recursive.) */
-#define mmap(s, l, p, f, d, o) (void *) mmap((s), (l), (p), (f), (d), (o))
+ allows macro definitions of this sort; this macro is not recursive.)
+ Do not redefine mmap because at least AIX 7.1 redefines it to mmap64. */
#define munmap(p, l) munmap((void *)(p), (l))
/* On some platforms, msync only takes two arguments. (ANSI C allows macro
More information about the inn-committers
mailing list