package/libqmi: fix build when libc doesn't define ARPHRD_RAWIP
PATCH 1/1 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.
--- ...-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
package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 6745e19b07006611eb392e5b33095c63ee41fe92 Mon Sep 17 00:00:00 2001 +From: Aleksander Morgado <[email protected]> +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 <[email protected]> +--- + 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 bd6727e3..82935bb8 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 +
Signature · 1 line
2.30.1
Yann E. MORIN
AppliedPATCH 1/1 package/libqmi: fix build when libc doesn't define ARPHRD_RAWIP
Aleksander, All,
On 2021-03-30 00:35 +0200, Aleksander Morgado spake thusly:
Quoted 9 lines
The
ARPHRD_RAWIPsymbol 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 <[email protected]>
It's been applied upstream, so I've done a true nackport ot have the proper upstream sha1 in the patch.
Applied to master, thanks! :-)
Regards,
Yann E. MORIN.
Quoted 57 lines
--- ...-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-.patchpackage/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch new file +39
-0@@ -0,0 +1,39 @@ +From 6745e19b07006611eb392e5b33095c63ee41fe92 Mon Sep 17 00:00:00 2001 +From: Aleksander Morgado <[email protected]> +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 <[email protected]> +--- + 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 bd6727e3..82935bb8 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 +Signature · 6 lines
2.30.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'