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 810df8d435616b41e3a7b3846e5a007d76d720af..14e26e4be18b68395335b39d868959c6174c9f0e 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 a644306b9e9b6fb2edcdc10036e0be7c2421c31f..231badd27d91b0dcda983449e37e03dcc7dc97a7 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 66de860aaa8fee19442e492b9a776d87e5d42e79..01a39b6e1772c0cdc16a2cac6a512798764b02f9 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 fca313b4309f2c1a821909bce72486e0e7f7df1f..57a21dcce149090eb26600b51ff0c515182e1b73 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)