From 05eac549e9144c9dbca99d8d89c25e3372468140 Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Sun, 15 Aug 2021 18:28:10 +0900 Subject: [PATCH] Fix build for uClibc uClibc does not install `gnu/lib-names.h`. --- ext/ffi_c/Platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ffi_c/Platform.c b/ext/ffi_c/Platform.c index 28e1c3571..57f32197e 100644 --- a/ext/ffi_c/Platform.c +++ b/ext/ffi_c/Platform.c @@ -38,7 +38,7 @@ #include "rbffi_endian.h" #include "Platform.h" -#if defined(__GNU__) || defined(__GLIBC__) +#if defined(__GNU__) || (defined(__GLIBC__) && !defined(__UCLIBC__)) # include #endif @@ -71,7 +71,7 @@ rbffi_Platform_Init(VALUE moduleFFI) rb_define_const(PlatformModule, "BYTE_ORDER", INT2FIX(BYTE_ORDER)); rb_define_const(PlatformModule, "LITTLE_ENDIAN", INT2FIX(LITTLE_ENDIAN)); rb_define_const(PlatformModule, "BIG_ENDIAN", INT2FIX(BIG_ENDIAN)); -#if defined(__GNU__) || defined(__GLIBC__) +#if defined(__GNU__) || (defined(__GLIBC__) && !defined(__UCLIBC__)) rb_define_const(PlatformModule, "GNU_LIBC", rb_str_new2(LIBC_SO)); #endif export_primitive_types(PlatformModule);