SOURCES: quake2forge-fix.patch (NEW) - build fixes (kill some warn...

qboosh qboosh at pld-linux.org
Sat Apr 28 14:02:31 CEST 2007


Author: qboosh                       Date: Sat Apr 28 12:02:31 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- build fixes (kill some warnings, -Werror is used)

---- Files affected:
SOURCES:
   quake2forge-fix.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/quake2forge-fix.patch
diff -u /dev/null SOURCES/quake2forge-fix.patch:1.1
--- /dev/null	Sat Apr 28 14:02:31 2007
+++ SOURCES/quake2forge-fix.patch	Sat Apr 28 14:02:26 2007
@@ -0,0 +1,47 @@
+--- quake2-0.3/src/q_sh.c.orig	2003-02-14 05:01:37.000000000 +0100
++++ quake2-0.3/src/q_sh.c	2007-04-28 13:25:17.409546491 +0200
+@@ -21,6 +21,11 @@
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+  */
+ 
++/* for mremap() */
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+--- quake2-0.3/src/gl_fxmesa.c.orig	2007-04-28 13:39:07.868871000 +0200
++++ quake2-0.3/src/gl_fxmesa.c	2007-04-28 13:48:27.456760766 +0200
+@@ -190,7 +190,7 @@ int GLimp_SetMode( unsigned int *pwidth,
+ 
+ 	ri.Con_Printf (PRINT_ALL, "...setting mode %d:", mode );
+ 
+-	if ( !ri.Vid_GetModeInfo( &width, &height, mode ) )
++	if ( !ri.Vid_GetModeInfo( (unsigned int *)&width, (unsigned int *)&height, mode ) )
+ 	{
+ 		ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
+ 		return rserr_invalid_mode;
+--- quake2-0.3/src/snd_ao.c.orig	2004-03-15 03:25:43.000000000 +0100
++++ quake2-0.3/src/snd_ao.c	2007-04-28 13:50:31.543832086 +0200
+@@ -157,7 +157,7 @@ void SNDDMA_Submit(void) {
+     /* ao_play returns success, not number of samples successfully output
+      * unlike alsa or arts, so we can only assume that the whole buffer
+      * made it out... though this makes updating si->dma->samplepos easy */
+-    if (ao_play(device, si->dma->buffer, si->dma->samples * samplesize) == 0) {
++    if (ao_play(device, (char *)si->dma->buffer, si->dma->samples * samplesize) == 0) {
+ 	Com_Printf("W: error occurred while playing buffer\n");
+ 	ao_close(device);
+ 	ao_shutdown();
+--- quake2-0.3/src/snd_alsa.c.orig	2004-03-15 03:25:43.000000000 +0100
++++ quake2-0.3/src/snd_alsa.c	2007-04-28 13:51:39.407699427 +0200
+@@ -101,7 +101,7 @@ qboolean SNDDMA_Init(struct sndinfo * s)
+     if (!si->dma->speed) {
+ 	for (i = 0; i < sizeof(tryrates); i++) {
+ 	    int dir = 0;
+-	    int test = tryrates[i];
++	    unsigned int test = tryrates[i];
+ 
+ 	    if ((err = snd_pcm_hw_params_set_rate_near(pcm_handle, hw_params,
+ 						       &test, &dir)) < 0) {
================================================================


More information about the pld-cvs-commit mailing list