diff -rupN a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
--- a/modules/codec/avcodec/vaapi.c	2013-01-22 09:51:40.000000000 +0000
+++ b/modules/codec/avcodec/vaapi.c	2013-07-27 17:23:37.965202118 +0000
@@ -47,6 +47,7 @@
 
 #include <X11/Xlib.h>
 #include <va/va_x11.h>
+#include <va/va_compat.h>
 
 typedef struct
 {
