diff options
Diffstat (limited to 'xorg-server/glx')
-rw-r--r-- | xorg-server/glx/Makefile.am | 4 | ||||
-rw-r--r-- | xorg-server/glx/glapi.c | 7 | ||||
-rw-r--r-- | xorg-server/glx/unpack.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/xorg-server/glx/Makefile.am b/xorg-server/glx/Makefile.am index a23ae0a47..9d9fa3c31 100644 --- a/xorg-server/glx/Makefile.am +++ b/xorg-server/glx/Makefile.am @@ -58,6 +58,8 @@ if DRI2_AIGLX libglxdri_la_SOURCES += glxdri2.c endif +libglxdri_la_LIBADD = $(DLOPEN_LIBS) + libglx_la_SOURCES = \ $(indirect_sources) \ $(glapi_sources) \ @@ -95,3 +97,5 @@ libglx_la_SOURCES = \ swap_interval.c \ unpack.h \ xfont.c + +libglx_la_LIBADD = $(DLOPEN_LIBS) diff --git a/xorg-server/glx/glapi.c b/xorg-server/glx/glapi.c index fa3808e4d..d6a568e88 100644 --- a/xorg-server/glx/glapi.c +++ b/xorg-server/glx/glapi.c @@ -114,10 +114,15 @@ warn(void) } } +#if defined(__GNUC__) && (__GNUC__ > 2) +#define possibly_unused __attribute((unused)) +#else +#define possibly_unused +#endif #define KEYWORD1 static #define KEYWORD1_ALT static -#define KEYWORD2 GLAPIENTRY +#define KEYWORD2 GLAPIENTRY possibly_unused #define NAME(func) NoOp##func #define F NULL diff --git a/xorg-server/glx/unpack.h b/xorg-server/glx/unpack.h index a1dd17d52..90cb71bd7 100644 --- a/xorg-server/glx/unpack.h +++ b/xorg-server/glx/unpack.h @@ -47,7 +47,7 @@ ** Fetch a double from potentially unaligned memory. */ #ifdef __GLX_ALIGN64 -#define __GLX_MEM_COPY(dst,src,n) if (src && dst) memcpy(dst,src,n) +#define __GLX_MEM_COPY(dst,src,n) if (src != NULL && dst != NULL) memcpy(dst,src,n) #define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) #else #define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) |