From 33f9095e528bb8be591e5d2715fa4fb98247bd61 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 20 Feb 2017 15:21:03 +0000 Subject: [PATCH 03/15] uapi: fix linux/nfc.h userspace compilation errors Replace sa_family_t with __kernel_sa_family_t and size_t with __kernel_size_t to fix the following linux/nfc.h userspace compilation errors: /usr/include/linux/nfc.h:264:2: error: unknown type name 'sa_family_t' sa_family_t sa_family; /usr/include/linux/nfc.h:272:2: error: unknown type name 'sa_family_t' sa_family_t sa_family; /usr/include/linux/nfc.h:279:2: error: unknown type name 'size_t' size_t service_name_len; x32 is the only architecture where sizeof(size_t) is less than sizeof(__kernel_size_t), but as the kernel treats it as __kernel_size_t anyway, UAPI should follow. Signed-off-by: Dmitry V. Levin --- include/uapi/linux/nfc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index f6e3c8c9c744..4fa4e979e948 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h @@ -263,7 +263,7 @@ enum nfc_sdp_attr { #define NFC_SE_ENABLED 0x1 struct sockaddr_nfc { - sa_family_t sa_family; + __kernel_sa_family_t sa_family; __u32 dev_idx; __u32 target_idx; __u32 nfc_protocol; @@ -271,14 +271,14 @@ struct sockaddr_nfc { #define NFC_LLCP_MAX_SERVICE_NAME 63 struct sockaddr_nfc_llcp { - sa_family_t sa_family; + __kernel_sa_family_t sa_family; __u32 dev_idx; __u32 target_idx; __u32 nfc_protocol; __u8 dsap; /* Destination SAP, if known */ __u8 ssap; /* Source SAP to be bound to */ char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */; - size_t service_name_len; + __kernel_size_t service_name_len; }; /* NFC socket protocols */