From: Yann E. MORIN Date: Tue, 30 Mar 2021 21:42:16 +0200 Subject: [Buildroot] [PATCH] package/libqmi: fix build when libc doesn't define ARPHRD_RAWIP In-Reply-To: <20210329223542.13907-1-aleksander@aleksander.es> References: <20210329223542.13907-1-aleksander@aleksander.es> Message-ID: <20210330194216.GZ24043@scaer> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Aleksander, All, On 2021-03-30 00:35 +0200, Aleksander Morgado spake thusly: > 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 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. > --- > ...-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..fb438676a9 > --- /dev/null > +++ b/package/libqmi/0001-libqmi-fix-build-when-ARPHRD_RAWIP-isn-t-defined-in-.patch > @@ -0,0 +1,39 @@ > +From 6745e19b07006611eb392e5b33095c63ee41fe92 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 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 > + #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 > + > -- > 2.30.1 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'