File fix-gcc15.patch of Package wrath-darkplaces
diff --git a/dpsoftrast.c b/dpsoftrast.c index 770a395..fe0c526 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -1,5 +1,7 @@ #include <stdio.h> #include <string.h> +#define __USE_XOPEN +#define __USE_MISC #define _USE_MATH_DEFINES #include <math.h> #include "quakedef.h" diff --git a/makefile.inc b/makefile.inc index ef2163a..94593f0 100644 --- a/makefile.inc +++ b/makefile.inc @@ -174,7 +174,7 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_MENU) $(OBJ_SND_COMM # Compilation -CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../ +CFLAGS_COMMON=-std=c11 $(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../ CFLAGS_CLIENT=-DCONFIG_MENU -DCONFIG_CD $(CFLAGS_VIDEO_CAPTURE) CFLAGS_SERVER= CFLAGS_DEBUG=-ggdb diff --git a/quakedef.h b/quakedef.h index 64204b4..9792b88 100644 --- a/quakedef.h +++ b/quakedef.h @@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <ctype.h> #include <math.h> #include <string.h> +#include <strings.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> diff --git a/sys_shared.c b/sys_shared.c index 35044b1..5d1d07f 100644 --- a/sys_shared.c +++ b/sys_shared.c @@ -17,6 +17,7 @@ #pragma comment(lib, "winmm.lib") #endif #else +#define __USE_XOPEN_EXTENDED # include <unistd.h> # include <fcntl.h> # include <sys/time.h>