0004-Use-C11-alignas-instead-of-GNU-alignment-attribute.patch (1182B)
1 From fa8a0ee0f3060807240fa402569f9c9e71cdfefe Mon Sep 17 00:00:00 2001 2 From: Michael Forney <mforney@mforney.org> 3 Date: Sat, 2 May 2026 21:45:23 -0700 4 Subject: [PATCH] Use C11 alignas instead of GNU alignment attribute 5 6 --- 7 src/search.c | 2 +- 8 src/search.h | 3 ++- 9 2 files changed, 3 insertions(+), 2 deletions(-) 10 11 diff --git a/src/search.c b/src/search.c 12 index 2245818..b65e2d5 100644 13 --- a/src/search.c 14 +++ b/src/search.c 15 @@ -4,7 +4,7 @@ 16 17 size_t alpha_skip_lookup[256]; 18 size_t *find_skip_lookup; 19 -uint8_t h_table[H_SIZE] __attribute__((aligned(64))); 20 +alignas(64) uint8_t h_table[H_SIZE]; 21 22 work_queue_t *work_queue; 23 work_queue_t *work_queue_tail; 24 diff --git a/src/search.h b/src/search.h 25 index a1bc5d7..96420aa 100644 26 --- a/src/search.h 27 +++ b/src/search.h 28 @@ -6,6 +6,7 @@ 29 #include <fcntl.h> 30 #include <limits.h> 31 #include <pcre.h> 32 +#include <stdalign.h> 33 #include <stdio.h> 34 #include <stdlib.h> 35 #include <string.h> 36 @@ -33,7 +34,7 @@ 37 38 extern size_t alpha_skip_lookup[256]; 39 extern size_t *find_skip_lookup; 40 -extern uint8_t h_table[H_SIZE] __attribute__((aligned(64))); 41 +extern alignas(64) uint8_t h_table[H_SIZE]; 42 43 struct work_queue_t { 44 char *path; 45 -- 46 2.49.0 47