projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ioctl: Fix for MacOS X in 64-bit mode.
[gnulib.git]
/
lib
/
ioctl.c
diff --git
a/lib/ioctl.c
b/lib/ioctl.c
index
72f9f37
..
7c09d95
100644
(file)
--- a/
lib/ioctl.c
+++ b/
lib/ioctl.c
@@
-37,7
+37,9
@@
rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
buf = va_arg (args, void *);
va_end (args);
buf = va_arg (args, void *);
va_end (args);
- return ioctl (fd, request, buf);
+ /* Cast 'request' so that when the system's ioctl function takes a 64-bit
+ request argument, the value gets zero-extended, not sign-extended. */
+ return ioctl (fd, (unsigned int) request, buf);
}
#else /* mingw */
}
#else /* mingw */