From 5b2cfeae7a25de055c8db7b4b618f8a64e95eb8b Mon Sep 17 00:00:00 2001 From: Dmitry Ermilov Date: Tue, 3 Jul 2012 15:34:24 +0200 Subject: [PATCH] drm: fix build without X11 headers. Signed-off-by: Dmitry Ermilov Signed-off-by: Gwenole Beauchesne --- dummy_drv_video/dummy_drv_video.c | 4 ---- va/sysdeps.h | 1 + va/va.c | 22 +++++++++------------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c index a6e76b9..9d442fa 100644 --- a/dummy_drv_video/dummy_drv_video.c +++ b/dummy_drv_video/dummy_drv_video.c @@ -1056,10 +1056,6 @@ VAStatus dummy_PutSurface( ) { /* TODO */ - void *drawable = (void *)draw; - - (void)drawable; - return VA_STATUS_ERROR_UNKNOWN; } diff --git a/va/sysdeps.h b/va/sysdeps.h index d864721..77db28a 100644 --- a/va/sysdeps.h +++ b/va/sysdeps.h @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/va/va.c b/va/va.c index fdbe044..1ba4518 100644 --- a/va/va.c +++ b/va/va.c @@ -47,10 +47,6 @@ #define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; #define CHECK_STRING(s, ctx, var) if (!va_checkString(ctx->str_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; -#define Bool int -#define True 1 -#define False 0 - /* * read a config "env" for libva.conf or from environment setting * liva.conf has higher priority @@ -125,31 +121,31 @@ void va_infoMessage(const char *msg, ...) va_end(args); } -static Bool va_checkVtable(void *ptr, char *function) +static bool va_checkVtable(void *ptr, char *function) { if (!ptr) { va_errorMessage("No valid vtable entry for va%s\n", function); - return False; + return false; } - return True; + return true; } -static Bool va_checkMaximum(int value, char *variable) +static bool va_checkMaximum(int value, char *variable) { if (!value) { va_errorMessage("Failed to define max_%s in init\n", variable); - return False; + return false; } - return True; + return true; } -static Bool va_checkString(const char* value, char *variable) +static bool va_checkString(const char* value, char *variable) { if (!value) { va_errorMessage("Failed to define str_%s in init\n", variable); - return False; + return false; } - return True; + return true; } static inline int -- 2.7.4