From 91e97b56dcab8c9e404a19ac4e7599145c3bc948 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 30 Mar 2021 00:35:42 +0200 Subject: [PATCH] package/libqmi: fix build when libc doesn't define ARPHRD_RAWIP The ARPHRD_RAWIP symbol is used in the rmnet backend in the link management support now included in libqmi. If libc doesn't provide this symbol yet, define it ourselves. The symbol will only be used if rmnet is enabled in the kernel anyway. This patch will be included in the next libqmi 1.28.4. Signed-off-by: Aleksander Morgado [yann.morin.1998@free.fr: - do an actual backport now it's been applied upstream ] Signed-off-by: Yann E. MORIN --- ...-when-ARPHRD_RAWIP-isn-t-defined-in-.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch 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 +