summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-03-14 17:03:38 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-14 13:17:42 +0000
commit3882f40e57510c4806dac36490af84b4f0ff9441 (patch)
treef6d2bd8d060347e975cb7d298324306b3c9b124d /meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch
parent897cdb692b27f5f7137ea0a58cdea99d21c66f3f (diff)
downloadpoky-3882f40e57510c4806dac36490af84b4f0ff9441.tar.gz
libsdl: update to 1.2.15
Update libsdl to 1.2.15. Patch add.XGetRequest.symbol.patch is merged by upstream, so remove it. (From OE-Core rev: 94e18a1c574b97ba87724c0fea79d2af77ba4186) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch')
-rw-r--r--meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch79
1 files changed, 0 insertions, 79 deletions
diff --git a/meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch b/meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch
deleted file mode 100644
index 33ba8ecde9..0000000000
--- a/meta/recipes-graphics/libsdl/libsdl-1.2.14/add.XGetRequest.symbol.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1From e49fe9e2d75764d2d7ef79ab4252a1f6b99adcd3 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Thu, 23 Feb 2012 18:38:19 +0100
4Subject: [PATCH] _XGetRequest API was backported to libx11-1.4.4 in:
5 http://git.openembedded.org/openembedded-core/commit/?id=e08604800fe1cb8f240f53c147ceb4ee08a29b91
6
7This breaks e.g. libsdl-image build with:
8| /OE/shr-core/tmp-eglibc/sysroots/qemux86-64/usr/lib/libSDL.so: undefined reference to `_XGetRequest'
9
10For details see: https://bugzilla.redhat.com/show_bug.cgi?id=782251
11
12Upstream-Status: Accepted
13---
14 src/video/x11/SDL_x11dyn.c | 24 ++++++++++++++++++++++++
15 src/video/x11/SDL_x11sym.h | 6 ++++++
16 2 files changed, 30 insertions(+), 0 deletions(-)
17
18diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c
19index 4e549b3..a7e800e 100644
20--- a/src/video/x11/SDL_x11dyn.c
21+++ b/src/video/x11/SDL_x11dyn.c
22@@ -109,6 +109,21 @@ char *(*pXGetICValues)(XIC, ...) = NULL;
23 #undef SDL_X11_SYM
24
25
26+static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len)
27+{
28+ xReq *req;
29+ WORD64ALIGN
30+ if (dpy->bufptr + len > dpy->bufmax)
31+ _XFlush(dpy);
32+ dpy->last_req = dpy->bufptr;
33+ req = (xReq*)dpy->bufptr;
34+ req->reqType = type;
35+ req->length = len / 4;
36+ dpy->bufptr += len;
37+ dpy->request++;
38+ return req;
39+}
40+
41 static int x11_load_refcount = 0;
42
43 void SDL_X11_UnloadSymbols(void)
44@@ -168,6 +183,15 @@ int SDL_X11_LoadSymbols(void)
45 X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8,(void **)&pXGetICValues);
46 #endif
47
48+ /*
49+ * In case we're built with newer Xlib headers, we need to make sure
50+ * that _XGetRequest() is available, even on older systems.
51+ * Otherwise, various Xlib macros we use will call a NULL pointer.
52+ */
53+ if (!SDL_X11_HAVE_XGETREQUEST) {
54+ p_XGetRequest = SDL_XGetRequest_workaround;
55+ }
56+
57 if (SDL_X11_HAVE_BASEXLIB) { /* all required symbols loaded. */
58 SDL_ClearError();
59 } else {
60diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
61index 3dfa146..f1e7841 100644
62--- a/src/video/x11/SDL_x11sym.h
63+++ b/src/video/x11/SDL_x11sym.h
64@@ -170,6 +170,12 @@ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,
65 #endif
66
67 /*
68+ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes.
69+ */
70+SDL_X11_MODULE(XGETREQUEST)
71+SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return)
72+
73+/*
74 * These only show up on some variants of Unix.
75 */
76 #if defined(__osf__)
77--
781.7.2.5
79