Skip to contentSkip to conversation

taskd: add patch to fix musl build issue

PATCH New Jörg Krause 2 participants 2 messages May 6, 2016 – May 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 taskd: add patch to fix musl build issue

taskd checks for get_current_dir_name but forgets to add a cmakedefine in cmake.h.in, so HAVE_GET_CURRENT_DIR_NAME is always undefined.

CMake detects correctly that the musl C library defines get_current_dir_name. However, as HAVE_GET_CURRENT_DIR_NAME is not set, the block of code evaluated cannot be compiled as musl does not define PATH_MAX.

Reported upstream:
https://bug.tasktools.org/browse/TD-120

Fixes:
http://autobuild.buildroot.net/results/121/121aa15235e06c80d65428626da5a2da9d11c9ba/

---
 ...ing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch
package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch new file +28 -0
new file mode 100644
index 0000000..960c71b
@@ -0,0 +1,28 @@
+From b067ab9bf667bb9257bb9eeaa6bf25f9a1a17f06 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]>
+Date: Fri, 6 May 2016 23:35:42 +0200
+Subject: [PATCH] Fix missing cmakedefine HAVE_GET_CURRENT_DIR_NAME
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: J?rg Krause <[email protected]>
+---
+ cmake.h.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmake.h.in b/cmake.h.in
+index 4124ce9..0b8f9d0 100644
+--- a/cmake.h.in
++++ b/cmake.h.in
+@@ -51,6 +51,7 @@
+ #cmakedefine HAVE_ST_BIRTHTIME
+ 
+ /* Functions */
++#cmakedefine HAVE_GET_CURRENT_DIR_NAME
+ #cmakedefine HAVE_TIMEGM
+ #cmakedefine HAVE_UUID_UNPARSE_LOWER
+ 
+-- 
+2.8.2
+
Signature · 1 line
2.8.2
#1 lore raw

PATCH 1/1 taskd: add patch to fix musl build issue

Hello,

Quoted 7 lines · J?rg Krause

taskd checks for get_current_dir_name but forgets to add a cmakedefine in cmake.h.in, so HAVE_GET_CURRENT_DIR_NAME is always undefined.

CMake detects correctly that the musl C library defines get_current_dir_name. However, as HAVE_GET_CURRENT_DIR_NAME is not set, the block of code evaluated cannot be compiled as musl does not define PATH_MAX.

Quoted 7 lines

Reported upstream:
https://bug.tasktools.org/browse/TD-120

Fixes:
http://autobuild.buildroot.net/results/121/121aa15235e06c80d65428626da5a2da9d11c9ba/

Thanks, applied!

I saw that you asked why I rejected some of Bernd's patches fixing musl issues, and Arnout answered you.

This patch from you is exactly what I expect: a real analysis of the problem, a proper Git formatted patch that has a good explanation other than "fixes musl build" and an issue reported upstream. Simply perfect.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com