kumquat-buildroot/package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch

40 lines
1.2 KiB
Diff
Raw Normal View History

From cdec8660427d2895415f1d84426e39d1ed145136 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado <aleksander@aleksander.es>
Date: Tue, 30 Mar 2021 00:13:45 +0200
Subject: [PATCH] libqmi: fix build when ARPHRD_RAWIP isn't defined in libc
The kernel may be new enough to have rmnet support, but it could be
that libc doesn't have ARPHRD_RAWIP defined yet; if so, just define it
ourselves.
Fixes http://autobuild.buildroot.org/results/c8853b7161bd85d46c1282c6c097e7ef4042ae68
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
---
src/libqmi-glib/qmi-net-port-manager-rmnet.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/libqmi-glib/qmi-net-port-manager-rmnet.c b/src/libqmi-glib/qmi-net-port-manager-rmnet.c
index eb26129..571d4c4 100644
--- a/src/libqmi-glib/qmi-net-port-manager-rmnet.c
+++ b/src/libqmi-glib/qmi-net-port-manager-rmnet.c
@@ -24,8 +24,15 @@
#include <linux/if_link.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+
#include <net/if.h>
#include <net/if_arp.h>
+
+/* The if_arp.h from libc may not have this symbol yet */
+#if !defined ARPHRD_RAWIP
+#define ARPHRD_RAWIP 519
+#endif
+
#include <sys/socket.h>
#include <sys/types.h>
#include <string.h>
--
2.30.1