summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Walle <bernhard@bwalle.de>2013-05-11 09:19:46 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-05-12 18:37:54 +0200
commit1d49dc653bd0332561b09a2737174b7b8a2002c1 (patch)
treed742ad03c00eff88545df9b8be929655735bcfe1
parenteebd53d4d84d0300adbfc249ccee4b5d0f0ff69c (diff)
downloadptxdist-1d49dc653bd0332561b09a2737174b7b8a2002c1.tar.gz
ptxdist-1d49dc653bd0332561b09a2737174b7b8a2002c1.tar.xz
kconfig: Fix build on Darwin
Darwin 12.2.0 (Mac OS 10.8) defines CIRCLEQ_HEAD but doesn't define CIRCLEQ_HEAD_INITIALIZER. Since mconf.c uses CIRCLEQ_HEAD_INITIALIZER, the build fails. A simple and safe fix is to always use our own copy of the CIRCLEQ_ macros on every platform. Include "missing.h" and don't include <sys/queue.h>. That works also on Linux, verified on current Arch Linux with glibc 2.17. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> [add patch to scripts/ptx-modifications] Signed-off-by: Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/kconfig/expr.h1
-rw-r--r--scripts/ptx-modifications/0008-kconfig-Fix-build-on-Darwin.patch34
-rw-r--r--scripts/ptx-modifications/series1
3 files changed, 35 insertions, 1 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 59402a3eb..041b08ef3 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -12,7 +12,6 @@ extern "C" {
#include <assert.h>
#include <stdio.h>
-#include <sys/queue.h>
#ifndef __cplusplus
#include <stdbool.h>
#endif
diff --git a/scripts/ptx-modifications/0008-kconfig-Fix-build-on-Darwin.patch b/scripts/ptx-modifications/0008-kconfig-Fix-build-on-Darwin.patch
new file mode 100644
index 000000000..3ebcdee17
--- /dev/null
+++ b/scripts/ptx-modifications/0008-kconfig-Fix-build-on-Darwin.patch
@@ -0,0 +1,34 @@
+From b55da7043756f75fa53519630d4f783cd6501fda Mon Sep 17 00:00:00 2001
+From: Bernhard Walle <bernhard@bwalle.de>
+Date: Sat, 16 Feb 2013 12:33:28 +0100
+Subject: [PATCH] kconfig: Fix build on Darwin
+
+Darwin 12.2.0 (Mac OS 10.8) defines CIRCLEQ_HEAD but doesn't define
+CIRCLEQ_HEAD_INITIALIZER. Since mconf.c uses CIRCLEQ_HEAD_INITIALIZER,
+the build fails.
+
+A simple and safe fix is to always use our own copy of the CIRCLEQ_
+macros on every platform. Include "missing.h" and don't include
+<sys/queue.h". That works also on Linux, verified on current Arch Linux
+with glibc 2.17.
+
+Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
+---
+ scripts/kconfig/expr.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
+index 59402a3..041b08e 100644
+--- a/scripts/kconfig/expr.h
++++ b/scripts/kconfig/expr.h
+@@ -12,7 +12,6 @@ extern "C" {
+
+ #include <assert.h>
+ #include <stdio.h>
+-#include <sys/queue.h>
+ #ifndef __cplusplus
+ #include <stdbool.h>
+ #endif
+--
+1.8.2.2
+
diff --git a/scripts/ptx-modifications/series b/scripts/ptx-modifications/series
index 621ad86a7..f89a629f7 100644
--- a/scripts/ptx-modifications/series
+++ b/scripts/ptx-modifications/series
@@ -9,3 +9,4 @@
0005-nconf-remove-special-P_COMMENT-output.patch
0006-mconf-fix-comment-on-exit.patch
0007-kconfig-define-CIRCLEQ_-macros-when-needed.patch
+0008-kconfig-Fix-build-on-Darwin.patch