File 0001-fix-undefined-malloc-on-cross-compile.patch of Package mingw64-ngspice

--- ngspice-30/configure.ac	2018-12-26 07:01:18.000000000 +0000
+++ configure.ac	2019-05-07 10:18:33.629843228 +0000
@@ -604,9 +604,16 @@
 AC_TYPE_SIZE_T
 
 # Checks for library functions.
-AC_FUNC_ALLOCA
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
+case $host_os in
+    *mingw*)
+        AC_CHECK_FUNCS([malloc alloca realloc])
+        ;;
+    *)
+        AC_FUNC_ALLOCA
+        AC_FUNC_MALLOC
+        AC_FUNC_REALLOC
+        ;;
+esac
 AC_FUNC_CLOSEDIR_VOID
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_SETVBUF_REVERSED
openSUSE Build Service is sponsored by