[xorg-x11-drv-synaptics/f17] Make sure BUG_RETURN_VAL is defined (#962721)

Peter Hutterer whot at fedoraproject.org
Wed May 15 22:29:09 UTC 2013


commit c4266887285b63d53ffd61df6a354deb85a81bb0
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu May 16 08:20:06 2013 +1000

    Make sure BUG_RETURN_VAL is defined (#962721)

 0001-Define-BUG_RETURN_VAL-if-not-defined.patch |   31 +++++++++++++++++++++++
 xorg-x11-drv-synaptics.spec                     |    7 ++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/0001-Define-BUG_RETURN_VAL-if-not-defined.patch b/0001-Define-BUG_RETURN_VAL-if-not-defined.patch
new file mode 100644
index 0000000..b0f6cf0
--- /dev/null
+++ b/0001-Define-BUG_RETURN_VAL-if-not-defined.patch
@@ -0,0 +1,31 @@
+From 05db36165298325d4ec21a0ecf879c4beda81907 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Thu, 16 May 2013 08:18:27 +1000
+Subject: [PATCH synaptics] Define BUG_RETURN_VAL if not defined
+
+First added to server 1.13, so may not be available in older servers (e.g.
+F17)
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ src/synaptics.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/synaptics.c b/src/synaptics.c
+index e00604b..cd4a6e7 100644
+--- a/src/synaptics.c
++++ b/src/synaptics.c
+@@ -79,6 +79,13 @@
+ #include "synapticsstr.h"
+ #include "synaptics-properties.h"
+ 
++#ifndef BUG_RETURN_VAL
++#define BUG_RETURN_VAL(cond, val) \
++        do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0)
++#define BUG_RETURN_VAL_MSG(cond, val, ...) \
++        do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return (val); } } while(0)
++#endif
++
+ typedef enum {
+     NO_EDGE = 0,
+     BOTTOM_EDGE = 1,
diff --git a/xorg-x11-drv-synaptics.spec b/xorg-x11-drv-synaptics.spec
index 8e503d5..4941118 100644
--- a/xorg-x11-drv-synaptics.spec
+++ b/xorg-x11-drv-synaptics.spec
@@ -8,7 +8,7 @@
 Name:           xorg-x11-drv-synaptics
 Summary:        Xorg X11 Synaptics touchpad input driver
 Version:        1.6.3
-Release:        3%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
+Release:        4%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
 URL:            http://www.x.org
 License:        MIT
 Group:          User Interface/X Hardware Support
@@ -23,6 +23,7 @@ Source2:        make-git-snapshot.sh
 Source3:        70-touchpad-quirks.rules
 
 Patch01:        0001-Fix-stack-smash-in-clickpad_guess_clickfingers.patch
+Patch02:        0001-Define-BUG_RETURN_VAL-if-not-defined.patch
 
 ExcludeArch:    s390 s390x %{?rhel:ppc ppc64}
 
@@ -82,6 +83,7 @@ Features:
 %prep
 %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
 %patch01 -p1
+%patch02 -p1
 
 %build
 autoreconf -v --install --force || exit 1
@@ -138,6 +140,9 @@ Development files for the Synaptics TouchPad for X.Org.
 
 
 %changelog
+* Thu May 16 2013 Peter Hutterer <peter.hutterer at redhat.com> 1.6.3-4
+- Make sure BUG_RETURN_VAL is defined (#962721)
+
 * Fri Apr 26 2013 Peter Hutterer <peter.hutterer at redhat.com> 1.6.3-3
 - Fix stack smash on apple touchpads (#877464), this time with a patch
 


More information about the scm-commits mailing list