File fix-gcc15.patch of Package tome4

diff --git a/src/particles.c b/src/particles.c
index cd11b18..1a6d468 100644
--- a/src/particles.c
+++ b/src/particles.c
@@ -36,6 +36,7 @@
 #include "useshader.h"
 #include "physfs.h"
 #include "physfsrwops.h"
+#include "lua_externs.h"
 
 #define rng(x, y) (x + rand_div(1 + y - x))
 
@@ -281,7 +282,7 @@ static void particles_update(particles_type *ps, bool last, bool no_update)
 
 	GLfloat *vertices = ps->vertices;
 	GLfloat *colors = ps->colors;
-	GLshort *texcoords = ps->texcoords;
+	GLfloat *texcoords = ps->texcoords;
 
 	if (!no_update) ps->rotate += ps->rotate_v;
 
@@ -419,7 +420,7 @@ static void particles_draw(particles_type *ps, float x, float y, float zoom)
 	if (!ps->alive || !ps->vertices || !ps->colors || !ps->texcoords) return;
 	GLfloat *vertices = ps->vertices;
 	GLfloat *colors = ps->colors;
-	GLshort *texcoords = ps->texcoords;
+	GLfloat *texcoords = ps->texcoords;
 
 	if (x < -10000) x = -10000;
 	if (x > 10000) x = 10000;
@@ -438,7 +439,7 @@ static void particles_draw(particles_type *ps, float x, float y, float zoom)
 		tglActiveTexture(GL_TEXTURE1);
 		glBindTexture(GL_TEXTURE_2D, main_fbo->textures[0]);
 	}
-	glTexCoordPointer(2, GL_SHORT, 0, texcoords);
+	glTexCoordPointer(4, GL_FLOAT, 0, texcoords);
 	glColorPointer(4, GL_FLOAT, 0, colors);
 	glVertexPointer(2, GL_FLOAT, 0, vertices);
 
@@ -870,7 +871,7 @@ void thread_particle_init(particle_thread *pt, plist *l)
 	ps->batch_nb = 0;
 	ps->vertices = calloc(2*4*batch, sizeof(GLfloat)); // 2 coords, 4 vertices per particles
 	ps->colors = calloc(4*4*batch, sizeof(GLfloat)); // 4 color data, 4 vertices per particles
-	ps->texcoords = calloc(2*4*batch, sizeof(GLshort));
+	ps->texcoords = calloc(4*4*batch, sizeof(GLfloat));
 	ps->particles = calloc(nb, sizeof(particle_type));
 
 	// Locate the updator
diff --git a/src/particles.h b/src/particles.h
index 7434f0e..c23e945 100644
--- a/src/particles.h
+++ b/src/particles.h
@@ -58,7 +58,7 @@ struct s_particles_type {
 	int batch_nb;
 	GLfloat *vertices;
 	GLfloat *colors;
-	GLshort *texcoords;
+	GLfloat *texcoords;
 	bool alive;
 	bool i_want_to_die;
 	bool init;
diff --git a/src/physfs/archivers/bind_physfs.c b/src/physfs/archivers/bind_physfs.c
index d02d323..eed73fa 100644
--- a/src/physfs/archivers/bind_physfs.c
+++ b/src/physfs/archivers/bind_physfs.c
@@ -195,7 +195,7 @@ static PHYSFS_sint64 BIND_PHYSFS_getLastModTime(dvoid *opaque,
 
 
 static fvoid *doOpen(dvoid *opaque, const char *name,
-                     void *(*openFunc)(const char *filename),
+                     PHYSFS_File *(*openFunc)(const char *filename),
                      int *fileExists)
 {
     char *f = __BIND_PHYSFS_toDependent((char *) opaque, name, NULL);
diff --git a/src/physfs/physfs.c b/src/physfs/physfs.c
index 03eb86d..32e2c91 100644
--- a/src/physfs/physfs.c
+++ b/src/physfs/physfs.c
@@ -68,12 +68,13 @@ extern const PHYSFS_Archiver       __PHYSFS_Archiver_MVL;
 extern const PHYSFS_ArchiveInfo    __PHYSFS_ArchiveInfo_WAD;
 extern const PHYSFS_Archiver       __PHYSFS_Archiver_WAD;
 extern const PHYSFS_Archiver       __PHYSFS_Archiver_DIR;
+extern const PHYSFS_ArchiveInfo    __PHYSFS_ArchiveInfo_BIND_PHYSFS;
 extern const PHYSFS_Archiver       __PHYSFS_Archiver_BIND_PHYSFS;
 
 
 static const PHYSFS_ArchiveInfo *supported_types[] =
 {
-    &__PHYSFS_Archiver_BIND_PHYSFS,
+    &__PHYSFS_ArchiveInfo_BIND_PHYSFS,
 #if (defined PHYSFS_SUPPORTS_ZIP)
     &__PHYSFS_ArchiveInfo_SUBZIP,
     &__PHYSFS_ArchiveInfo_ZIP,
diff --git a/src/types.h b/src/types.h
index b5b46a0..dd6b984 100644
--- a/src/types.h
+++ b/src/types.h
@@ -23,7 +23,7 @@
 
 #ifndef __cplusplus
 #ifndef bool
-typedef char bool;
+#include <stdbool.h>
 #endif
 #endif
 
diff --git a/src/web.c b/src/web.c
index f12eebb..874f9db 100644
--- a/src/web.c
+++ b/src/web.c
@@ -19,6 +19,7 @@
     darkgod@te4.org
 */
 
+#include <unistd.h>
 #include "display.h"
 #include "lua.h"
 #include "lauxlib.h"
diff --git a/src/zlib/gzguts.h b/src/zlib/gzguts.h
index 990a4d2..c502713 100644
--- a/src/zlib/gzguts.h
+++ b/src/zlib/gzguts.h
@@ -18,6 +18,7 @@
 #  define ZLIB_INTERNAL
 #endif
 
+#include <unistd.h>
 #include <stdio.h>
 #include "zlib.h"
 #ifdef STDC
openSUSE Build Service is sponsored by