aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--io.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 06dee3962f..857783b06e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Nov 12 11:16:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (ioctl_narg_len): Linux doesn't have IOCPARM_LEN macro, but
+ has _IOC_SIZE. support it.
+
Sat Nov 12 11:13:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* io.c (rb_ioctl): don't expose our sanity check value to ruby script.
diff --git a/io.c b/io.c
index 38638a18db..a351737877 100644
--- a/io.c
+++ b/io.c
@@ -7908,6 +7908,8 @@ ioctl_narg_len(int cmd)
#endif
#ifdef IOCPARM_LEN
len = IOCPARM_LEN(cmd); /* on BSDish systems we're safe */
+#elif defined(_IOC_SIZE)
+ len = _IOC_SIZE(cmd);
#else
len = 256; /* otherwise guess at what's safe */
#endif