All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0
@ 2020-05-03  7:53 Bernd Kuhls
  2020-05-09 21:30 ` Thomas Petazzoni
  2021-01-09 22:06 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Bernd Kuhls @ 2020-05-03  7:53 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/31b/31bf9814a5a45081cf58675a9f7fa7183b4ef0bf/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 ...nistd.h-include-to-fix-build-with-mu.patch | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch

diff --git a/package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch b/package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch
new file mode 100644
index 0000000000..5e64103c34
--- /dev/null
+++ b/package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch
@@ -0,0 +1,34 @@
+From 9e21f3f91195a7c4a73ebf112823f7dbb94732db Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Sun, 3 May 2020 09:42:57 +0200
+Subject: [PATCH] uuid.c: add asm/unistd.h include to fix build with
+ musl-1.2.0
+
+Build was broken due to musl commit
+https://git.musl-libc.org/cgit/musl/commit/?id=5a105f19b5aae79dd302899e634b6b18b3dcd0d6
+
+To fix also include asm/unistd.h following the configure.ac check for
+the __NR_clock_gettime syscall.
+
+Patch sent upstream: https://sourceforge.net/p/minidlna/patches/182/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ uuid.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/uuid.c b/uuid.c
+index 6e6a9ec..78f110c 100644
+--- a/uuid.c
++++ b/uuid.c
+@@ -36,6 +36,7 @@
+ #if HAVE_MACH_MACH_TIME_H
+ #include <mach/mach_time.h>
+ #elif HAVE_CLOCK_GETTIME_SYSCALL
++#include <asm/unistd.h>
+ #include <sys/syscall.h>
+ #endif
+ 
+-- 
+2.26.2
+
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0
  2020-05-03  7:53 [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0 Bernd Kuhls
@ 2020-05-09 21:30 ` Thomas Petazzoni
  2020-05-10 10:19   ` Bernd Kuhls
  2021-01-09 22:06 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2020-05-09 21:30 UTC (permalink / raw)
  To: buildroot

On Sun,  3 May 2020 09:53:12 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> diff --git a/package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch b/package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch
> new file mode 100644
> index 0000000000..5e64103c34
> --- /dev/null
> +++ b/package/minidlna/0001-uuid.c-add-asm-unistd.h-include-to-fix-build-with-mu.patch
> @@ -0,0 +1,34 @@
> +From 9e21f3f91195a7c4a73ebf112823f7dbb94732db Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <bernd.kuhls@t-online.de>
> +Date: Sun, 3 May 2020 09:42:57 +0200
> +Subject: [PATCH] uuid.c: add asm/unistd.h include to fix build with
> + musl-1.2.0
> +
> +Build was broken due to musl commit
> +https://git.musl-libc.org/cgit/musl/commit/?id=5a105f19b5aae79dd302899e634b6b18b3dcd0d6
> +
> +To fix also include asm/unistd.h following the configure.ac check for
> +the __NR_clock_gettime syscall.
> +
> +Patch sent upstream: https://sourceforge.net/p/minidlna/patches/182/
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +---
> + uuid.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/uuid.c b/uuid.c
> +index 6e6a9ec..78f110c 100644
> +--- a/uuid.c
> ++++ b/uuid.c
> +@@ -36,6 +36,7 @@
> + #if HAVE_MACH_MACH_TIME_H
> + #include <mach/mach_time.h>
> + #elif HAVE_CLOCK_GETTIME_SYSCALL
> ++#include <asm/unistd.h>

I am not an expert with all the time changes in the kernel/libc, but
this seems quite wrong:

 (1) Including <asm/...> headers should typically not be done

 (2) The commit at
     https://git.musl-libc.org/cgit/musl/commit/?id=5a105f19b5aae79dd302899e634b6b18b3dcd0d6
     says:

this patch renames the syscalls on 32-bit archs to clock_gettime32 and
gettimeofday_time32, so that applications using the original names
will fail to build without being fixed.

     So the breakage is intentional, and it should be fixed in the
     application.

So the big question is why does minidlna wants to do the syscall
directly instead of using clock_gettime(), which is the right thing to
do ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0
  2020-05-09 21:30 ` Thomas Petazzoni
@ 2020-05-10 10:19   ` Bernd Kuhls
  0 siblings, 0 replies; 4+ messages in thread
From: Bernd Kuhls @ 2020-05-10 10:19 UTC (permalink / raw)
  To: buildroot

Am Sat, 09 May 2020 23:30:34 +0200 schrieb Thomas Petazzoni:

> So the big question is why does minidlna wants to do the syscall
> directly instead of using clock_gettime(), which is the right thing to
> do ?

Hi Thomas,

no idea, let's wait for an upstream reponse to my patch.

Regards, Bernd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0
  2020-05-03  7:53 [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0 Bernd Kuhls
  2020-05-09 21:30 ` Thomas Petazzoni
@ 2021-01-09 22:06 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2021-01-09 22:06 UTC (permalink / raw)
  To: buildroot

On Sun,  3 May 2020 09:53:12 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Fixes:
> http://autobuild.buildroot.net/results/31b/31bf9814a5a45081cf58675a9f7fa7183b4ef0bf/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

minidlna now builds fine with musl: since we bumped to minidlna 1.3.0,
there are no longer any failures in the autobuilders on minidlna.

And indeed, upstream commit 347aafa6d7275cbb44963f10cf4d12168bc3cb8c
was made to fix musl issues.

So I've marked this patch as not applicable.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-09 22:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03  7:53 [Buildroot] [PATCH 1/1] package/minidlna: fix build with musl-1.2.0 Bernd Kuhls
2020-05-09 21:30 ` Thomas Petazzoni
2020-05-10 10:19   ` Bernd Kuhls
2021-01-09 22:06 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.