postgis/postgis-c99-2.patch
Florian Weimer 4027e2bac2 C99 compatibility fixes
Backport an upstream patch to the bundled previous version,
and apply a new patch to fix compilation errors with future compilers.

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-04-09 22:16:19 +02:00

18 lines
656 B
Diff

Include <math.h> for isnan. This avoids an implicit function
declaration and a build failure with future compilers.
Submitted upstream: <https://github.com/postgis/postgis/pull/725>
diff -ur postgis-3.3.2.orig/loader/shp2pgsql-core.c postgis-3.3.2/loader/shp2pgsql-core.c
--- postgis-3.3.2.orig/loader/shp2pgsql-core.c 2022-11-13 08:09:23.000000000 +0100
+++ postgis-3.3.2/loader/shp2pgsql-core.c 2023-04-09 22:01:46.377934865 +0200
@@ -15,6 +15,8 @@
#include "../postgis_config.h"
+#include <math.h> /* for isnan */
+
#include "shp2pgsql-core.h"
#include "../liblwgeom/liblwgeom.h"
#include "../liblwgeom/lwgeom_log.h" /* for LWDEBUG macros */