mirror of
http://git.sesse.net/plocate
synced 2025-10-05 23:42:49 +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()
|
||||
add_project_arguments('-DWITHOUT_URING', language: 'cpp')
|
||||
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
|
||||
# (they need “ifunc”, indirect functions, a GNU extension).
|
||||
|
@@ -15,7 +15,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#ifdef HAS_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#ifdef HAS_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
Reference in New Issue
Block a user