From 594971b59caa1d75f0179de8d612375f410a7566 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Thu, 21 Mar 2024 23:29:18 -0700 Subject: Remove obsolete portability patches with C23 and new cproc --- ...ent-zero-length-array-members-in-asound.h.patch | 77 ++++++++++++++++++++++ ...Revert-change-of-BPF_F_-to-enum-constants.patch | 32 --------- ...ent-zero-length-array-members-in-asound.h.patch | 77 ---------------------- ...move-stray-semicolon-in-struct-declaratio.patch | 26 ++++++++ ...move-stray-semicolon-in-struct-declaratio.patch | 26 -------- pkg/linux-headers/ver | 2 +- 6 files changed, 104 insertions(+), 136 deletions(-) create mode 100644 pkg/linux-headers/patch/0002-Prevent-zero-length-array-members-in-asound.h.patch delete mode 100644 pkg/linux-headers/patch/0002-Revert-change-of-BPF_F_-to-enum-constants.patch delete mode 100644 pkg/linux-headers/patch/0003-Prevent-zero-length-array-members-in-asound.h.patch create mode 100644 pkg/linux-headers/patch/0003-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch delete mode 100644 pkg/linux-headers/patch/0004-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch (limited to 'pkg/linux-headers') diff --git a/pkg/linux-headers/patch/0002-Prevent-zero-length-array-members-in-asound.h.patch b/pkg/linux-headers/patch/0002-Prevent-zero-length-array-members-in-asound.h.patch new file mode 100644 index 00000000..1b6d56a8 --- /dev/null +++ b/pkg/linux-headers/patch/0002-Prevent-zero-length-array-members-in-asound.h.patch @@ -0,0 +1,77 @@ +From 069cbc8a25155771af775ee084ba3519ed5a9602 Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Mon, 30 Aug 2021 19:26:32 -0700 +Subject: [PATCH] Prevent zero-length array members in asound.h + +--- + include/uapi/sound/asound.h | 31 +++++++++++++++++++++---------- + 1 file changed, 21 insertions(+), 10 deletions(-) + +diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h +index 628d46a0da92..23b0d301e83f 100644 +--- a/include/uapi/sound/asound.h ++++ b/include/uapi/sound/asound.h +@@ -557,22 +557,30 @@ struct __snd_pcm_sync_ptr { + } c; + }; + ++#if __BITS_PER_LONG == 32 + #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) +-typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; +-typedef char __pad_after_uframe[0]; ++#define __PAD_BEFORE_UFRAME(x) char x[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; + #endif + + #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) +-typedef char __pad_before_uframe[0]; +-typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; ++#define __PAD_AFTER_UFRAME(x) char x[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; ++#endif ++#endif ++ ++#ifndef __PAD_BEFORE_UFRAME ++#define __PAD_BEFORE_UFRAME(x) ++#endif ++ ++#ifndef __PAD_AFTER_UFRAME ++#define __PAD_AFTER_UFRAME(x) + #endif + + struct __snd_pcm_mmap_status64 { + snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ + __u32 pad1; /* Needed for 64 bit alignment */ +- __pad_before_uframe __pad1; ++ __PAD_BEFORE_UFRAME(__pad1) + snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ +- __pad_after_uframe __pad2; ++ __PAD_AFTER_UFRAME(__pad2) + struct __snd_timespec64 tstamp; /* Timestamp */ + snd_pcm_state_t suspended_state;/* RO: suspended stream state */ + __u32 pad3; /* Needed for 64 bit alignment */ +@@ -580,16 +588,19 @@ struct __snd_pcm_mmap_status64 { + }; + + struct __snd_pcm_mmap_control64 { +- __pad_before_uframe __pad1; ++ __PAD_BEFORE_UFRAME(__pad1) + snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */ +- __pad_before_uframe __pad2; // This should be __pad_after_uframe, but binary ++ __PAD_BEFORE_UFRAME(__pad2) // This should be __pad_after_uframe, but binary + // backwards compatibility constraints prevent a fix. + +- __pad_before_uframe __pad3; ++ __PAD_BEFORE_UFRAME(__pad3) + snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */ +- __pad_after_uframe __pad4; ++ __PAD_AFTER_UFRAME(__pad4) + }; + ++#undef __PAD_BEFORE_UFRAME ++#undef __PAD_AFTER_UFRAME ++ + struct __snd_pcm_sync_ptr64 { + __u32 flags; + __u32 pad1; +-- +2.44.0 + diff --git a/pkg/linux-headers/patch/0002-Revert-change-of-BPF_F_-to-enum-constants.patch b/pkg/linux-headers/patch/0002-Revert-change-of-BPF_F_-to-enum-constants.patch deleted file mode 100644 index 1ce46281..00000000 --- a/pkg/linux-headers/patch/0002-Revert-change-of-BPF_F_-to-enum-constants.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 72b27c48f468c547dcd93beae9041417c05ef655 Mon Sep 17 00:00:00 2001 -From: Michael Forney -Date: Tue, 2 Jun 2020 03:56:03 -0700 -Subject: [PATCH] Revert change of BPF_F_* to enum constants - ---- - include/uapi/linux/bpf.h | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h -index 754e68ca8744..11bef290a69e 100644 ---- a/include/uapi/linux/bpf.h -+++ b/include/uapi/linux/bpf.h -@@ -5970,12 +5970,10 @@ enum { - /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and - * BPF_FUNC_perf_event_read_value flags. - */ --enum { -- BPF_F_INDEX_MASK = 0xffffffffULL, -- BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK, -+#define BPF_F_INDEX_MASK 0xffffffffULL -+#define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK - /* BPF_FUNC_perf_event_output for sk_buff input context. */ -- BPF_F_CTXLEN_MASK = (0xfffffULL << 32), --}; -+#define BPF_F_CTXLEN_MASK (0xfffffULL << 32) - - /* Current network namespace */ - enum { --- -2.44.0 - diff --git a/pkg/linux-headers/patch/0003-Prevent-zero-length-array-members-in-asound.h.patch b/pkg/linux-headers/patch/0003-Prevent-zero-length-array-members-in-asound.h.patch deleted file mode 100644 index 1b6d56a8..00000000 --- a/pkg/linux-headers/patch/0003-Prevent-zero-length-array-members-in-asound.h.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 069cbc8a25155771af775ee084ba3519ed5a9602 Mon Sep 17 00:00:00 2001 -From: Michael Forney -Date: Mon, 30 Aug 2021 19:26:32 -0700 -Subject: [PATCH] Prevent zero-length array members in asound.h - ---- - include/uapi/sound/asound.h | 31 +++++++++++++++++++++---------- - 1 file changed, 21 insertions(+), 10 deletions(-) - -diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h -index 628d46a0da92..23b0d301e83f 100644 ---- a/include/uapi/sound/asound.h -+++ b/include/uapi/sound/asound.h -@@ -557,22 +557,30 @@ struct __snd_pcm_sync_ptr { - } c; - }; - -+#if __BITS_PER_LONG == 32 - #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) --typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; --typedef char __pad_after_uframe[0]; -+#define __PAD_BEFORE_UFRAME(x) char x[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; - #endif - - #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) --typedef char __pad_before_uframe[0]; --typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; -+#define __PAD_AFTER_UFRAME(x) char x[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; -+#endif -+#endif -+ -+#ifndef __PAD_BEFORE_UFRAME -+#define __PAD_BEFORE_UFRAME(x) -+#endif -+ -+#ifndef __PAD_AFTER_UFRAME -+#define __PAD_AFTER_UFRAME(x) - #endif - - struct __snd_pcm_mmap_status64 { - snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ - __u32 pad1; /* Needed for 64 bit alignment */ -- __pad_before_uframe __pad1; -+ __PAD_BEFORE_UFRAME(__pad1) - snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ -- __pad_after_uframe __pad2; -+ __PAD_AFTER_UFRAME(__pad2) - struct __snd_timespec64 tstamp; /* Timestamp */ - snd_pcm_state_t suspended_state;/* RO: suspended stream state */ - __u32 pad3; /* Needed for 64 bit alignment */ -@@ -580,16 +588,19 @@ struct __snd_pcm_mmap_status64 { - }; - - struct __snd_pcm_mmap_control64 { -- __pad_before_uframe __pad1; -+ __PAD_BEFORE_UFRAME(__pad1) - snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */ -- __pad_before_uframe __pad2; // This should be __pad_after_uframe, but binary -+ __PAD_BEFORE_UFRAME(__pad2) // This should be __pad_after_uframe, but binary - // backwards compatibility constraints prevent a fix. - -- __pad_before_uframe __pad3; -+ __PAD_BEFORE_UFRAME(__pad3) - snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */ -- __pad_after_uframe __pad4; -+ __PAD_AFTER_UFRAME(__pad4) - }; - -+#undef __PAD_BEFORE_UFRAME -+#undef __PAD_AFTER_UFRAME -+ - struct __snd_pcm_sync_ptr64 { - __u32 flags; - __u32 pad1; --- -2.44.0 - diff --git a/pkg/linux-headers/patch/0003-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch b/pkg/linux-headers/patch/0003-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch new file mode 100644 index 00000000..05de68d2 --- /dev/null +++ b/pkg/linux-headers/patch/0003-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch @@ -0,0 +1,26 @@ +From c421db7540796882a53d9b533862da16d7810ec3 Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Fri, 18 Feb 2022 01:51:13 -0800 +Subject: [PATCH] nfc: uapi: remove stray semicolon in struct declaration + +Signed-off-by: Michael Forney +--- + include/uapi/linux/nfc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h +index 4fa4e979e948..8ab0833ed192 100644 +--- a/include/uapi/linux/nfc.h ++++ b/include/uapi/linux/nfc.h +@@ -277,7 +277,7 @@ struct sockaddr_nfc_llcp { + __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 */; ++ char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */ + __kernel_size_t service_name_len; + }; + +-- +2.34.1 + diff --git a/pkg/linux-headers/patch/0004-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch b/pkg/linux-headers/patch/0004-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch deleted file mode 100644 index 05de68d2..00000000 --- a/pkg/linux-headers/patch/0004-nfc-uapi-remove-stray-semicolon-in-struct-declaratio.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c421db7540796882a53d9b533862da16d7810ec3 Mon Sep 17 00:00:00 2001 -From: Michael Forney -Date: Fri, 18 Feb 2022 01:51:13 -0800 -Subject: [PATCH] nfc: uapi: remove stray semicolon in struct declaration - -Signed-off-by: Michael Forney ---- - include/uapi/linux/nfc.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h -index 4fa4e979e948..8ab0833ed192 100644 ---- a/include/uapi/linux/nfc.h -+++ b/include/uapi/linux/nfc.h -@@ -277,7 +277,7 @@ struct sockaddr_nfc_llcp { - __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 */; -+ char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */ - __kernel_size_t service_name_len; - }; - --- -2.34.1 - diff --git a/pkg/linux-headers/ver b/pkg/linux-headers/ver index 0e797e95..a314d25d 100644 --- a/pkg/linux-headers/ver +++ b/pkg/linux-headers/ver @@ -1 +1 @@ -6.8 r0 +6.8 r1 -- cgit v1.2.3