]> OCCT Git - occt.git/commitdiff
0031799: Configuration - compilation errors with Android NDK r12
authorkgv <kgv@opencascade.com>
Sun, 27 Sep 2020 16:51:56 +0000 (19:51 +0300)
committerabv <abv@opencascade.com>
Fri, 2 Oct 2020 13:12:49 +0000 (16:12 +0300)
Added missing <stdarg.h> include (va_list) to Standard_CString.hxx.
Do not include <search.h> in delabella.cpp when using gcc 4.9 from Android NDK.

src/BRepMesh/delabella.cpp
src/Standard/Standard_CString.hxx

index e88ccf297f3b26159fbe82072e5928b4567519a8..c6e5260a1932d4cf4e0d9b33dc7fdffea8160211 100644 (file)
@@ -27,7 +27,11 @@ SOFTWARE.
 
 #include <assert.h>
 #include <stdio.h>
-#include <search.h>
+
+// gcc 4.9 for Android doesn't have search.h
+#if !defined(__ANDROID__) || defined(__clang__)
+  #include <search.h>
+#endif
 
 #if (defined(__APPLE__))
 #include <malloc/malloc.h>
index 451fc2f5348621ad89c9bd9db7be02f132cb780f..3513016ad81bbd0b1e13c9fad13436e5839569aa 100644 (file)
 //! Functions working with plain C strings
 
 #ifndef _Standard_CString_HeaderFile
-# define _Standard_CString_HeaderFile
+#define _Standard_CString_HeaderFile
 
 #include <Standard_Macro.hxx>
 
-# include <string.h>
-# include <stdio.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
 
 # if defined(_MSC_VER) && ! defined(strcasecmp)
 #  define strcasecmp _stricmp