mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 08:20:00 -04:00
include <sys/endian.h> according by checking in meson
The <sys/endian.h> header has existed in macOS since around ~26. This causes the `htobeNN`/`htoleNN` macros to be redefined in <isc/endian.h> in terms of <libkern/OSByteOrder.h> when other system headers include <sys/endian.h>. Fix this issue by using checking for the existence of <sys/endian.h> in meson and including it according to the probe result.
This commit is contained in:
parent
c58d3d0318
commit
2a62cd449f
2 changed files with 3 additions and 3 deletions
|
|
@ -13,8 +13,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__) || defined(__bsdi__)
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
|
|
@ -32,7 +31,7 @@
|
|||
#define le64toh(x) letoh64(x)
|
||||
#endif /* !be16toh */
|
||||
|
||||
#elif defined __APPLE__
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
/*
|
||||
* macOS has its own byte-swapping routines, so use these.
|
||||
|
|
|
|||
|
|
@ -538,6 +538,7 @@ foreach h : [
|
|||
'regex.h',
|
||||
'stdckdint.h',
|
||||
'sys/mman.h',
|
||||
'sys/endian.h',
|
||||
'sys/select.h',
|
||||
'sys/sockio.h',
|
||||
'sys/sysctl.h',
|
||||
|
|
|
|||
Loading…
Reference in a new issue