Skip to content

Commit cd0db90

Browse files
authored
Merge pull request #913 from xtkoba/uclibc
Fix build for uClibc
2 parents 7c70b82 + 05eac54 commit cd0db90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/ffi_c/Platform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "rbffi_endian.h"
3939
#include "Platform.h"
4040

41-
#if defined(__GNU__) || defined(__GLIBC__)
41+
#if defined(__GNU__) || (defined(__GLIBC__) && !defined(__UCLIBC__))
4242
# include <gnu/lib-names.h>
4343
#endif
4444

@@ -71,7 +71,7 @@ rbffi_Platform_Init(VALUE moduleFFI)
7171
rb_define_const(PlatformModule, "BYTE_ORDER", INT2FIX(BYTE_ORDER));
7272
rb_define_const(PlatformModule, "LITTLE_ENDIAN", INT2FIX(LITTLE_ENDIAN));
7373
rb_define_const(PlatformModule, "BIG_ENDIAN", INT2FIX(BIG_ENDIAN));
74-
#if defined(__GNU__) || defined(__GLIBC__)
74+
#if defined(__GNU__) || (defined(__GLIBC__) && !defined(__UCLIBC__))
7575
rb_define_const(PlatformModule, "GNU_LIBC", rb_str_new2(LIBC_SO));
7676
#endif
7777
export_primitive_types(PlatformModule);

0 commit comments

Comments
 (0)