Commit 27b61361 authored by Daniel Kahn Gillmor's avatar Daniel Kahn Gillmor

handle htobe32 et al. on glibc systems with a non-Linux kernel

This fix copies over an updated #if clause from libknot's

This should resolve:


See also discussion about this same problem in libknot from a couple
years ago:

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.
parent cdbcb1ea
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment