diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2018-05-24 18:59:26 +0200 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2018-05-24 18:59:26 +0200 |
commit | 27b6136102239af080f596d2bb0190e098d81791 (patch) | |
tree | c2f67ccf34d777deb5d633ece248ddb416c08e0a /contrib | |
parent | Merge branch 'iter-minim-op' into 'master' (diff) | |
download | knot-resolver-27b6136102239af080f596d2bb0190e098d81791.tar.xz knot-resolver-27b6136102239af080f596d2bb0190e098d81791.zip |
handle htobe32 et al. on glibc systems with a non-Linux kernel
This fix copies over an updated #if clause from libknot's
src/contrib/endian.h.
This should resolve:
https://gitlab.labs.nic.cz/knot/knot-resolver/issues/348
See also discussion about this same problem in libknot from a couple
years ago:
https://bugs.debian.org/840460
I note that contrib/wire.h in knot-resolver is out of sync with
src/contrib/wire.h (and src/contrib/endian.h) from libknot. I don't
know whether there's any upstream preference for keeping these in sync
in some more reliable way than manual comparisons. For now i'm just
providing a narrow fix for the specific problem.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/wire.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/wire.h b/contrib/wire.h index e0360fe3..b02296e0 100644 --- a/contrib/wire.h +++ b/contrib/wire.h @@ -27,7 +27,8 @@ #include <stdint.h> #include <string.h> -#if defined(__linux__) +#if defined(__linux__) || defined(__gnu_hurd__) || \ + (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) # include <endian.h> # ifndef be64toh # include <arpa/inet.h> |