Fix HAVE_NETINET_IN6_H and HAVE_SYS_SENDFILE_H

This commit is contained in:
Francois Kritzinger 2022-09-13 10:30:11 +02:00
parent 3a41d19323
commit d607c6c5af
2 changed files with 10 additions and 19 deletions

View File

@ -1,17 +1,10 @@
// HAVE_NETINET_IN6_H : BUILD2_AUTOCONF_LIBC_VERSION // HAVE_NETINET_IN6_H
#ifndef BUILD2_AUTOCONF_LIBC_VERSION
# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included
#endif
/* Looks like netinet/in6.h only exists on System V-derived OSes like AIX,
* HP-UX, Solaris, and Illumos.
*
* On Linux the IPv6 constructs are defined in netinet/in.h and on FreeBSD,
* OpenBSD, NetBSD, and MacOS netinet/in.h includes netinet6/in6.h (note: not
* netinet/) so the latter should not be included directly.
*/
#undef HAVE_NETINET_IN6_H #undef HAVE_NETINET_IN6_H
/* On Linux the IPv6 constructs are defined in netinet/in.h and on FreeBSD
* netinet/in.h includes netinet6/in6.h (note: not netinet/) so the latter
* should not be included directly.
*/
#if defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS)
# define HAVE_NETINET_IN6_H 1
#endif

View File

@ -6,10 +6,8 @@
#undef HAVE_SYS_SENDFILE_H #undef HAVE_SYS_SENDFILE_H
/* Since FreeBSD 3.0, Mac OS 10.5, glibc 2.1 /* Since glibc 2.1.
*/ */
#if BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 0) || \ #if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1)
BUILD2_AUTOCONF_MACOS_PREREQ(10, 5) || \
BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1)
# define HAVE_SYS_SENDFILE_H 1 # define HAVE_SYS_SENDFILE_H 1
#endif #endif