blob: 749176a8dee0afd6a48a3f313823d3f28e61b9b7 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Natanael Copa <ncopa@alpinelinux.org>
3Date: Thu, 8 Aug 2024 09:19:01 +0200
4Subject: libnetlink: fix build with musl and gcc 14
5
6Fixes compilation error with musl libc and gcc 14:
7
8../include/libnetlink.h: In function 'rta_getattr_be64':
9../include/libnetlink.h:280:16: error: implicit declaration of function 'htobe64' [-Wimplicit-function-declaration]
10 280 | return htobe64(rta_getattr_u64(rta));
11 | ^~~~~~~
12
13Reference: https://man7.org/linux/man-pages/man3/endian.3.html
14Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
15---
16 include/libnetlink.h | 1 +
17 1 file changed, 1 insertion(+)
18
19--- a/include/libnetlink.h
20+++ b/include/libnetlink.h
21@@ -2,6 +2,7 @@
22 #ifndef __LIBNETLINK_H__
23 #define __LIBNETLINK_H__ 1
24
25+#include <endian.h>
26 #include <stdio.h>
27 #include <string.h>
28 #include <asm/types.h>