m4-1.4.14: Fix compilation on uclibc.
authorKhem Raj <raj.khem@gmail.com>
Wed, 2 Jun 2010 17:36:07 +0000 (10:36 -0700)
committerKhem Raj <raj.khem@gmail.com>
Wed, 2 Jun 2010 17:36:07 +0000 (10:36 -0700)
* uClibc does not expose sched_param the same way
  as glibc even though it pretends like glibc all
  interface dont match.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/m4/files/m4-uclibc-sched_param-def.patch [new file with mode: 0644]
recipes/m4/m4_1.4.14.bb

diff --git a/recipes/m4/files/m4-uclibc-sched_param-def.patch b/recipes/m4/files/m4-uclibc-sched_param-def.patch
new file mode 100644 (file)
index 0000000..47bdd3d
--- /dev/null
@@ -0,0 +1,19 @@
+uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc
+and is not needed too per standard. gnulib attempts to use it but we have to account
+for it because in this case uclibc does not behave like glibc.
+
+-Khem
+
+Index: m4-1.4.14/lib/spawn.in.h
+===================================================================
+--- m4-1.4.14.orig/lib/spawn.in.h      2010-06-01 14:27:59.394242980 -0700
++++ m4-1.4.14/lib/spawn.in.h   2010-06-01 14:28:28.202332200 -0700
+@@ -31,7 +31,7 @@
+ /* Get definitions of 'struct sched_param' and 'sigset_t'.
+    But avoid namespace pollution on glibc systems.  */
+-#ifndef __GLIBC__
++#if !defined __GLIBC__ || defined __UCLIBC__
+ # include <sched.h>
+ # include <signal.h>
+ #endif
index 3d33de1..c249d1c 100644 (file)
@@ -1,8 +1,10 @@
 require m4.inc
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
-SRC_URI += "file://f13-compile.patch;patch=1"
+SRC_URI += "file://f13-compile.patch \
+           file://m4-uclibc-sched_param-def.patch \
+          "
 
 SRC_URI[archive.md5sum] = "e6fb7d08d50d87e796069cff12a52a93"
 SRC_URI[archive.sha256sum] = "0885ffa93256353a96b1cf0bcbc4d639ed09953b687e6cc412c4048e656f4dd2"