diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2022-02-07 06:57:44 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2022-02-07 06:57:44 +0100 |
commit | 6ffaa52cf732a84c0f8259dbc9b8183960ec5c33 (patch) | |
tree | d3136c22e3e805cfc0efe78412cce905a17e0c8d /tests/zerosize-ptr.h | |
parent | 591cbf5878b7d4105b275585b9db1324c9dfce56 (diff) | |
parent | af151c593704a40e10efb28d1e3dd59a23a661f3 (diff) |
Merge branch 'release/debian/1.0-1'debian/1.0-1
Diffstat (limited to 'tests/zerosize-ptr.h')
-rw-r--r-- | tests/zerosize-ptr.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h index d5592c5..af4ca71 100644 --- a/tests/zerosize-ptr.h +++ b/tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,8 +36,9 @@ /* Test whether mmap() and mprotect() are available. We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an - mprotect() function in libgcc.a. */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT + mprotect() function in libgcc.a. + And OS/2 kLIBC has <sys/mman.h> and mprotect(), but not mmap(). */ +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __KLIBC__ # include <fcntl.h> # include <unistd.h> # include <sys/types.h> @@ -58,7 +59,7 @@ zerosize_ptr (void) { /* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is not defined on HP-UX 11 (since it does not support MAP_FIXED). */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __KLIBC__ # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; |