mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-31 18:20:14 +01:00
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>
This commit is contained in:
parent
f18199fcfb
commit
0e24586978
2 changed files with 6 additions and 2 deletions
|
|
@ -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>])
|
||||
])
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue