diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-28 10:08:39 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-28 10:13:04 +0000 |
commit | 0e2458697848cf8c89c9d57fa9b64f0ea7bd0877 (patch) | |
tree | ee04a79c0f372c328dc675aa0edfedc41ea18a0e | |
parent | f18199fcfb3b052c198041fc05156ae3d9e6aee7 (diff) | |
download | cairo-0e2458697848cf8c89c9d57fa9b64f0ea7bd0877.tar.gz |
xlib/shm: Use shmstr.h instead of shmproto.h if available
Before it was known as shmproto.h, the wire protocol definition was to
be found in shmstr.h, so if we don't have the current version of libXext
try to use the older includes.
Reported-by: Sebastian Haas <sehaas@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/cairo-xlib-surface-shm.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 021ec8e2b..f523284ff 100644 --- a/configure.ac +++ b/configure.ac @@ -106,7 +106,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [ AC_MSG_RESULT(assuming no)) fi - AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h], [], [], + AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [], [#include <X11/Xlibint.h> #include <X11/Xproto.h>]) ]) diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c index a3d4385cb..44e6284b1 100644 --- a/src/cairo-xlib-surface-shm.c +++ b/src/cairo-xlib-surface-shm.c @@ -42,7 +42,7 @@ #include "cairo-xlib-private.h" #include "cairo-xlib-surface-private.h" -#if !HAVE_X11_EXTENSIONS_XSHM_H || !HAVE_X11_EXTENSIONS_SHMPROTO_H +#if !HAVE_X11_EXTENSIONS_XSHM_H || !(HAVE_X11_EXTENSIONS_SHMPROTO_H || HAVE_X11_EXTENSIONS_SHMSTR_H) void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) {} cairo_surface_t * @@ -144,7 +144,11 @@ void _cairo_xlib_display_fini_shm (cairo_xlib_display_t *display) {} #include <X11/Xlibint.h> #include <X11/Xproto.h> #include <X11/extensions/XShm.h> +#if HAVE_X11_EXTENSIONS_SHMPROTO_H #include <X11/extensions/shmproto.h> +#elif HAVE_X11_EXTENSIONS_SHMSTR_H +#include <X11/extensions/shmstr.h> +#endif #include <sys/ipc.h> #include <sys/shm.h> |