summaryrefslogtreecommitdiff
path: root/hotfix-01_gcc12-support.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2022-07-16 17:16:49 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2022-07-16 17:16:49 -0700
commitf9b0620d50807183ec4fc932ca56e5d4c815f484 (patch)
tree2423d900582c52fc52e087c2fc80c9305fb99d87 /hotfix-01_gcc12-support.patch
parentUpdated to 2022-07-06-2051. (diff)
downloadcataclysm-bn-f9b0620d50807183ec4fc932ca56e5d4c815f484.tar.xz
Updated to 2022-07-11-1024.
Add gcc12 support hotfix. Disable several non-existent build flags to reduce build warnings.
Diffstat (limited to 'hotfix-01_gcc12-support.patch')
-rw-r--r--hotfix-01_gcc12-support.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/hotfix-01_gcc12-support.patch b/hotfix-01_gcc12-support.patch
new file mode 100644
index 0000000..a20eeb9
--- /dev/null
+++ b/hotfix-01_gcc12-support.patch
@@ -0,0 +1,17 @@
+--- a/src/sdl_font.cpp
++++ b/src/sdl_font.cpp
+@@ -12,12 +12,12 @@
+ {
+ const TTF_Font_Ptr fnt( TTF_OpenFontIndex( f.c_str(), size, faceIndex ) );
+ if( fnt ) {
+- char *style = TTF_FontFaceStyleName( fnt.get() );
++ const char *style = TTF_FontFaceStyleName( fnt.get() );
+ if( style != nullptr ) {
+ int faces = TTF_FontFaces( fnt.get() );
+ for( int i = faces - 1; i >= 0; i-- ) {
+ const TTF_Font_Ptr tf( TTF_OpenFontIndex( f.c_str(), size, i ) );
+- char *ts = nullptr;
++ const char *ts = nullptr;
+ if( tf ) {
+ if( nullptr != ( ts = TTF_FontFaceStyleName( tf.get() ) ) ) {
+ if( lcequal( ts, style ) && TTF_FontHeight( tf.get() ) <= size ) {