1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 2004.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; version 2 of the License, or
8 (at your option) any later version.
9
10 This program 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
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <https://www.gnu.org/licenses/>. */
17
18#include <alloca.h>
19#include <sys/stat.h>
20
21/* This file uses the getaddrinfo code but it compiles it without NSCD
22 support. We just need a few symbol renames. */
23#define __ioctl ioctl
24#define __getsockname getsockname
25#define __socket socket
26#define __recvmsg recvmsg
27#define __bind bind
28#define __sendto sendto
29#define __strchrnul strchrnul
30#define __getline getline
31#define __qsort_r qsort_r
32/* nscd uses 1MB or 2MB thread stacks. */
33#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
34#define __getifaddrs getifaddrs
35#define __freeifaddrs freeifaddrs
36#undef __fstat64
37#define __fstat64 fstat64
38#undef __stat64
39#define __stat64 stat64
40
41/* We are nscd, so we don't want to be talking to ourselves. */
42#undef USE_NSCD
43
44#include <getaddrinfo.c>
45
46/* Support code. */
47#include <check_pf.c>
48#include <check_native.c>
49
50/* Some variables normally defined in libc. */
51nss_action_list __nss_hosts_database attribute_hidden;
52