Thread (4 messages) flat view 4 messages, 2 authors, 2015-10-15
STALE3943d

[PATCH] linux/if.h linux/hdlc/ioctl.h: move IFNAMSIZ definition to hdlc/ioctl.h

From: Mikko Rapeli <hidden>
Date: 2015-10-15 18:12:43
Also in: lkml
Subsystem: the rest · Maintainer: Linus Torvalds

Fixes userspace compiler error:

error: ‘IFNAMSIZ’ undeclared here (not in a function)

Suggested by Frans Klaver [off-list ref] on lkml message
[off-list ref].

Signed-off-by: Mikko Rapeli <redacted>
---
 include/uapi/linux/hdlc/ioctl.h | 1 +
 include/uapi/linux/if.h         | 6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/hdlc/ioctl.h b/include/uapi/linux/hdlc/ioctl.h
index 04bc027..d1b1de5 100644
--- a/include/uapi/linux/hdlc/ioctl.h
+++ b/include/uapi/linux/hdlc/ioctl.h
@@ -1,6 +1,7 @@
 #ifndef __HDLC_IOCTL_H__
 #define __HDLC_IOCTL_H__
 
+#define IFNAMSIZ        16
 
 #define GENERIC_HDLC_VERSION 4	/* For synchronization with sethdlc utility */
 
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
index 9cf2394..0f98f0a 100644
--- a/include/uapi/linux/if.h
+++ b/include/uapi/linux/if.h
@@ -22,10 +22,8 @@
 #include <linux/types.h>		/* for "__kernel_caddr_t" et al	*/
 #include <linux/socket.h>		/* for "struct sockaddr" et al	*/
 #include <linux/compiler.h>		/* for "__user" et al           */
-
-#define	IFNAMSIZ	16
-#define	IFALIASZ	256
-#include <linux/hdlc/ioctl.h>
+#include <linux/hdlc/ioctl.h>           /* for IFNAMSIZ                 */
+#define        IFALIASZ        256
 
 /**
  * enum net_device_flags - &struct net_device flags
-- 
2.6.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help