Discussion:
[Linuxwacom-devel] [PATCH xf86-input-wacom] tests: Fix compilation under ABI 25 and greater
Jason Gerecke
2017-01-18 17:49:08 UTC
Permalink
The X server recently deprecated xf86BlockSIGIO and xf86UnblockSIGIO and
simultaneously defined them inline within xf86.h. The new inline definition
causes problems both because fake-symbols.c will end up redefining them,
and because the function bodies reference a symbol that does not get included
when building the tests. To fix these errors, update fake-symbols.c with
updated include guards and a definition of the undefined symbols.

Signed-off-by: Jason Gerecke <***@wacom.com>
---
test/fake-symbols.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index 6f2c10a..e649fb9 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -493,6 +493,7 @@ void TimerFree(OsTimerPtr timer)
{
}

+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 24
int
xf86BlockSIGIO (void)
{
@@ -503,6 +504,15 @@ void
xf86UnblockSIGIO (int wasset)
{
}
+#else
+void input_lock (void)
+{
+}
+
+void input_unlock (void)
+{
+}
+#endif

/* This is not the same as the X server one, but it'll do for the tests */
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
--
2.11.0
Peter Hutterer
2017-01-18 22:30:19 UTC
Permalink
Post by Jason Gerecke
The X server recently deprecated xf86BlockSIGIO and xf86UnblockSIGIO and
simultaneously defined them inline within xf86.h. The new inline definition
causes problems both because fake-symbols.c will end up redefining them,
and because the function bodies reference a symbol that does not get included
when building the tests. To fix these errors, update fake-symbols.c with
updated include guards and a definition of the undefined symbols.
Reviewed-by: Peter Hutterer <***@who-t.net>

Cheers,
Peter
Post by Jason Gerecke
---
test/fake-symbols.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index 6f2c10a..e649fb9 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -493,6 +493,7 @@ void TimerFree(OsTimerPtr timer)
{
}
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 24
int
xf86BlockSIGIO (void)
{
@@ -503,6 +504,15 @@ void
xf86UnblockSIGIO (int wasset)
{
}
+#else
+void input_lock (void)
+{
+}
+
+void input_unlock (void)
+{
+}
+#endif
/* This is not the same as the X server one, but it'll do for the tests */
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Linuxwacom-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Loading...