summaryrefslogtreecommitdiff
path: root/package/ruby/patches/patch-io_c
blob: dea7f46fdbfd81c5a8fbe2f778027792a962e66e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ruby-2.0.0-p247.orig/io.c	2013-06-12 16:23:39.000000000 +0200
+++ ruby-2.0.0-p247/io.c	2013-10-26 23:02:53.000000000 +0200
@@ -8483,7 +8483,7 @@ do_ioctl(int fd, ioctl_req_t cmd, long n
 
 #define DEFULT_IOCTL_NARG_LEN (256)
 
-#ifdef __linux__
+#if defined(__GLIBC__) && defined(__linux__)
 static long
 linux_iocparm_len(ioctl_req_t cmd)
 {
@@ -8516,7 +8516,7 @@ ioctl_narg_len(ioctl_req_t cmd)
 #endif
 #ifdef IOCPARM_LEN
     len = IOCPARM_LEN(cmd);	/* on BSDish systems we're safe */
-#elif defined(__linux__)
+#elif defined(__GLIBC__) && defined(__linux__)
     len = linux_iocparm_len(cmd);
 #else
     /* otherwise guess at what's safe */