[前][次][番号順一覧][スレッド一覧]

ruby-changes:27766

From: kosaki <ko1@a...>
Date: Tue, 19 Mar 2013 12:17:43 +0900 (JST)
Subject: [ruby-changes:27766] kosaki:r39818 (trunk): * io.c (linux_iocparm_len): enable only exist _IOC_SIZE().

kosaki	2013-03-19 12:17:34 +0900 (Tue, 19 Mar 2013)

  New Revision: 39818

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39818

  Log:
    * io.c (linux_iocparm_len): enable only exist _IOC_SIZE().
      Because musl libc doesn't have it. [Bug #8051] [ruby-core:53229]

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39817)
+++ ChangeLog	(revision 39818)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Mar 16 00:42:39 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* io.c (linux_iocparm_len): enable only exist _IOC_SIZE().
+	  Because musl libc doesn't have it. [Bug #8051] [ruby-core:53229]
+
 Tue Mar 19 10:05:04 2013  Shota Fukumori  <her@s...>
 
 	* ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
Index: io.c
===================================================================
--- io.c	(revision 39817)
+++ io.c	(revision 39818)
@@ -8473,7 +8473,7 @@ do_ioctl(int fd, ioctl_req_t cmd, long n https://github.com/ruby/ruby/blob/trunk/io.c#L8473
 
 #define DEFULT_IOCTL_NARG_LEN (256)
 
-#ifdef __linux__
+#if defined(__linux__) && defined(_IOC_SIZE)
 static long
 linux_iocparm_len(ioctl_req_t cmd)
 {
@@ -8506,7 +8506,7 @@ ioctl_narg_len(ioctl_req_t cmd) https://github.com/ruby/ruby/blob/trunk/io.c#L8506
 #endif
 #ifdef IOCPARM_LEN
     len = IOCPARM_LEN(cmd);	/* on BSDish systems we're safe */
-#elif defined(__linux__)
+#elif defined(__linux__) && defined(_IOC_SIZE)
     len = linux_iocparm_len(cmd);
 #else
     /* otherwise guess at what's safe */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]