gdal/gdal-fortify-source.patch

22 lines
643 B
Diff

diff -rupN --no-dereference gdal-3.6.2-fedora/port/vsipreload.cpp gdal-3.6.2-fedora-new/port/vsipreload.cpp
--- gdal-3.6.2-fedora/port/vsipreload.cpp 2023-01-02 15:38:17.000000000 +0100
+++ gdal-3.6.2-fedora-new/port/vsipreload.cpp 2023-01-05 09:09:34.828929089 +0100
@@ -62,6 +62,17 @@
#undef _FORTIFY_SOURCE
#endif
+
+/*
+ * 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>