From 904fb0738b6ed8a570e03c832b1ab85dba57491c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 12 Oct 2022 18:39:55 +0700 Subject: [PATCH] darkplaces: fix build for gcc-11 --- srcpkgs/darkplaces/patches/alignment.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 srcpkgs/darkplaces/patches/alignment.patch diff --git a/srcpkgs/darkplaces/patches/alignment.patch b/srcpkgs/darkplaces/patches/alignment.patch new file mode 100644 index 00000000000..dfd761d49c5 --- /dev/null +++ b/srcpkgs/darkplaces/patches/alignment.patch @@ -0,0 +1,42 @@ +Index: darkplaces-20140513/darkplaces/dpsoftrast.c +=================================================================== +--- darkplaces-20140513.orig/darkplaces/dpsoftrast.c ++++ darkplaces-20140513/darkplaces/dpsoftrast.c +@@ -177,7 +177,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Tr + float w[3]; + ALIGN(float attribs[DPSOFTRAST_ARRAY_TOTAL][3][4]); + } +-DPSOFTRAST_State_Triangle); ++) DPSOFTRAST_State_Triangle; + + #define DPSOFTRAST_CALCATTRIB(triangle, span, data, slope, arrayindex) { \ + slope = _mm_load_ps((triangle)->attribs[arrayindex][0]); \ +@@ -209,7 +209,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Sp + int depthbase; // depthbuffer value at x (add depthslope*startx to get first pixel's depthbuffer value) + int depthslope; // depthbuffer value pixel delta + } +-DPSOFTRAST_State_Span); ++) DPSOFTRAST_State_Span; + + #define DPSOFTRAST_DRAW_MAXSPANS 1024 + #define DPSOFTRAST_DRAW_MAXTRIANGLES 128 +@@ -299,8 +299,8 @@ typedef ALIGN(struct DPSOFTRAST_State_Th + DPSOFTRAST_State_Span spans[DPSOFTRAST_DRAW_MAXSPANS]; + DPSOFTRAST_State_Triangle triangles[DPSOFTRAST_DRAW_MAXTRIANGLES]; + unsigned char pixelmaskarray[DPSOFTRAST_DRAW_MAXSPANLENGTH+4]; // LordHavoc: padded to allow some termination bytes +-} +-DPSOFTRAST_State_Thread); ++}) ++DPSOFTRAST_State_Thread; + + typedef ALIGN(struct DPSOFTRAST_State_s + { +@@ -358,7 +358,7 @@ typedef ALIGN(struct DPSOFTRAST_State_s + + DPSOFTRAST_State_Command_Pool commandpool; + } +-DPSOFTRAST_State); ++) DPSOFTRAST_State; + + DPSOFTRAST_State dpsoftrast; +