2 * Copyright (C) 2015 Michael Jeanson <mjeanson@efficios.com>
4 * SPDX-License-Identifier: MIT
8 #ifndef _COMPAT_NETDB_H
9 #define _COMPAT_NETDB_H
13 #ifdef HAVE_GETHOSTBYNAME2
15 struct hostent *lttng_gethostbyname2(const char *name, int af) {
16 return gethostbyname2(name, af);
18 #elif HAVE_GETIPNODEBYNAME
20 struct hostent *lttng_gethostbyname2(const char *name, int af) {
23 return getipnodebyname(name, af, AI_DEFAULT, &unused);
26 # error "Missing compat for gethostbyname2()"
29 #endif /* _COMPAT_NETDB_H */