diff mbox series

[meta-oe] libgpiod-1.x: Fix build on musl

Message ID 20240611045820.490708-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe] libgpiod-1.x: Fix build on musl | expand

Commit Message

Khem Raj June 11, 2024, 4:58 a.m. UTC
get a patch backported to fix the build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 ...nclude-missing-libgen.h-for-basename.patch | 25 +++++++++++++++++++
 .../libgpiod/libgpiod_1.6.4.bb                |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch

Comments

Bartosz Golaszewski June 11, 2024, 7:34 a.m. UTC | #1
On Tue, Jun 11, 2024 at 6:58 AM Khem Raj via lists.openembedded.org
<raj.khem=gmail.com@lists.openembedded.org> wrote:
>
> get a patch backported to fix the build
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  ...nclude-missing-libgen.h-for-basename.patch | 25 +++++++++++++++++++
>  .../libgpiod/libgpiod_1.6.4.bb                |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch
>
> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch b/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch
> new file mode 100644
> index 0000000000..d6da9ba6ea
> --- /dev/null
> +++ b/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch
> @@ -0,0 +1,25 @@
> +From b0ea35260ded2fbd41af46f2f18a61fb783a35be Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Mon, 10 Jun 2024 11:09:31 -0700
> +Subject: [PATCH] Include missing libgen.h for basename()
> +
> +This is an error with newer musl otherwise
> +

Why not keep the original author and commit message?

Bart

> +Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=f6444fb306d6]
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + lib/core.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/lib/core.c b/lib/core.c
> +index 35dcd8e..cf1d677 100644
> +--- a/lib/core.c
> ++++ b/lib/core.c
> +@@ -10,6 +10,7 @@
> + #include <errno.h>
> + #include <fcntl.h>
> + #include <gpiod.h>
> ++#include <libgen.h>
> + #include <limits.h>
> + #include <linux/gpio.h>
> + #include <poll.h>
> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
> index 111a5727ba..4daa8fface 100644
> --- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
> +++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
> @@ -3,6 +3,7 @@ require libgpiod.inc
>  LICENSE = "LGPL-2.1-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
>
> +SRC_URI += "file://0001-Include-missing-libgen.h-for-basename.patch"
>  SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5"
>
>  FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#110813): https://lists.openembedded.org/g/openembedded-devel/message/110813
> Mute This Topic: https://lists.openembedded.org/mt/106608146/3618139
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [brgl@bgdev.pl]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Bartosz Golaszewski June 11, 2024, 9:05 a.m. UTC | #2
On Tue, Jun 11, 2024 at 9:35 AM Bartosz Golaszewski via
lists.openembedded.org <brgl=bgdev.pl@lists.openembedded.org> wrote:
>
> On Tue, Jun 11, 2024 at 6:58 AM Khem Raj via lists.openembedded.org
> <raj.khem=gmail.com@lists.openembedded.org> wrote:
> >
> > get a patch backported to fix the build
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---

I made a bug-fix release (v1.6.5) and sent an alternative that simply
updates the package and disables the C++ tests.

Bart
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch b/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch
new file mode 100644
index 0000000000..d6da9ba6ea
--- /dev/null
+++ b/meta-oe/recipes-support/libgpiod/libgpiod-1.x/0001-Include-missing-libgen.h-for-basename.patch
@@ -0,0 +1,25 @@ 
+From b0ea35260ded2fbd41af46f2f18a61fb783a35be Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 10 Jun 2024 11:09:31 -0700
+Subject: [PATCH] Include missing libgen.h for basename()
+
+This is an error with newer musl otherwise
+
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=f6444fb306d6]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/core.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/core.c b/lib/core.c
+index 35dcd8e..cf1d677 100644
+--- a/lib/core.c
++++ b/lib/core.c
+@@ -10,6 +10,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <gpiod.h>
++#include <libgen.h>
+ #include <limits.h>
+ #include <linux/gpio.h>
+ #include <poll.h>
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
index 111a5727ba..4daa8fface 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
@@ -3,6 +3,7 @@  require libgpiod.inc
 LICENSE = "LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
 
+SRC_URI += "file://0001-Include-missing-libgen.h-for-basename.patch"
 SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5"
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:"