mirror of
http://git.sesse.net/plocate
synced 2025-10-06 02:42:44 +02:00
Check for endian.h before including it. Fixes compilation on FreeBSD.
This commit is contained in:
@@ -12,6 +12,9 @@ atomicdep = cxx.find_library('atomic', required: false)
|
|||||||
if not uringdep.found()
|
if not uringdep.found()
|
||||||
add_project_arguments('-DWITHOUT_URING', language: 'cpp')
|
add_project_arguments('-DWITHOUT_URING', language: 'cpp')
|
||||||
endif
|
endif
|
||||||
|
if cxx.has_header('endian.h')
|
||||||
|
add_project_arguments('-DHAS_ENDIAN_H', language: 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
# Function multiversioning is x86-only _and_ not available on certain targets
|
# Function multiversioning is x86-only _and_ not available on certain targets
|
||||||
# (they need “ifunc”, indirect functions, a GNU extension).
|
# (they need “ifunc”, indirect functions, a GNU extension).
|
||||||
|
@@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#ifdef HAS_ENDIAN_H
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
#endif
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#ifdef HAS_ENDIAN_H
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
|
#endif
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
Reference in New Issue
Block a user