summaryrefslogtreecommitdiff
path: root/package/busybox/busybox-1.10.1-ioctl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/busybox/busybox-1.10.1-ioctl.patch')
-rw-r--r--package/busybox/busybox-1.10.1-ioctl.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.10.1-ioctl.patch b/package/busybox/busybox-1.10.1-ioctl.patch
new file mode 100644
index 000000000..10d00e915
--- /dev/null
+++ b/package/busybox/busybox-1.10.1-ioctl.patch
@@ -0,0 +1,79 @@
+--- busybox-1.10.1/include/libbb.h Sat Apr 19 05:50:36 2008
++++ busybox-1.10.1-ioctl/include/libbb.h Thu Apr 24 06:45:03 2008
+@@ -995,16 +995,16 @@
+ /* NB: typically you want to pass fd 0, not 1. Think 'applet | grep something' */
+ int get_terminal_width_height(int fd, int *width, int *height);
+
+-int ioctl_or_perror(int fd, int request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5)));
+-void ioctl_or_perror_and_die(int fd, int request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5)));
++int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5)));
++void ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5)));
+ #if ENABLE_IOCTL_HEX2STR_ERROR
+-int bb_ioctl_or_warn(int fd, int request, void *argp, const char *ioctl_name);
+-void bb_xioctl(int fd, int request, void *argp, const char *ioctl_name);
++int bb_ioctl_or_warn(int fd, unsigned request, void *argp, const char *ioctl_name);
++void bb_xioctl(int fd, unsigned request, void *argp, const char *ioctl_name);
+ #define ioctl_or_warn(fd,request,argp) bb_ioctl_or_warn(fd,request,argp,#request)
+ #define xioctl(fd,request,argp) bb_xioctl(fd,request,argp,#request)
+ #else
+-int bb_ioctl_or_warn(int fd, int request, void *argp);
+-void bb_xioctl(int fd, int request, void *argp);
++int bb_ioctl_or_warn(int fd, unsigned request, void *argp);
++void bb_xioctl(int fd, unsigned request, void *argp);
+ #define ioctl_or_warn(fd,request,argp) bb_ioctl_or_warn(fd,request,argp)
+ #define xioctl(fd,request,argp) bb_xioctl(fd,request,argp)
+ #endif
+--- busybox-1.10.1/libbb/xfuncs.c Sat Apr 19 05:50:33 2008
++++ busybox-1.10.1-ioctl/libbb/xfuncs.c Thu Apr 24 06:45:14 2008
+@@ -704,7 +704,7 @@
+ return ret;
+ }
+
+-void ioctl_or_perror_and_die(int fd, int request, void *argp, const char *fmt,...)
++void ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...)
+ {
+ va_list p;
+
+@@ -717,7 +717,7 @@
+ }
+ }
+
+-int ioctl_or_perror(int fd, int request, void *argp, const char *fmt,...)
++int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...)
+ {
+ va_list p;
+ int ret = ioctl(fd, request, argp);
+@@ -731,7 +731,7 @@
+ }
+
+ #if ENABLE_IOCTL_HEX2STR_ERROR
+-int bb_ioctl_or_warn(int fd, int request, void *argp, const char *ioctl_name)
++int bb_ioctl_or_warn(int fd, unsigned request, void *argp, const char *ioctl_name)
+ {
+ int ret;
+
+@@ -740,13 +740,13 @@
+ bb_simple_perror_msg(ioctl_name);
+ return ret;
+ }
+-void bb_xioctl(int fd, int request, void *argp, const char *ioctl_name)
++void bb_xioctl(int fd, unsigned request, void *argp, const char *ioctl_name)
+ {
+ if (ioctl(fd, request, argp) < 0)
+ bb_simple_perror_msg_and_die(ioctl_name);
+ }
+ #else
+-int bb_ioctl_or_warn(int fd, int request, void *argp)
++int bb_ioctl_or_warn(int fd, unsigned request, void *argp)
+ {
+ int ret;
+
+@@ -755,7 +755,7 @@
+ bb_perror_msg("ioctl %#x failed", request);
+ return ret;
+ }
+-void bb_xioctl(int fd, int request, void *argp)
++void bb_xioctl(int fd, unsigned request, void *argp)
+ {
+ if (ioctl(fd, request, argp) < 0)
+ bb_perror_msg_and_die("ioctl %#x failed", request);