On Sat, May 12, 2012 at 11:23 AM, naruse (Yui NARUSE) <naruse / airemix.jp> w=
rote:
>
> Issue #6427 has been updated by naruse (Yui NARUSE).
>
>
> shyouhei (Shyouhei Urabe) wrote:
>> Both ruby and glibc header file (and Ubuntu's manpage of ioctl(2)) agree=
 that
>> ioctl takes int, and 2148012656 is greater than INT_MAX. =A0Hence the ex=
ception.
>>
>> You have to use -2146954640 instead.
>
> The manpage of ioctl(2) says that the type of its 2nd argument is int, bu=
t it is a lie.
> The prototype of ioctl(2) in /usr/include/sys/ioctl.h says it is unsigned=
 int.
> extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
>
> Bug #5429 is the issue and it says:
> * Free Unix uses unsigned int
> * Commercial Unix uses int
>
> This issue is fixed in trunk but not backported to 1.9.3 yet.

btw, Linux community plan to fix man pages too.

https://bugzilla.kernel.org/show_bug.cgi?id=3D42705