From 8fd70577afcb08e6b59e2e6e1bc688842f145fc4 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 30 Apr 2012 21:22:24 +0200 Subject: [PATCH] Cherry-picked patch to fix xmodmap's build --- debian/changelog | 2 + ...nclude-config.h-before-system-headers.diff | 63 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 66 insertions(+) create mode 100644 debian/patches/02_xmodmap-include-config.h-before-system-headers.diff diff --git a/debian/changelog b/debian/changelog index b9398cc..438217e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ x11-xserver-utils (7.6+4) UNRELEASED; urgency=low * xmodmap 1.0.7. * Don't use dh_testroot in debian/rules clean. * Rediff 01_sessreg_implement_hostname_hashing.diff. + * 02_xmodmap-include-config.h-before-system-headers.diff: patch from + upstream git to fix a build failure. [ Moritz Muehlenhoff ] * Enable hardened build flags (closes: #655503) diff --git a/debian/patches/02_xmodmap-include-config.h-before-system-headers.diff b/debian/patches/02_xmodmap-include-config.h-before-system-headers.diff new file mode 100644 index 0000000..583c99c --- /dev/null +++ b/debian/patches/02_xmodmap-include-config.h-before-system-headers.diff @@ -0,0 +1,63 @@ +From 42f99a7a7b836f6f9704a7b1747eb722c93446ec Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Mon, 23 Apr 2012 07:28:39 -0700 +Subject: [PATCH] include config.h before stdio.h & other system headers + +Ensures definitions like _GNU_SOURCE are visible when needed. + +Signed-off-by: Alan Coopersmith +Reviewed-by: Peter Hutterer +--- + exec.c | 4 ++++ + pf.c | 4 ++++ + xmodmap.c | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/xmodmap/exec.c b/xmodmap/exec.c +index dbcb669..419b10e 100644 +--- a/xmodmap/exec.c ++++ b/xmodmap/exec.c +@@ -54,6 +54,10 @@ from The Open Group. + * original xmodmap, written by David Rosenthal, of Sun Microsystems. + */ + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include + #include +diff --git a/xmodmap/pf.c b/xmodmap/pf.c +index 0eb0f55..3f0c3f4 100644 +--- a/xmodmap/pf.c ++++ b/xmodmap/pf.c +@@ -26,6 +26,10 @@ from The Open Group. + + */ + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include + #include +diff --git a/xmodmap/xmodmap.c b/xmodmap/xmodmap.c +index 58a8e70..0f89629 100644 +--- a/xmodmap/xmodmap.c ++++ b/xmodmap/xmodmap.c +@@ -26,6 +26,10 @@ from The Open Group. + + */ + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include + #include +-- +1.7.10 + diff --git a/debian/patches/series b/debian/patches/series index 2044539..3b892b3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 01_sessreg_implement_hostname_hashing.diff +02_xmodmap-include-config.h-before-system-headers.diff