diff --git a/package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch b/package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch new file mode 100644 index 0000000000..1212878af4 --- /dev/null +++ b/package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch @@ -0,0 +1,39 @@ +From cdec8660427d2895415f1d84426e39d1ed145136 Mon Sep 17 00:00:00 2001 +From: Aleksander Morgado +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 +--- + 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 + #include + #include ++ + #include + #include ++ ++/* The if_arp.h from libc may not have this symbol yet */ ++#if !defined ARPHRD_RAWIP ++#define ARPHRD_RAWIP 519 ++#endif ++ + #include + #include + #include +-- +2.30.1 +