]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: switch to c99-conformant alignment specification
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 1 Dec 2023 07:54:36 +0000 (08:54 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 1 Dec 2023 07:55:34 +0000 (08:55 +0100)
While the new standard specifier is nicer, it's not compatible with C99.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/lsfd-sock-xinfo.c
misc-utils/lsfd-unkn.c

index b8ad935e95ca2d967f938d837bb73db2efff4155..a293806c6634c8e071cafbf44d1afe0fde9b2a13 100644 (file)
@@ -34,7 +34,6 @@
                                   struct unix_diag_req */
 #include <sched.h>             /* for setns(2) */
 #include <search.h>            /* tfind, tsearch */
-#include <stdalign.h>          /* alignas */
 #include <stdint.h>
 #include <string.h>
 #include <sys/socket.h>                /* SOCK_* */
@@ -360,7 +359,7 @@ static void send_diag_request(int diagsd, void *req, size_t req_size,
                .msg_iov = iovecs,
        };
 
-       alignas(void *) uint8_t buf[8192];
+       __attribute__((aligned(sizeof(void *)))) uint8_t buf[8192];
 
        if (sendmsg(diagsd, &mhd, 0) < 0)
                return;
index 3b9902f58cd1f473797cd0482f2b7ee0f0634014..fdf24ed0176e214557d5534d2733ad7132cdc012 100644 (file)
@@ -20,7 +20,6 @@
  */
 
 #include <linux/bpf.h>
-#include <stdalign.h>
 #include <sys/syscall.h>
 #include <sys/timerfd.h>
 #include <time.h>