Add gdal-fortify-source.patch

This commit is contained in:
Sandro Mani 2022-11-01 11:13:08 +01:00
parent 0632849332
commit 5406afbc89
2 changed files with 25 additions and 0 deletions

21
gdal-fortify-source.patch Normal file
View File

@ -0,0 +1,21 @@
diff -rupN gdal-3.5.3-fedora/port/vsipreload.cpp gdal-3.5.3-fedora-new/port/vsipreload.cpp
--- gdal-3.5.3-fedora/port/vsipreload.cpp 2022-10-21 16:57:18.000000000 +0200
+++ gdal-3.5.3-fedora-new/port/vsipreload.cpp 2022-11-01 11:11:12.423024266 +0100
@@ -46,6 +46,17 @@
// LD_PRELOAD=./vsipreload.so ls -al /vsicurl/http://download.osgeo.org/gdal/data/sqlite3
// LD_PRELOAD=./vsipreload.so find /vsicurl/http://download.osgeo.org/gdal/data/sqlite3
+
+/*
+ * We need to export open* etc., but _FORTIFY_SOURCE defines conflicting
+ * always_inline versions. Disable _FORTIFY_SOURCE for this file, so we
+ * can define our overrides.
+ */
+#ifdef _FORTIFY_SOURCE
+#undef _FORTIFY_SOURCE
+#endif
+
+
#define _GNU_SOURCE 1
#define _LARGEFILE64_SOURCE 1
#include <stdio.h>

View File

@ -71,6 +71,10 @@ Source5: %{name}-cleaner.sh
# Add some utils to the default install target
Patch0: gdal_utils.patch
# Fix build failure
# inlining failed in call to always_inline open.localalias
# See https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2526 for a similar issue
Patch1: gdal-fortify-source.patch
BuildRequires: cmake