Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp266018imm; Thu, 7 Jun 2018 18:15:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIwkK2MtCmf0ogqJK4CtFF0xNTqb1bVWv+ipVp7SXokWjYsNhqhHGn0wjcuTED8PZlFJASY X-Received: by 2002:a63:9a52:: with SMTP id e18-v6mr3392641pgo.188.1528420528062; Thu, 07 Jun 2018 18:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528420528; cv=none; d=google.com; s=arc-20160816; b=SGG3ZkA/i/IA+LgBtYOErC/CIsfGJkDmk3LmQZ479LWCRek8drHxWiQa1nhQlN/gqt UW1yUQVLuKC5C0G38M7MqKDGweQgrAJrizGPl00U2Gx16sbrxssQJDrClftV/4Fdotww 47sy9y81xOFaOWEi/c8Gp2J+q07gDi4Tsujj3tUTwIA4xFuKA3fQa5odVAVtSysa5Wcm tbd6cyy2ljCnSTombyyfatiFdD5fEX8PQL/xPMG5U/qLM6PL0TxJ7n7nUjabxY148UlG zUG3rMG1L++Xhjnhv55d/uFnOnNPtEaHykwPha8o5+xL7uaSotNQoJxTGaFjUuPdaPZl CNXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=NvpdvWWl9NKgZXlIdVT4KAUy/PGBGXuULRfhkwMXiWQ=; b=k81U0IhmdxqME//pd7XnpPdc5+ec6lfd+/sPDEF+gow6x/EDSaD8CevTrdo6+vFj6u dUzpcQF8L22kWvC93raUBTYR4fPSPJ+zDxw81dPcoM3eIUyBkySVZVvkzCpdNqOGzCtn AhCj68Mg/TZdPnRXocb6C1kEsZbqj+7ih5PWo+AXedtkR47U7xuspnlAmenvuxbHScYc zZrnjJZokwVvYSvxchc5uY3HEleFYl3vQgI9KaDrnj9LURR5DVUUxn8DIeBqE1+EGuzr hW7waPsXLbt+x+YGfxXydd920PpPrr+aacM8OiKtMq5D/tMyusJCBgItogHK2vD1oSt6 Lthw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b2wjFIWl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si53986833plk.137.2018.06.07.18.15.13; Thu, 07 Jun 2018 18:15:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b2wjFIWl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbeFHBOu (ORCPT + 99 others); Thu, 7 Jun 2018 21:14:50 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:44413 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363AbeFHBOs (ORCPT ); Thu, 7 Jun 2018 21:14:48 -0400 Received: by mail-pl0-f68.google.com with SMTP id z9-v6so7220420plk.11 for ; Thu, 07 Jun 2018 18:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NvpdvWWl9NKgZXlIdVT4KAUy/PGBGXuULRfhkwMXiWQ=; b=b2wjFIWl4qS/Zq6893u9c7KL4//IPUyIaYcauBIsYweMBOy2DNutXDEKUSt4kvY8SX gmxdciqh8FvVoJLWQj7tRxHq19TmiUBaqWa9cOjdQVsZSIIoFaxIM41cdJltfd+YLLbs zV7njREg5tFdUnbW6uH/AwsSIZn+Of3dUv6QP0qL/0Qfj/Rwl8fxpPNEZVgF4wtEokU7 bme/l+w/FNWGO+9/+/I4i5UUYDd3it/mXj3qpN2j+IDjbJnZlCgnjKJvHDqAlxX2e+jN Utp9KGh+PRSOmUmtEkBElTSh9+NHVezsOgG+SKYrk4HZ70rMwL63ZoqR8LIPGq94DmwQ 7XQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NvpdvWWl9NKgZXlIdVT4KAUy/PGBGXuULRfhkwMXiWQ=; b=t2aOqpqAOnDwh1QrSnlgjDDO7x4zkqQ9SdURfT5nlJsww3kiTM52WiYk/zH5xiu2AJ YKpemQsdr5ga4GSAsffY9dJdv6kIaQH73x2pWLIpYUuSq/FhQ85IPo2BO8pTFF3ayQfa tvbV1Z1OBOcGqTrKQ5CCf5+YrPWpzlXE1n86yTYH0sWaIQ4R3ycvT/6gjc5ZGToqCOgj K6XqEJIRwTd0Gg4LaJ0muBEh5xccLyEo6KMRpFvPeT8nmMIFKrnti2KWUuHPViUB1Oq8 z8d33gQuxArK4P0v+qPVnwzL7ObJGufrTu5lezbhxRupGmhCzmR21rF6H3LI2CknUzOE 2lpQ== X-Gm-Message-State: APt69E1BuokgcXPlnAutJdkHH8fk1Rhq/5bgmjkX/00ngy5kltPMPn6P GiQbKk02U3GuUfsTjZepLXZjOyxTs54= X-Received: by 2002:a17:902:8a82:: with SMTP id p2-v6mr4281145plo.244.1528420487574; Thu, 07 Jun 2018 18:14:47 -0700 (PDT) Received: from jchowdhary0.mtv.corp.google.com ([2620:0:1000:1612:de71:f59c:9968:92ba]) by smtp.gmail.com with ESMTPSA id n10-v6sm24941664pfb.27.2018.06.07.18.14.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 18:14:46 -0700 (PDT) Subject: Re: [PATCH] uapi: Make generic uapi headers compile standalone. To: Masahiro Yamada Cc: Linux Kernel Mailing List , Andrew Morton , kernel-team@android.com, Linux Kbuild mailing list References: <20180606231602.231326-1-jchowdhary@google.com> From: Jayant Chowdhary Message-ID: Date: Thu, 7 Jun 2018 18:14:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 06/06/2018 09:58 PM, Masahiro Yamada wrote: > Hi. > > > 2018-06-07 8:16 GMT+09:00 Jayant Chowdhary : >> In order for static analysis tools to analyze each of the uapi headers, >> we need to enable them to compile stand-alone. Some uapi headers were >> missing dependencies which would not make them compile stand-alone in >> user-land. This patch adds those dependencies. >> >> Test: make defconfig; make -j64 >> >> Test: make ARCH=arm64 defconfig; >> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j64 all >> >> Test: ran header-abi-dumper[1] on all the affected headers with >> appropriate include paths[2] for arm64. eg: for drm_fourcc.h, >> >> $HEADER_ABI_DUMPER -o drm_fourcc.h.sdump \ >> include/uapi/drm/drm_fourcc.h -- -target aarch64-linux-android -std=gnu99 \ >> -isystem $CLANG_INCLUDE_PATH \ >> -I include/uapi/ -I arch/arm64/include/generated/uapi \ >> -I arch/arm64/include/uapi -I private-compiler-headers >> -I include/generated/uapi \ >> -I include/uapi/../../arch/arm/include/uapi > > > First of all, is this check sensible? > > scripts/headers_install.sh manipulates exported headers. > > So, shouldn't you do this check after "make headers_install"? > > Apologies, I was unaware of this. Now it is obvious that this check is not sensible :) The headers which should be checked are the ones 'make headers install' produces and not the ones being checked currently. I'll fix this in the next version of this patch. > > You are adding around to various UAPI headers. > Could you tell me why it was added? > > The tool rips off anyway when exporting UAPI headers: > https://github.com/torvalds/linux/blob/v4.17/scripts/headers_install.sh#L37 > > I had added these to satisfy the defines included from , however, since headers_install.sh removes the #includes and the defines themselves, these additions should not be needed. > > > Also, you are adding to several headers. > Please do not pull it in to the kernel space. > The kernel space defines fixed-width types in its headers. > > For example, you added to include/uapi/scsi/scsi_netlink.h > > In my opinion, the correct fix is to replace uint8_t with __u8 or __uint8_t. > > Sure, I will correct this. Thanks, Jayant > > > > >> where >> HEADER_ABI_DUMPER=\ >> $ANDROID_BUILD_TOP/prebuilts/clang-tools/linux-x86/bin/header-abi-dumper >> >> CLANG_INCLUDE_PATH=\ >> $ANDROID_BUILD_TOP/prebuilts/clang/host/linux-x86/clang-3289846/bin/../lib64/clang/3.8/include >> >> on a lunched aosp tree [3] >> >> [1] >> header-abi-dumper is a clang based static analysis tool, used by android's build >> system which parses a C/C++ source file and emits information about the data >> types included in the source. More information can be found at >> https://android.googlesource.com/platform/development/+/master/vndk/tools/header-checker/README.md >> >> [2] >> Some headers, eg: compiler_types.h, compiler.h, sys/socket.h are not in the >> set of uapi headers, even though they are included by uapi headers( >> include/uapi/linux/types.h, include/uapi/asm-generic/signal-defs.h etc). The >> 'private-compiler-headers' in the test clause was included with private copies >> of these headers. libc distributions (eg: bionic) often have their >> copies of these headers as well. >> >> [3] >> https://source.android.com/setup/build/downloading >> >> Cc: akpm@linux-foundation.org >> Cc: kernel-team@android.com >> Cc: linux-kbuild@vger.kernel.org >> Signed-off-by: Jayant Chowdhary >> --- >> include/uapi/asm-generic/ipcbuf.h | 2 ++ >> include/uapi/asm-generic/msgbuf.h | 3 +++ >> include/uapi/asm-generic/sembuf.h | 2 ++ >> include/uapi/asm-generic/shmbuf.h | 2 ++ >> include/uapi/asm-generic/ucontext.h | 5 +++++ >> include/uapi/linux/agpgart.h | 1 - >> include/uapi/linux/android/binder.h | 1 + >> include/uapi/linux/chio.h | 6 ++++++ >> include/uapi/linux/coda_psdev.h | 1 + >> include/uapi/linux/dvb/dmx.h | 3 --- >> include/uapi/linux/dvb/video.h | 3 --- >> include/uapi/linux/errqueue.h | 1 + >> include/uapi/linux/kexec.h | 1 + >> include/uapi/linux/kfd_ioctl.h | 1 + >> include/uapi/linux/lightnvm.h | 1 - >> include/uapi/linux/ndctl.h | 1 + >> include/uapi/linux/netfilter_bridge/ebtables.h | 1 + >> include/uapi/linux/nfs4_mount.h | 3 +++ >> include/uapi/linux/psp-sev.h | 1 + >> include/uapi/linux/scc.h | 2 +- >> include/uapi/linux/sctp.h | 3 +++ >> include/uapi/linux/sdla.h | 2 ++ >> include/uapi/linux/socket.h | 4 ++++ >> include/uapi/linux/stddef.h | 5 +++++ >> include/uapi/linux/sysctl.h | 1 + >> include/uapi/linux/types.h | 1 + >> include/uapi/linux/vbox_vmmdev_types.h | 1 + >> include/uapi/linux/vboxguest.h | 1 + >> include/uapi/rdma/hfi/hfi1_user.h | 1 + >> include/uapi/scsi/scsi_bsg_fc.h | 2 ++ >> include/uapi/scsi/scsi_netlink.h | 1 + >> include/uapi/sound/asound.h | 2 +- >> 32 files changed, 55 insertions(+), 10 deletions(-) >> >> diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h >> index 7d80dbd336fb..41a01b494fc7 100644 >> --- a/include/uapi/asm-generic/ipcbuf.h >> +++ b/include/uapi/asm-generic/ipcbuf.h >> @@ -2,6 +2,8 @@ >> #ifndef __ASM_GENERIC_IPCBUF_H >> #define __ASM_GENERIC_IPCBUF_H >> >> +#include >> + >> /* >> * The generic ipc64_perm structure: >> * Note extra padding because this structure is passed back and forth >> diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h >> index fb306ebdb36f..8cdd7ca75df6 100644 >> --- a/include/uapi/asm-generic/msgbuf.h >> +++ b/include/uapi/asm-generic/msgbuf.h >> @@ -3,6 +3,9 @@ >> #define __ASM_GENERIC_MSGBUF_H >> >> #include >> +#include >> +#include >> + >> /* >> * generic msqid64_ds structure. >> * >> diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h >> index cbf9cfe977d6..7f37edb95d9f 100644 >> --- a/include/uapi/asm-generic/sembuf.h >> +++ b/include/uapi/asm-generic/sembuf.h >> @@ -3,6 +3,8 @@ >> #define __ASM_GENERIC_SEMBUF_H >> >> #include >> +#include >> +#include >> >> /* >> * The semid64_ds structure for x86 architecture. >> diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h >> index 2b6c3bb97f97..1c5e7165fca5 100644 >> --- a/include/uapi/asm-generic/shmbuf.h >> +++ b/include/uapi/asm-generic/shmbuf.h >> @@ -3,6 +3,8 @@ >> #define __ASM_GENERIC_SHMBUF_H >> >> #include >> +#include >> +#include >> >> /* >> * The shmid64_ds structure for x86 architecture. >> diff --git a/include/uapi/asm-generic/ucontext.h b/include/uapi/asm-generic/ucontext.h >> index 351868a72168..19199f45c523 100644 >> --- a/include/uapi/asm-generic/ucontext.h >> +++ b/include/uapi/asm-generic/ucontext.h >> @@ -2,6 +2,11 @@ >> #ifndef __ASM_GENERIC_UCONTEXT_H >> #define __ASM_GENERIC_UCONTEXT_H >> >> +#ifndef __KERNEL__ >> +#include >> +#include >> +#endif >> + >> struct ucontext { >> unsigned long uc_flags; >> struct ucontext *uc_link; >> diff --git a/include/uapi/linux/agpgart.h b/include/uapi/linux/agpgart.h >> index f5251045181a..4e828cf487bc 100644 >> --- a/include/uapi/linux/agpgart.h >> +++ b/include/uapi/linux/agpgart.h >> @@ -52,7 +52,6 @@ >> >> #ifndef __KERNEL__ >> #include >> -#include >> >> struct agp_version { >> __u16 major; >> diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h >> index bfaec6903b8b..fd6de2203057 100644 >> --- a/include/uapi/linux/android/binder.h >> +++ b/include/uapi/linux/android/binder.h >> @@ -23,6 +23,7 @@ >> >> #include >> #include >> +#include >> >> #define B_PACK_CHARS(c1, c2, c3, c4) \ >> ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4)) >> diff --git a/include/uapi/linux/chio.h b/include/uapi/linux/chio.h >> index 689fc93fafda..5e63753a0d53 100644 >> --- a/include/uapi/linux/chio.h >> +++ b/include/uapi/linux/chio.h >> @@ -3,6 +3,11 @@ >> * ioctl interface for the scsi media changer driver >> */ >> >> +#ifndef _UAPI_CHIO_H >> +#define _UAPI_CHIO_H >> + >> +#include >> + >> /* changer element types */ >> #define CHET_MT 0 /* media transport element (robot) */ >> #define CHET_ST 1 /* storage element (media slots) */ >> @@ -167,3 +172,4 @@ struct changer_set_voltag { >> * c-basic-offset: 8 >> * End: >> */ >> +#endif >> diff --git a/include/uapi/linux/coda_psdev.h b/include/uapi/linux/coda_psdev.h >> index aa6623efd2dd..31b1867021b7 100644 >> --- a/include/uapi/linux/coda_psdev.h >> +++ b/include/uapi/linux/coda_psdev.h >> @@ -3,6 +3,7 @@ >> #define _UAPI__CODA_PSDEV_H >> >> #include >> +#include >> >> #define CODA_PSDEV_MAJOR 67 >> #define MAX_CODADEVS 5 /* how many do we allow */ >> diff --git a/include/uapi/linux/dvb/dmx.h b/include/uapi/linux/dvb/dmx.h >> index b4112f0b6dd3..ce30e9f6145a 100644 >> --- a/include/uapi/linux/dvb/dmx.h >> +++ b/include/uapi/linux/dvb/dmx.h >> @@ -26,9 +26,6 @@ >> #define _UAPI_DVBDMX_H_ >> >> #include >> -#ifndef __KERNEL__ >> -#include >> -#endif >> >> >> #define DMX_FILTER_SIZE 16 >> diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h >> index df3d7028c807..8f3a485b9988 100644 >> --- a/include/uapi/linux/dvb/video.h >> +++ b/include/uapi/linux/dvb/video.h >> @@ -26,9 +26,6 @@ >> #define _UAPI_DVBVIDEO_H_ >> >> #include >> -#ifndef __KERNEL__ >> -#include >> -#endif >> >> typedef enum { >> VIDEO_FORMAT_4_3, /* Select 4:3 format */ >> diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h >> index dc64cfaf13da..ad2421e3d613 100644 >> --- a/include/uapi/linux/errqueue.h >> +++ b/include/uapi/linux/errqueue.h >> @@ -2,6 +2,7 @@ >> #ifndef _UAPI_LINUX_ERRQUEUE_H >> #define _UAPI_LINUX_ERRQUEUE_H >> >> +#include >> #include >> >> struct sock_extended_err { >> diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h >> index 6d112868272d..49d50d469723 100644 >> --- a/include/uapi/linux/kexec.h >> +++ b/include/uapi/linux/kexec.h >> @@ -8,6 +8,7 @@ >> */ >> >> #include >> +#include >> >> /* kexec flags for different usage scenarios */ >> #define KEXEC_ON_CRASH 0x00000001 >> diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h >> index b4f5073dbac2..4a882a133b69 100644 >> --- a/include/uapi/linux/kfd_ioctl.h >> +++ b/include/uapi/linux/kfd_ioctl.h >> @@ -25,6 +25,7 @@ >> >> #include >> #include >> +#include >> >> #define KFD_IOCTL_MAJOR_VERSION 1 >> #define KFD_IOCTL_MINOR_VERSION 1 >> diff --git a/include/uapi/linux/lightnvm.h b/include/uapi/linux/lightnvm.h >> index f9a1be7fc696..af28d32b0ac3 100644 >> --- a/include/uapi/linux/lightnvm.h >> +++ b/include/uapi/linux/lightnvm.h >> @@ -24,7 +24,6 @@ >> #include >> #include >> #else /* __KERNEL__ */ >> -#include >> #include >> #define DISK_NAME_LEN 32 >> #endif /* __KERNEL__ */ >> diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h >> index 7e27070b9440..a89a294e5ca5 100644 >> --- a/include/uapi/linux/ndctl.h >> +++ b/include/uapi/linux/ndctl.h >> @@ -13,6 +13,7 @@ >> #ifndef __NDCTL_H__ >> #define __NDCTL_H__ >> >> +#include >> #include >> >> struct nd_cmd_dimm_flags { >> diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h >> index 0c7dc8315013..c57850b90b50 100644 >> --- a/include/uapi/linux/netfilter_bridge/ebtables.h >> +++ b/include/uapi/linux/netfilter_bridge/ebtables.h >> @@ -16,6 +16,7 @@ >> #include >> #include >> #include >> +#include >> >> #define EBT_TABLE_MAXNAMELEN 32 >> #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN >> diff --git a/include/uapi/linux/nfs4_mount.h b/include/uapi/linux/nfs4_mount.h >> index d20bb869bb99..6c9792073b19 100644 >> --- a/include/uapi/linux/nfs4_mount.h >> +++ b/include/uapi/linux/nfs4_mount.h >> @@ -19,6 +19,9 @@ >> */ >> #define NFS4_MOUNT_VERSION 1 >> >> +#include /* for struct sockaddr. */ >> +#include >> + >> struct nfs_string { >> unsigned int len; >> const char __user * data; >> diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h >> index 9008f31c7eb6..c796f1b194a3 100644 >> --- a/include/uapi/linux/psp-sev.h >> +++ b/include/uapi/linux/psp-sev.h >> @@ -18,6 +18,7 @@ >> #define __PSP_SEV_USER_H__ >> >> #include >> +#include >> >> /** >> * SEV platform commands >> diff --git a/include/uapi/linux/scc.h b/include/uapi/linux/scc.h >> index c5bc7f747755..9122d48a4227 100644 >> --- a/include/uapi/linux/scc.h >> +++ b/include/uapi/linux/scc.h >> @@ -4,7 +4,7 @@ >> #ifndef _UAPI_SCC_H >> #define _UAPI_SCC_H >> >> - >> +#include >> /* selection of hardware types */ >> >> #define PA0HZP 0x00 /* hardware type for PA0HZP SCC card and compatible */ >> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h >> index b64d583bf053..de4675d92e9f 100644 >> --- a/include/uapi/linux/sctp.h >> +++ b/include/uapi/linux/sctp.h >> @@ -56,6 +56,9 @@ >> >> #include >> #include >> +#ifndef __KERNEL__ >> +#include >> +#endif >> >> typedef __s32 sctp_assoc_t; >> >> diff --git a/include/uapi/linux/sdla.h b/include/uapi/linux/sdla.h >> index 1e3735be6511..2a0dc687aa49 100644 >> --- a/include/uapi/linux/sdla.h >> +++ b/include/uapi/linux/sdla.h >> @@ -24,6 +24,8 @@ >> #ifndef _UAPISDLA_H >> #define _UAPISDLA_H >> >> +#include >> + >> /* adapter type */ >> #define SDLA_TYPES >> #define SDLA_S502A 5020 >> diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h >> index 8eb96021709c..51c11f6b26e6 100644 >> --- a/include/uapi/linux/socket.h >> +++ b/include/uapi/linux/socket.h >> @@ -11,6 +11,10 @@ >> >> typedef unsigned short __kernel_sa_family_t; >> >> +#ifndef __KERNEL__ >> +#include /* for struct sockaddr. */ >> +#endif >> + >> struct __kernel_sockaddr_storage { >> __kernel_sa_family_t ss_family; /* address family */ >> /* Following field(s) are implementation specific */ >> diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h >> index ee8220f8dcf5..c949a6836417 100644 >> --- a/include/uapi/linux/stddef.h >> +++ b/include/uapi/linux/stddef.h >> @@ -1,6 +1,11 @@ >> /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ >> +#ifndef __UAPI_STDDEF_H__ >> +#define __UAPI_STDDEF_H__ >> + >> #include >> >> #ifndef __always_inline >> #define __always_inline inline >> #endif >> + >> +#endif // __UAPI_STDDEF_H__ >> diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h >> index 6b58371b1f0d..fac6c1c7def2 100644 >> --- a/include/uapi/linux/sysctl.h >> +++ b/include/uapi/linux/sysctl.h >> @@ -26,6 +26,7 @@ >> #include >> #include >> #include >> +#include >> >> #define CTL_MAXNAME 10 /* how many path components do we allow in a >> call to sysctl? In other words, what is >> diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h >> index cd4f0b897a48..d61eb82432be 100644 >> --- a/include/uapi/linux/types.h >> +++ b/include/uapi/linux/types.h >> @@ -11,6 +11,7 @@ >> #endif /* __EXPORTED_HEADERS__ */ >> #endif >> >> +#include >> #include >> >> >> diff --git a/include/uapi/linux/vbox_vmmdev_types.h b/include/uapi/linux/vbox_vmmdev_types.h >> index 0e68024f36c7..26d0e69f6fdc 100644 >> --- a/include/uapi/linux/vbox_vmmdev_types.h >> +++ b/include/uapi/linux/vbox_vmmdev_types.h >> @@ -11,6 +11,7 @@ >> >> #include >> #include >> +#include >> >> /* >> * We cannot use linux' compiletime_assert here because it expects to be used >> diff --git a/include/uapi/linux/vboxguest.h b/include/uapi/linux/vboxguest.h >> index 612f0c7d3558..44606c96f830 100644 >> --- a/include/uapi/linux/vboxguest.h >> +++ b/include/uapi/linux/vboxguest.h >> @@ -9,6 +9,7 @@ >> #define __UAPI_VBOXGUEST_H__ >> >> #include >> +#include >> #include >> #include >> #include >> diff --git a/include/uapi/rdma/hfi/hfi1_user.h b/include/uapi/rdma/hfi/hfi1_user.h >> index c6a984c0c881..6f5e461b8015 100644 >> --- a/include/uapi/rdma/hfi/hfi1_user.h >> +++ b/include/uapi/rdma/hfi/hfi1_user.h >> @@ -58,6 +58,7 @@ >> #define _LINUX__HFI1_USER_H >> >> #include >> +#include >> #include >> >> /* >> diff --git a/include/uapi/scsi/scsi_bsg_fc.h b/include/uapi/scsi/scsi_bsg_fc.h >> index 62597d86beed..23971d00c46d 100644 >> --- a/include/uapi/scsi/scsi_bsg_fc.h >> +++ b/include/uapi/scsi/scsi_bsg_fc.h >> @@ -23,6 +23,8 @@ >> #ifndef SCSI_BSG_FC_H >> #define SCSI_BSG_FC_H >> >> +#include >> + >> /* >> * This file intended to be included by both kernel and user space >> */ >> diff --git a/include/uapi/scsi/scsi_netlink.h b/include/uapi/scsi/scsi_netlink.h >> index 5ccc2333acab..37d39eb671cc 100644 >> --- a/include/uapi/scsi/scsi_netlink.h >> +++ b/include/uapi/scsi/scsi_netlink.h >> @@ -25,6 +25,7 @@ >> >> #include >> #include >> +#include >> >> /* >> * This file intended to be included by both kernel and user space >> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h >> index ed0a120d4f08..b569f0eb3a7f 100644 >> --- a/include/uapi/sound/asound.h >> +++ b/include/uapi/sound/asound.h >> @@ -31,7 +31,7 @@ >> #endif >> >> #ifndef __KERNEL__ >> -#include >> +#include >> #endif >> >> /* >> -- >> 2.17.1.1185.g55be947832-goog >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > >