[klibc] [klibc:master] fcntl: Fix build failure for some architectures with Linux 5.19

klibc-bot for Ben Hutchings ben at decadent.org.uk
Wed Aug 3 15:51:08 PDT 2022


Commit-ID:  bb2fde5ddbc18a2e7795ca4d24759230c2aae9d0
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=bb2fde5ddbc18a2e7795ca4d24759230c2aae9d0
Author:     Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Wed, 3 Aug 2022 01:10:01 +0200
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Thu, 4 Aug 2022 00:48:26 +0200

[klibc] fcntl: Fix build failure for some architectures with Linux 5.19

Starting from Linux 5.19, the kernel UAPI headers now only define
__ARCH_FLOCK64_PAD if the architecture actually needs padding in
struct flock64.  Wrap its use with #ifdef,

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 usr/include/fcntl.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr/include/fcntl.h b/usr/include/fcntl.h
index ed703a62..cb2e4e53 100644
--- a/usr/include/fcntl.h
+++ b/usr/include/fcntl.h
@@ -33,7 +33,9 @@ struct flock {
 	__kernel_loff_t l_start;
 	__kernel_loff_t l_len;
 	__kernel_pid_t  l_pid;
+#ifdef __ARCH_FLOCK64_PAD
         __ARCH_FLOCK64_PAD
+#endif
 };
 
 #ifdef F_GETLK64


More information about the klibc mailing list