Use bits/mman-linux.h for hppa.
[glibc.git] / sysdeps / unix / pt-fcntl.c
blob3d64054dd0d56c3915d70e592b57f00156ba18bf
1 /* ABI compatibility for 'fcntl' symbol in libpthread ABI.
2 Copyright (C) 2018 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #include <fcntl.h>
20 #include <stdarg.h>
21 #include <shlib-compat.h>
23 /* libpthread once had its own fcntl, though there was no apparent reason
24 for it. There is no use in having a separate symbol in libpthread, but
25 the historical ABI requires it. For static linking, there is no need to
26 provide anything here--the libc version will be linked in. For shared
27 library ABI compatibility, there must be __fcntl and fcntl symbols in
28 libpthread.so. */
30 #if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_28)
32 static int
33 fcntl_compat (int fd, int cmd, ...)
35 void *arg;
36 va_list ap;
37 va_start (ap, cmd);
38 arg = va_arg (ap, void *);
39 va_end (ap);
40 return __libc_fcntl64 (fd, cmd, arg);
43 weak_alias (fcntl_compat, fcntl_alias)
44 compat_symbol (libpthread, fcntl_alias, fcntl, GLIBC_2_0);
46 weak_alias (fcntl_compat, __fcntl_alias)
47 compat_symbol (libpthread, __fcntl_alias, __fcntl, GLIBC_2_0);
49 #endif