Skip to contentSkip to conversation

package/lirc-tools: fix musl build

PATCH New Bernd Kuhls 2 participants 2 messages Jan 31, 2016 – Feb 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/lirc-tools: fix musl build

Inspired by
https://bug.tasktools.org/secure/attachment/10271/0001-Fix-build-with-musl-libc.patch

Fixes
http://autobuild.buildroot.net/results/603/603c4426c47220808305a416f3d60fec2d8c02a3/
http://autobuild.buildroot.net/results/c08/c08abddeb5f0d0d1adec63ab4390562e3cfe1087/

---
v2: re-formatted patch and sent upstream (Thomas)

 .../0004-lirc-lsremotes.cpp-Fix-musl-build.patch   | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch
package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch new file +35 -0
new file mode 100644
index 0000000..f3c03d7
@@ -0,0 +1,35 @@
+From 027fae88f1001f7a74a791e348c05a11255aac7f Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sun, 31 Jan 2016 14:23:02 +0100
+Subject: [PATCH 1/1] lirc-lsremotes.cpp: Fix musl build
+
+Inspired by
+https://bug.tasktools.org/secure/attachment/10271/0001-Fix-build-with-musl-libc.patch
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+Patch sent upstream: https://sourceforge.net/p/lirc/tickets/174/
+Adjusted path for lirc-tools 0.9.2
+
+ tools/lirc-lsremotes.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tools/lirc-lsremotes.cpp b/tools/lirc-lsremotes.cpp
+index 8f2c65b..baee10e 100644
+--- a/tools/lirc-lsremotes.c
++++ b/tools/lirc-lsremotes.c
+@@ -25,6 +25,11 @@
+ 
+ static const logchannel_t logchannel = LOG_APP;
+ 
++/* fixes build with musl libc */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif
++
+ static int opt_silent = 0;
+ static int opt_dump = 0;
+ 
+-- 
+2.7.0
+
Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 1/1 package/lirc-tools: fix musl build

Quoted 39 lines · Bernd Kuhls

Inspired by
https://bug.tasktools.org/secure/attachment/10271/0001-Fix-build-with-musl-libc.patch

Fixes
http://autobuild.buildroot.net/results/603/603c4426c47220808305a416f3d60fec2d8c02a3/
http://autobuild.buildroot.net/results/c08/c08abddeb5f0d0d1adec63ab4390562e3cfe1087/

---
v2: re-formatted patch and sent upstream (Thomas)

 .../0004-lirc-lsremotes.cpp-Fix-musl-build.patch   | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch
package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch new file +18 -0
new file mode 100644
index 0000000..f3c03d7
@@ -0,0 +1,35 @@
+From 027fae88f1001f7a74a791e348c05a11255aac7f Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sun, 31 Jan 2016 14:23:02 +0100
+Subject: [PATCH 1/1] lirc-lsremotes.cpp: Fix musl build
+
+Inspired by
+https://bug.tasktools.org/secure/attachment/10271/0001-Fix-build-with-musl-libc.patch
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+Patch sent upstream: https://sourceforge.net/p/lirc/tickets/174/
+Adjusted path for lirc-tools 0.9.2
+
+ tools/lirc-lsremotes.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tools/lirc-lsremotes.cpp b/tools/lirc-lsremotes.cpp
+index 8f2c65b..baee10e 100644

package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch line 28

Quoted 10 lines
package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch new file +10 -0
+--- a/tools/lirc-lsremotes.c
++++ b/tools/lirc-lsremotes.c
+@@ -25,6 +25,11 @@
+ 
+ static const logchannel_t logchannel = LOG_APP;
+ 
++/* fixes build with musl libc */
++#ifndef GLOB_BRACE
++#define GLOB_BRACE 0
++#endif

This can't be right... It will completely break the globbing, because the
pattern that is used later on in fact relies on braces. So instead, the whole thing should be rewritten to not use braces.

Regards,
Arnout

Quoted 8 lines
package/lirc-tools/0004-lirc-lsremotes.cpp-Fix-musl-build.patch new file +7 -0
++
+ static int opt_silent = 0;
+ static int opt_dump = 0;
+ 
+-- 
+2.7.0
+
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF