fix OpenBSD compile issue 49/289549/1
authorOmar Polo <op@omarpolo.com>
Sat, 11 Jun 2022 10:18:48 +0000 (12:18 +0200)
committerPatryk Kaczmarek <patryk.k@partner.samsung.com>
Thu, 9 Mar 2023 12:17:47 +0000 (13:17 +0100)
Linux seems the only system AFAICS to have alloca.h.  All the BSDs have
the declaration in stdlib.h

Change-Id: I82d18c5ca92bb788eb175a2ce9acf418ac19053c

src/lib/sw_engine/tvgSwRaster.cpp
src/loaders/svg/tvgXmlParser.cpp
src/loaders/tvg/tvgTvgBinInterpreter.cpp
src/savers/tvg/tvgTvgSaver.cpp

index 810df8d..14e26e4 100644 (file)
 
 #ifdef _WIN32
     #include <malloc.h>
-#elif defined(__FreeBSD__)
-    #include <stdlib.h>
-#else
+#elif defined(__linux__)
     #include <alloca.h>
+#else
+    #include <stdlib.h>
 #endif
 
 #include "tvgMath.h"
index a644306..231badd 100644 (file)
 
 #ifdef _WIN32
     #include <malloc.h>
-#elif defined(__FreeBSD__)
-    #include <stdlib.h>
-#else
+#elif defined(__linux__)
     #include <alloca.h>
+#else
+    #include <stdlib.h>
 #endif
 
 #include "tvgXmlParser.h"
index 66de860..01a39b6 100644 (file)
 
 #ifdef _WIN32
     #include <malloc.h>
-#elif defined(__FreeBSD__)
-    #include <stdlib.h>
-#else
+#elif defined(__linux__)
     #include <alloca.h>
+#else
+    #include <stdlib.h>
 #endif
 
 #include "tvgTvgCommon.h"
index fca313b..57a21dc 100644 (file)
 
 #ifdef _WIN32
     #include <malloc.h>
-#elif defined(__FreeBSD__)
-    #include <stdlib.h>
-#else
+#elif defined(__linux__)
     #include <alloca.h>
+#else
+    #include <stdlib.h>
 #endif
 
 static FILE* _fopen(const char* filename, const char* mode)