uapi: fix linux/nfc.h userspace compilation errors
Subsystems (3)
PATCH 2/2 uapi: fix linux/nfc.h userspace compilation errors
Replace sa_family_t with __kernel_sa_family_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;
--- include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/nfc.h +2 -2
@@ -261,7 +261,7 @@ enum nfc_sdp_attr {#define NFC_SE_ENABLED 0x1struct sockaddr_nfc { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;__u32 dev_idx;__u32 target_idx;__u32 nfc_protocol;
@@ -269,7 +269,7 @@ struct sockaddr_nfc {#define NFC_LLCP_MAX_SERVICE_NAME 63struct sockaddr_nfc_llcp { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;__u32 dev_idx;__u32 target_idx;__u32 nfc_protocol;
Signature · 1 line
ldv
PATCH RESEND 1/1 uapi: fix linux/nfc.h userspace compilation errors
Replace sa_family_t with __kernel_sa_family_t to fix the following linux/nfc.h userspace compilation errors:
/usr/include/linux/nfc.h:266:2: error: unknown type name 'sa_family_t'
sa_family_t sa_family;/usr/include/linux/nfc.h:274:2: error: unknown type name 'sa_family_t'
sa_family_t sa_family;
---
The patch was submitted almost 5 years ago, and I was under impression that it was applied among others of this kind, but, apparently, it's still relevant.
include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/nfc.h +2 -2
@@ -263,7 +263,7 @@ enum nfc_sdp_attr {#define NFC_SE_ENABLED 0x1struct sockaddr_nfc { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;__u32 dev_idx;__u32 target_idx;__u32 nfc_protocol;
@@ -271,7 +271,7 @@ struct sockaddr_nfc {#define NFC_LLCP_MAX_SERVICE_NAME 63struct sockaddr_nfc_llcp { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;__u32 dev_idx;__u32 target_idx;__u32 nfc_protocol;
Signature · 1 line
ldv
Quoted 9 lines · Dmitry V. Levin
Replace
sa_family_twith__kernel_sa_family_tto fix the followinglinux/nfc.huserspace compilation errors:
/usr/include/linux/nfc.h:266:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;/usr/include/linux/nfc.h:274:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;
Please skip the link. There will be link added for current patch which leads to this discussion. There was no discussion in 2017.
Quoted 14 lines
Signed-off-by Dmitry V. Levin <[email protected]>---
The patch was submitted almost 5 years ago, and I was under impression that it was applied among others of this kind, but, apparently, it's still relevant.include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/uapi/linux/nfc.h +0
-0
include/uapi/linux/nfc.h enum nfc_sdp_attr { · line 266
Quoted 5 lines
include/uapi/linux/nfc.h +1
-1@@ -263,7 +263,7 @@ enum nfc_sdp_attr {#define NFC_SE_ENABLED 0x1struct sockaddr_nfc { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;
include/uapi/linux/nfc.h includes linux/socket.h which defines typedef:
__kernel_sa_family_t sa_family_t;
so how exactly the build is being fixed? How to reproduce it?
Best regards,
Krzysztof
Quoted 30 lines · Krzysztof Kozlowski
Quoted 9 lines · Dmitry V. Levin
Replace
sa_family_twith__kernel_sa_family_tto fix the followinglinux/nfc.huserspace compilation errors:
/usr/include/linux/nfc.h:266:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;/usr/include/linux/nfc.h:274:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;Please skip the link. There will be link added for current patch which leads to this discussion. There was no discussion in 2017.
Quoted 16 lines
Signed-off-by Dmitry V. Levin <[email protected]>---
The patch was submitted almost 5 years ago, and I was under impression that it was applied among others of this kind, but, apparently, it's still relevant.include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/uapi/linux/nfc.h +0
-0@@ -263,7 +263,7 @@ enum nfc_sdp_attr {#define NFC_SE_ENABLED 0x1
Quoted 8 lines
include/uapi/linux/nfc.h enum nfc_sdp_attr { · line 266
Quoted 3 lines
include/uapi/linux/nfc.h +1
-1struct sockaddr_nfc { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;
include/uapi/linux/nfc.hincludeslinux/socket.hwhich defines typedef:
__kernel_sa_family_tsa_family_t;
so how exactly the build is being fixed? How to reproduce it?
Ok, I see the error - when user-space does not include sys/socket.h. Makes sense, can you resend with removed Link and with:
Best regards,
Krzysztof
PATCH v2 1/1 uapi: fix linux/nfc.h userspace compilation errors
Replace sa_family_t with __kernel_sa_family_t to fix the following linux/nfc.h userspace compilation errors:
/usr/include/linux/nfc.h:266:2: error: unknown type name 'sa_family_t'
sa_family_t sa_family;/usr/include/linux/nfc.h:274:2: error: unknown type name 'sa_family_t'
sa_family_t sa_family;
---
v2: Removed Link tag, added Fixes and Cc tags.
include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/nfc.h +2 -2
@@ -263,7 +263,7 @@ enum nfc_sdp_attr {#define NFC_SE_ENABLED 0x1struct sockaddr_nfc { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;__u32 dev_idx;__u32 target_idx;__u32 nfc_protocol;
@@ -271,7 +271,7 @@ struct sockaddr_nfc {#define NFC_LLCP_MAX_SERVICE_NAME 63struct sockaddr_nfc_llcp { -sa_family_t sa_family; +__kernel_sa_family_t sa_family;__u32 dev_idx;__u32 target_idx;__u32 nfc_protocol;
Signature · 1 line
ldv
Quoted 12 lines · Dmitry V. Levin
Replace
sa_family_twith__kernel_sa_family_tto fix the followinglinux/nfc.huserspace compilation errors:
/usr/include/linux/nfc.h:266:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;/usr/include/linux/nfc.h:274:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;Fixes 23b7869c0fd0 ("NFC: add the NFC socket raw protocol")Fixes d646960f7986 ("NFC: Initial LLCP support")Cc <[email protected]>Signed-off-by Dmitry V. Levin <[email protected]>
Quoted 6 lines
---
v2: Removed Link tag, added Fixes and Cc tags.include/uapi/linux/nfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Best regards,
Krzysztof
Quoted 8 lines · On Sun, 26 Dec 2021 16:01:27 +0300 Dmitry V. Levin wrote:
Replace
sa_family_twith__kernel_sa_family_tto fix the followinglinux/nfc.huserspace compilation errors:
/usr/include/linux/nfc.h:266:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;/usr/include/linux/nfc.h:274:2: error: unknown type name 'sa_family_t'
sa_family_tsa_family;
Quoted 4 lines
Fixes 23b7869c0fd0 ("NFC: add the NFC socket raw protocol")Fixes d646960f7986 ("NFC: Initial LLCP support")Cc <[email protected]>Signed-off-by Dmitry V. Levin <[email protected]>
Applied to net:
commit 7175f02c4e5f ("uapi: fix linux/nfc.h userspace compilation errors")
thanks!