Bugzilla – Bug 153601
ioctl(2) man page has wrong prototype
Last modified: 2006-03-28 05:03:44 UTC
The man page for ioctl(2) lists the type of the second and subsequent arguments as "int". This is wrong. The include file /usr/include/sys/ioctl.h gives the type as "unsigned long int". The difference matters on 64-bit machines, where long is the same size as an address, but int is not.
Which is no real problem if you don't ignore the compiler warnings. The type isn't fixed, it is depending on what you wish to change/get from the kernel.
This is a documentation bug. It needs to be fixed by someone who understands what "documentation" means. Thank you.
Then find one and list all variants in the upstream version and we will pull it the next time.
--- ioctl.2 2004-11-04 02:51:07.000000000 +1300 +++ ioctl.2-patch 2006-03-28 17:02:01.000000000 +1200 @@ -42,7 +42,7 @@ .SH SYNOPSIS .B #include <sys/ioctl.h> .sp -.BI "int ioctl(int " d ", int " request ", ...);" +.BI "int ioctl(int " d ", unsigned long int " request ", ...);" .SH DESCRIPTION The .B ioctl