[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/if.h check fails on some darwin versions #327

Closed
jmroot opened this issue Oct 14, 2020 · 1 comment
Closed

net/if.h check fails on some darwin versions #327

jmroot opened this issue Oct 14, 2020 · 1 comment
Assignees

Comments

@jmroot
Copy link
jmroot commented Oct 14, 2020

The autoconf manual mentions a portability issue with checking for net/if.h: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Header-Portability.html

Specifically, sys/socket.h must be included first. On some darwin versions, AC_INCLUDES_DEFAULT happens to take care of this, but on other versions, net/if.h is not found currently, leading to build failure.

This seems to fix the problem, using the recommended check from the autoconf manual:

--- configure.ac.orig	2020-10-08 17:24:21.000000000 +1100
+++ configure.ac	2020-10-15 05:10:19.000000000 +1100
@@ -399,7 +399,21 @@
 PKG_PROG_PKG_CONFIG
 
 # Checks for header files.
-AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h net/if.h],,, [AC_INCLUDES_DEFAULT])
+AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/select.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h ifaddrs.h],,, [AC_INCLUDES_DEFAULT])
+AC_CHECK_HEADERS([net/if.h], [], [],
+          [#include <stdio.h>
+          #ifdef STDC_HEADERS
+          # include <stdlib.h>
+          # include <stddef.h>
+          #else
+          # ifdef HAVE_STDLIB_H
+          #  include <stdlib.h>
+          # endif
+          #endif
+          #ifdef HAVE_SYS_SOCKET_H
+          # include <sys/socket.h>
+          #endif
+          ])
 
 # Check for Apple header. This uncovers TARGET_OS_IPHONE, TARGET_OS_TV or TARGET_OS_WATCH
 AC_CHECK_HEADERS([TargetConditionals.h])
@gthess gthess self-assigned this Oct 21, 2020
@gthess gthess closed this as completed in 7c39cbc Oct 21, 2020
@gthess
Copy link
Member
gthess commented Oct 21, 2020

Thanks!

jedisct1 added a commit to jedisct1/unbound that referenced this issue Nov 1, 2020
* nlnet/master: (81 commits)
  - In man page note that tls-cert-bundle is read before permission   drop and chroot.
  - Fix that minimal-responses does not remove addresses from a priming   query response.
  - Fix NLnetLabs#333: Unbound Segmentation Fault w/ log_info Functions From   Python Mod.
  - Fix NLnetLabs#320: potential memory corruption due to size miscomputation upton   custom region alloc init.
  - Fix NLnetLabs#327: net/if.h check fails on some darwin versions; contribution by   Joshua Root.
  Add verbosity to debug occasional missing q1-10.example.net, from timer.
  Changelog note for NLnetLabs#228 - Merge PR NLnetLabs#228 : infra-keep-probing option to probe hosts that are   down.  Add infra-keep-probing: yes option. Hosts that are down are   probed more frequently.   With the option turned on, it probes about every 120 seconds,   eventually after exponential backoff, and that keeps that way. If   traffic keeps up for the domain. It probes with one at a time, eg.   one query is allowed to probe, other queries within that 120 second   interval are turned away.
  - Changelog entry for PR NLnetLabs#324: Add modern X.509v3 extensions to   unbound-control TLS certificates, by James Renken.
  - Fix for attaching the X509v3 extensions to the client certificate.
  - Clean the fix for out of order TCP processing limits on number   of queries.  It was tested to work.
  Fixup for clear of tcp handler structure.
  - Fix to set the tcp handler event toggle flag back to default when   the handler structure is reused.
  Changelog entry for local-zone out of chunk regional allocation
  - Log ip address when http session recv fails, eg. due to tls fail.
  Unit test for doh downstream notls.
  - Fix dnstap test to wait for log timer to see if queries are logged.
  - Fix python documentation warning on functions.rst inplace_cb_reply.
  - Fix NLnetLabs#330: [Feature request] Add unencrypted DNS over HTTPS support.   This adds the option http-notls-downstream: yesno to change that,   and the dohclient test code has the -n option.
  - Fix memory leak of https port string when reading config.
  - Fix that http settings have colon in set_option, for   http-endpoint, http-max-streams, http-query-buffer-size,   http-response-buffer-size, and http-nodelay.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants