diff --git a/opennurbs/CMakeLists.txt b/opennurbs/CMakeLists.txt index c4430158..b49d0bf6 100644 --- a/opennurbs/CMakeLists.txt +++ b/opennurbs/CMakeLists.txt @@ -22,7 +22,8 @@ if (ENABLE_OPENNURBS) COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_brep_h.patch COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_cmake.patch COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_compress.patch - COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_defines.patch + COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_defines_h.patch + COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_defines_cpp.patch COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_example_brep.patch COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_example_gl.patch COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/opennurbs_file_utilities.patch diff --git a/opennurbs/opennurbs_defines_cpp.patch b/opennurbs/opennurbs_defines_cpp.patch new file mode 100644 index 00000000..db7d98ca --- /dev/null +++ b/opennurbs/opennurbs_defines_cpp.patch @@ -0,0 +1,14 @@ +diff --git a/opennurbs_defines.cpp b/opennurbs_defines.cpp +index 8d5f8830..1f60f588 100644 +--- a/opennurbs_defines.cpp ++++ b/opennurbs_defines.cpp +@@ -498,6 +498,9 @@ int ON::CloseAllFiles() + #elif defined(ON_RUNTIME_APPLE) || defined(ON_RUNTIME_ANDROID) + //fcloseall is not supported on mac/ios or android + return EOF; ++#elif defined(BSD) ++ fcloseall(); ++ return 0; + #else + return fcloseall(); + #endif diff --git a/opennurbs/opennurbs_defines.patch b/opennurbs/opennurbs_defines_h.patch similarity index 99% rename from opennurbs/opennurbs_defines.patch rename to opennurbs/opennurbs_defines_h.patch index d9f4cd06..259d8d90 100644 --- a/opennurbs/opennurbs_defines.patch +++ b/opennurbs/opennurbs_defines_h.patch @@ -8,7 +8,7 @@ +#define ON_CLASS __attribute__ ((visibility ("default"))) +#define ON_DECL __attribute__ ((visibility ("default"))) +#define ON_EXTERN_DECL __attribute__ ((visibility ("default"))) -+ ++ #elif defined(ON_COMPILER_CLANG) /* using opennurbs as an Apple shared library */ #define ON_CLASS __attribute__ ((visibility ("default")))