]> granicus.if.org Git - strace/commitdiff
sock.c: include <linux/ioctl.h> instead of <sys/ioctl.h> or <ioctls.h>
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 13 May 2016 20:22:18 +0000 (20:22 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 13 May 2016 22:09:40 +0000 (22:09 +0000)
Include <linux/ioctl.h> for <linux/sockios.h> on alpha, sh, and sh64
architectures because their <asm/sockios.h> use _IOR and _IOW macros
but don't include anything that would define these macros.

Being a wrapper around <linux/ioctl.h>, <sys/ioctl.h> brings
no benefits in this case.  <ioctls.h> simply doesn't exist.

* sock.c [ALPHA || SH || SH64]: Include <linux/ioctl.h>
instead of <sys/ioctl.h> or <ioctls.h>.

sock.c

diff --git a/sock.c b/sock.c
index 4da53022792f158d9ddcb07c0b4cb72f727387aa..88a0df53ece8b18ac010b277795abe86d7f5ca73 100644 (file)
--- a/sock.c
+++ b/sock.c
 
 #include "defs.h"
 #include <sys/socket.h>
+#if defined ALPHA || defined SH || defined SH64
+# include <linux/ioctl.h>
+#endif
 #include <linux/sockios.h>
 #include <arpa/inet.h>
-#if defined(ALPHA) || defined(SH) || defined(SH64)
-# if defined(HAVE_SYS_IOCTL_H)
-#  include <sys/ioctl.h>
-# elif defined(HAVE_IOCTLS_H)
-#  include <ioctls.h>
-# endif
-#endif
 #include <net/if.h>
 
 #include "xlat/iffflags.h"