From f8b4de458671797b940d4dc08566dc0544d688a5 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 2 Jan 2022 09:19:28 +0000 Subject: [PATCH] Use libcwrap.h specifically with glibc, not Linux Other C libraries can be used on Linux (e.g. musl) and glibc supports operating systems other than Linux (e.g. FreeBSD). --- configure.ac | 2 +- src/Unix/aratapif.c | 2 +- src/include/linux/libcwrap.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f077ed20..2676e9ba 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ AH_TOP([ #ifndef __ARANYM_CONFIG_H__ #define __ARANYM_CONFIG_H__ -#if defined(__linux__) && !defined(__ANDROID__) +#ifdef __GLIBC__X #include "linux/libcwrap.h" #endif diff --git a/src/Unix/aratapif.c b/src/Unix/aratapif.c index f5da61a9..30fb4ac3 100644 --- a/src/Unix/aratapif.c +++ b/src/Unix/aratapif.c @@ -32,7 +32,7 @@ * 20010404 - Arnaldo Carvalho de Melo, use setlocale */ -#ifdef __linux__ +#ifdef __GLIBC__X #include "linux/libcwrap.h" #endif #include diff --git a/src/include/linux/libcwrap.h b/src/include/linux/libcwrap.h index f68bafb1..cc7a545e 100644 --- a/src/include/linux/libcwrap.h +++ b/src/include/linux/libcwrap.h @@ -1,5 +1,5 @@ /* glibc bindings for target ABI version glibc 2.11 */ -#if defined(__linux__) && !defined (__LIBC_CUSTOM_BINDINGS_H__) && !defined(__ANDROID__) +#if defined(__GLIBC__X) && !defined (__LIBC_CUSTOM_BINDINGS_H__) #if defined (__cplusplus) extern "C" { -- 2.34.1