From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756387AbcHVSoa (ORCPT ); Mon, 22 Aug 2016 14:44:30 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:40170 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755625AbcHVShW (ORCPT ); Mon, 22 Aug 2016 14:37:22 -0400 From: Mikko Rapeli To: linux-kernel@vger.kernel.org Cc: Mikko Rapeli , "David S. Miller" , Zhang Shengju Subject: [PATCH v05 27/72] linux/if.h linux/hdlc/ioctl.h: move IFNAMSIZ definition to hdlc/ioctl.h Date: Mon, 22 Aug 2016 20:32:44 +0200 Message-Id: <1471890809-4383-28-git-send-email-mikko.rapeli@iki.fi> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1471890809-4383-1-git-send-email-mikko.rapeli@iki.fi> References: <1471890809-4383-1-git-send-email-mikko.rapeli@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a02:8070:d18f:5c00:bc6b:5a80:6b8d:855c X-SA-Exim-Mail-From: mikko.rapeli@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes userspace compiler error: error: ‘IFNAMSIZ’ undeclared here (not in a function) Suggested by Frans Klaver on lkml message <20150530195223.GA15645@bugger.home>. Signed-off-by: Mikko Rapeli --- 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 /* 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 /* for "__kernel_caddr_t" et al */ #include /* for "struct sockaddr" et al */ #include /* for "__user" et al */ +#include /* for IFNAMSIZ */ -#if __UAPI_DEF_IF_IFNAMSIZ -#define IFNAMSIZ 16 -#endif /* __UAPI_DEF_IF_IFNAMSIZ */ #define IFALIASZ 256 -#include /* For glibc compatibility. An empty enum does not compile. */ #if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \ -- 2.8.1