Package: warsow
Version: 0.50+dfsg1-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd

Hi,

currently, warsow fails to build on GNU/Hurd [1].
The reason is the missing define's for hurd.
The attached patch, based on the one provided in #564108, makes warsow compile
correctly on Hurd.

[1] 
https://buildd.debian.org/fetch.cgi?pkg=warsow&arch=hurd-i386&ver=0.50+dfsg1-1&stamp=1262836589&file=log&as=raw

Thanks,
-- 
Pino
--- a/source/gameshared/q_arch.h
+++ b/source/gameshared/q_arch.h
@@ -147,7 +147,7 @@
 
 //==============================================
 
-#if defined ( __linux__ ) || defined ( __FreeBSD__ ) || defined ( __FreeBSD_kernel__ )
+#if defined ( __linux__ ) || defined ( __FreeBSD__ ) || defined ( __FreeBSD_kernel__ ) || defined ( __GNU__ )
 
 #define HAVE_INLINE
 
@@ -167,6 +167,8 @@
 #define BUILDSTRING "FreeBSD"
 #elif defined ( __FreeBSD_kernel__ )
 #define BUILDSTRING "kFreeBSD"
+#elif defined ( __GNU__ )
+#define BUILDSTRING "GNU"
 #else
 #define BUILDSTRING "Linux"
 #endif
@@ -178,6 +180,9 @@
 #elif defined ( __FreeBSD_kernel__ )
 #define ARCH "kfreebsd_i386"
 #define CPUSTRING "i386"
+#elif defined ( __GNU__ )
+#define ARCH "gnu_i386"
+#define CPUSTRING "i386"
 #else
 #define ARCH "i386"
 #define CPUSTRING "i386"
--- a/source/ref_gl/qgl.h
+++ b/source/ref_gl/qgl.h
@@ -66,7 +66,7 @@
 #include <GL/gl.h>
 #endif
 
-#if defined (__linux__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
+#if defined (__linux__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__GNU__)
 #include <GL/glx.h>
 #endif
 
--- a/source/ref_gl/r_glimp.h
+++ b/source/ref_gl/r_glimp.h
@@ -35,7 +35,7 @@
 #define QGL_GLX_EXT( type, name, params )
 #endif
 
-#if defined ( __linux__ ) || defined ( __FreeBSD__ ) || defined ( __FreeBSD_kernel__ )
+#if defined ( __linux__ ) || defined ( __FreeBSD__ ) || defined ( __FreeBSD_kernel__ ) || defined ( __GNU__ )
 #define QGL_WGL( type, name, params )
 #define QGL_WGL_EXT( type, name, params )
 #define QGL_GLX( type, name, params ) QGL_EXTERN type( APIENTRY * q ## name ) params;
--- a/source/snd_openal/qal.c
+++ b/source/snd_openal/qal.c
@@ -42,7 +42,7 @@
 #define SYMLOAD( x, y ) GetProcAddress( x, y )
 #define OBJFREE( x ) FreeLibrary( x )
 
-#elif defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __MACOSX__ || defined __sun
+#elif defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __MACOSX__ || defined __sun || defined __GNU__
 #include <dlfcn.h>
 #define OBJTYPE void *
 #define OBJLOAD( x ) dlopen( x, RTLD_LAZY | RTLD_GLOBAL )
@@ -53,7 +53,7 @@
 #error "No lib loading code defined for platform."
 #endif
 
-#if defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __MACOSX__
+#if defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __MACOSX__ || defined __GNU__
 #include <unistd.h>
 #include <sys/types.h>
 #endif

Reply via email to