summaryrefslogtreecommitdiff
path: root/src/compat-api.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-07-20 11:16:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-07-20 11:29:20 +0100
commit24ab9145c7748cb344b69d70b4f8eccb0c90db76 (patch)
tree375e6ad49e81c2727e45eae13b9590ad93c4ede3 /src/compat-api.h
parentdf0b2ce823e8bc9e994875ce349cf1da4cf8e402 (diff)
Update to ABI 22 and NotifyFd
ABI 22 brings in a new BlockHandler/WakeupHandler interface (SetNotifyFd) and throws out the current interface (albeit without delivering any improvements). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/compat-api.h')
-rw-r--r--src/compat-api.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat-api.h b/src/compat-api.h
index 64e3736c..05797a08 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -30,6 +30,7 @@
#include <xorg-server.h>
#include <xorgVersion.h>
+#include <xf86Module.h>
#include <picturestr.h>
#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
@@ -48,6 +49,10 @@
#define xf86ScrnToScreen(s) ((s)->pScreen)
#endif
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 22
+#define HAVE_NOTIFY_FD 1
+#endif
+
#ifndef XF86_SCRN_INTERFACE
#define SCRN_ARG_TYPE int
@@ -250,4 +255,9 @@ static inline void FreePixmap(PixmapPtr pixmap)
#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
#endif
+#if !HAVE_NOTIFY_FD
+#define SetNotifyFd(fd, cb, mode, data) AddGeneralSocket(fd);
+#define RemoveNotifyFd(fd) RemoveGeneralSocket(fd)
+#endif
+
#endif