Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix build on FreeBSD 13+

Rozhuk Ivan6ef6ec2ce4e1
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index 9eb1149ca..10cf2a968 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -476,7 +476,7 @@ elseif(BUILD_ENV_UNIXLIKE)
find_package(LZO REQUIRED)
message("LZO:" ${LZO_INCLUDE_DIR})
- if(HAIKU)
+ if(BUILD_TARGET_BSD OR HAIKU)
find_library(EXECINFO_LIBRARY execinfo)
endif()
find_library(PTHREAD_LIBRARY pthread)
diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cpp
index 4c0d20cc2..80746911a 100644
--- a/toonz/sources/common/tsystem/tpluginmanager.cpp
+++ b/toonz/sources/common/tsystem/tpluginmanager.cpp
@@ -15,12 +15,12 @@
#include <sys/param.h>
#include <unistd.h>
#include <sys/types.h>
-#ifndef FREEBSD
+#if !defined(FREEBSD) || __FreeBSD_version >= 1300040
#include <dirent.h>
#endif
#include <stdio.h>
#include <unistd.h>
-#ifndef HAIKU
+#if !defined(HAIKU) && (!defined(FREEBSD) || __FreeBSD_version < 1300040)
#include <sys/dir.h>
#endif
#include <sys/param.h> // for getfsstat