lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1471890809-4383-28-git-send-email-mikko.rapeli@iki.fi>
Date:   Mon, 22 Aug 2016 20:32:44 +0200
From:   Mikko Rapeli <mikko.rapeli@....fi>
To:     linux-kernel@...r.kernel.org
Cc:     Mikko Rapeli <mikko.rapeli@....fi>,
        "David S. Miller" <davem@...emloft.net>,
        Zhang Shengju <zhangshengju@...s.chinamobile.com>
Subject: [PATCH v05 27/72] linux/if.h linux/hdlc/ioctl.h: move IFNAMSIZ definition to hdlc/ioctl.h

Fixes userspace compiler error:

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

Suggested by Frans Klaver <fransklaver@...il.com> on lkml message
<20150530195223.GA15645@...ger.home>.

Signed-off-by: Mikko Rapeli <mikko.rapeli@....fi>
---
 include/uapi/linux/hdlc/ioctl.h | 5 +++++
 include/uapi/linux/if.h         | 5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/hdlc/ioctl.h b/include/uapi/linux/hdlc/ioctl.h
index 04bc027..4b7a7ed 100644
--- a/include/uapi/linux/hdlc/ioctl.h
+++ b/include/uapi/linux/hdlc/ioctl.h
@@ -1,6 +1,11 @@
 #ifndef __HDLC_IOCTL_H__
 #define __HDLC_IOCTL_H__
 
+#include <linux/libc-compat.h>	/* for compatibility with glibc */
+
+#if __UAPI_DEF_IF_IFNAMSIZ
+#define	IFNAMSIZ	16
+#endif /* __UAPI_DEF_IF_IFNAMSIZ */
 
 #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 e601c8c..68bd205 100644
--- a/include/uapi/linux/if.h
+++ b/include/uapi/linux/if.h
@@ -23,12 +23,9 @@
 #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           */
+#include <linux/hdlc/ioctl.h>		/* for IFNAMSIZ                 */
 
-#if __UAPI_DEF_IF_IFNAMSIZ
-#define	IFNAMSIZ	16
-#endif /* __UAPI_DEF_IF_IFNAMSIZ */
 #define	IFALIASZ	256
-#include <linux/hdlc/ioctl.h>
 
 /* For glibc compatibility. An empty enum does not compile. */
 #if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ