Cherry-picked patch to fix xmodmap's build

This commit is contained in:
Julien Cristau 2012-04-30 21:22:24 +02:00
parent b917b7ec8f
commit 8fd70577af
3 changed files with 66 additions and 0 deletions

2
debian/changelog vendored
View File

@ -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)

View File

@ -0,0 +1,63 @@
From 42f99a7a7b836f6f9704a7b1747eb722c93446ec Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
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 <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
---
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 <X11/Xos.h>
#include <X11/Xlib.h>
#include <stdio.h>
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 <X11/Xos.h>
#include <X11/Xlib.h>
#include <stdio.h>
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 <X11/Xos.h>
#include <X11/Xlib.h>
#include <stdio.h>
--
1.7.10

View File

@ -1 +1,2 @@
01_sessreg_implement_hostname_hashing.diff
02_xmodmap-include-config.h-before-system-headers.diff