Recipe for target 'build/SDL_x11dyn.lo' failed

I stumbled upon this error when trying to compile SDL 1.2.15 on Debian:

Code:
libtool: compile: gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/video/x11/SDL_x11dyn.c -fPIC -DPIC -o build/.libs/SDL_x11dyn.o
./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for ?_XData32?
SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
^
./src/video/x11/SDL_x11dyn.c:95:5: note: in definition of macro ?SDL_X11_SYM?
rc fn params { ret p##fn args ; }
^
In file included from ./src/video/x11/SDL_x11dyn.h:34:0,
from ./src/video/x11/SDL_x11dyn.c:26:
/usr/include/X11/Xlibint.h:568:12: note: previous declaration of ?_XData32? was here
extern int _XData32(
^
build-deps:1129: recipe for target ‘build/SDL_x11dyn.lo’ failed
make: *** [build/SDL_x11dyn.lo] Error 1

Here’s config.log (http://s000.tinyupload.com/index.php?file_id=03342184691539691200).
I’m not sure if this is my fault, or a bug in the compiler.

gcc and libx11 versions:

Code:

$ apt-cache policy gcc
gcc:
Installed: 4:4.9.0-3
Candidate: 4:4.9.0-3
Version table:
*** 4:4.9.0-3 0
500 http://http.debian.net/debian/ testing/main amd64 Packages
500 http://ftp.ro.debian.org/debian/ testing/main amd64 Packages
100 /var/lib/dpkg/status

$ apt-cache policy libx11-dev
libx11-dev:
Installed: 2:1.6.2-2
Candidate: 2:1.6.2-2
Version table:
*** 2:1.6.2-2 0
500 http://http.debian.net/debian/ testing/main amd64 Packages
500 http://ftp.ro.debian.org/debian/ testing/main amd64 Packages
100 /var/lib/dpkg/status