summaryrefslogtreecommitdiff
path: root/recipes/xorg-util
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/xorg-util')
-rw-r--r--recipes/xorg-util/util-macros-1.4.1/malloc_zero_returns_null.patch27
-rw-r--r--recipes/xorg-util/util-macros-native_1.4.1.bb7
-rw-r--r--recipes/xorg-util/util-macros_1.4.1.bb8
3 files changed, 42 insertions, 0 deletions
diff --git a/recipes/xorg-util/util-macros-1.4.1/malloc_zero_returns_null.patch b/recipes/xorg-util/util-macros-1.4.1/malloc_zero_returns_null.patch
new file mode 100644
index 0000000000..0d8a9cd9ec
--- /dev/null
+++ b/recipes/xorg-util/util-macros-1.4.1/malloc_zero_returns_null.patch
@@ -0,0 +1,27 @@
+From 48e2b3d0ee8d637d83b88bf29c6d417f61aaa0e4 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@canonical.com>
+Date: Sat, 10 Oct 2009 12:28:28 +0000
+Subject: Use conservative default for malloc(0) when cross-compiling #24460
+
+When cross-compiling, AC_RUN_IFELSE can't run test programs.
+MALLOC_ZERO_RETURNS_NULL=yes is a conservative default in this case.
+
+Signed-off-by: Colin Watson <cjwatson@canonical.com>
+Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+---
+diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
+index 6f9635f..393186f 100644
+--- a/xorg-macros.m4.in
++++ b/xorg-macros.m4.in
+@@ -339,7 +339,8 @@ main() {
+ exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+ }],
+ [MALLOC_ZERO_RETURNS_NULL=yes],
+- [MALLOC_ZERO_RETURNS_NULL=no])
++ [MALLOC_ZERO_RETURNS_NULL=no],
++ [MALLOC_ZERO_RETURNS_NULL=yes])
+ fi
+ AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+
+--
+cgit v0.8.3-6-g21f6
diff --git a/recipes/xorg-util/util-macros-native_1.4.1.bb b/recipes/xorg-util/util-macros-native_1.4.1.bb
new file mode 100644
index 0000000000..618e78f116
--- /dev/null
+++ b/recipes/xorg-util/util-macros-native_1.4.1.bb
@@ -0,0 +1,7 @@
+require util-macros_${PV}.bb
+
+inherit native
+
+XORG_PN = "util-macros"
+
+S = "${WORKDIR}/util-macros-${PV}"
diff --git a/recipes/xorg-util/util-macros_1.4.1.bb b/recipes/xorg-util/util-macros_1.4.1.bb
new file mode 100644
index 0000000000..7e0b7d5cc9
--- /dev/null
+++ b/recipes/xorg-util/util-macros_1.4.1.bb
@@ -0,0 +1,8 @@
+require xorg-util-common.inc
+
+DESCRIPTION = "X autotools macros"
+PE = "1"
+
+SRC_URI += " file://malloc_zero_returns_null.patch;patch=1"
+
+ALLOW_EMPTY = "1"