* io.c (ioctl_narg_len): Linux doesn't have IOCPARM_LEN macro, but

has _IOC_SIZE. support it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-11-12 02:29:37 +00:00
Родитель b3027d5929
Коммит 791f5449c1
2 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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.

2
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