Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583AbdHFRGc (ORCPT ); Sun, 6 Aug 2017 13:06:32 -0400 Received: from mail.kapsi.fi ([91.232.154.25]:49499 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdHFRG3 (ORCPT ); Sun, 6 Aug 2017 13:06:29 -0400 From: Mikko Rapeli To: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Cc: Mikko Rapeli , netdev@vger.kernel.org, "Dmitry V . Levin" Subject: [PATCH v06 15/36] uapi linux/socket.h: include sys/socket.h in user space Date: Sun, 6 Aug 2017 18:44:06 +0200 Message-Id: <20170806164428.2273-16-mikko.rapeli@iki.fi> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170806164428.2273-1-mikko.rapeli@iki.fi> References: <20170806164428.2273-1-mikko.rapeli@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2003:6c:cd28:d400:219:d2ff:fe03:c7a9 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 Content-Length: 1126 Lines: 43 This libc header has sockaddr definition in user space. Fixes user space compilation errors like these from kernel headers including only linux/socket.h: error: field ‘ifru_addr’ has incomplete type struct sockaddr ifru_addr; error: field ‘_sockaddr’ has incomplete type struct sockaddr _sockaddr; error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr’ With this following uapi headers now compile in user space: rdma/rdma_user_rxe.h linux/vm_sockets.h linux/ncp_fs.h linux/nfc.h linux/phonet.h Signed-off-by: Mikko Rapeli Cc: netdev@vger.kernel.org Cc: Dmitry V. Levin --- include/uapi/linux/socket.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h index 76ab0c68561e..8a81197cc08b 100644 --- a/include/uapi/linux/socket.h +++ b/include/uapi/linux/socket.h @@ -1,6 +1,10 @@ #ifndef _UAPI_LINUX_SOCKET_H #define _UAPI_LINUX_SOCKET_H +#ifndef __KERNEL__ +#include +#endif + /* * Desired design of maximum size and alignment (see RFC2553) */ -- 2.13.3