Replaced 'glibc' checks with more general 'linux' checks in order to better support alternative C libraries (e.g. musl libc).
This commit is contained in:
parent
153aca4517
commit
801f812714
2
Makefile
2
Makefile
@ -57,7 +57,7 @@ ifneq ($(NALYZE),0)
|
|||||||
CFLAGS += -fanalyzer
|
CFLAGS += -fanalyzer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MACHINE := $(shell $(CC) -dumpmachine)
|
MACHINE := $(shell $(CC) -dumpmachine || echo unknown)
|
||||||
|
|
||||||
ifeq ($(MACHINE),$(filter %mingw32 %-windows-gnu %-cygwin %-cygnus,$(MACHINE)))
|
ifeq ($(MACHINE),$(filter %mingw32 %-windows-gnu %-cygwin %-cygnus,$(MACHINE)))
|
||||||
SUFFIX := .exe
|
SUFFIX := .exe
|
||||||
|
@ -41,23 +41,15 @@ static INLINE size_t MIN_SIZE(const size_t a, const size_t b) { return (a > b) ?
|
|||||||
|
|
||||||
/* detect getentropy() support */
|
/* detect getentropy() support */
|
||||||
#undef GETENTROPY
|
#undef GETENTROPY
|
||||||
#if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25)
|
#if (defined(__linux__) && (__linux__ >= 1)) || (defined(__FreeBSD__) && (__FreeBSD__ >= 12)) || (defined(__OpenBSD__) && (__OpenBSD__ >= 1))
|
||||||
# define GETENTROPY getentropy
|
|
||||||
#elif defined(__FreeBSD__) && (__FreeBSD__ >= 12)
|
|
||||||
# define GETENTROPY getentropy
|
|
||||||
#elif defined(__OpenBSD__) && (__OpenBSD__ >= 1)
|
|
||||||
# define GETENTROPY getentropy
|
# define GETENTROPY getentropy
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* detect explicit_bzero() support */
|
/* detect explicit_bzero() support */
|
||||||
#undef EXPLICIT_BZERO
|
#undef EXPLICIT_BZERO
|
||||||
#if defined(_WIN32) && defined(SecureZeroMemory)
|
#if defined(_WIN32) && (_WIN32 >= 1) && defined(SecureZeroMemory)
|
||||||
# define EXPLICIT_BZERO SecureZeroMemory
|
# define EXPLICIT_BZERO SecureZeroMemory
|
||||||
#elif defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25)
|
#elif (defined(__linux__) && (__linux__ >= 1)) || (defined(__FreeBSD__) && (__FreeBSD__ >= 11)) || (defined(__OpenBSD__) && (__OpenBSD__ >= 1))
|
||||||
# define EXPLICIT_BZERO explicit_bzero
|
|
||||||
#elif defined(__FreeBSD__) && (__FreeBSD__ >= 11)
|
|
||||||
# define EXPLICIT_BZERO explicit_bzero
|
|
||||||
#elif defined(__OpenBSD__) && (__OpenBSD__ >= 1)
|
|
||||||
# define EXPLICIT_BZERO explicit_bzero
|
# define EXPLICIT_BZERO explicit_bzero
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user