diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -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. @@ -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 |