@@ -77,6 +77,15 @@ elseif(UNIX)
|
||||
util/threading-posix.c
|
||||
util/pipe-posix.c
|
||||
util/platform-nix.c)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
# use the sysinfo compatibility library on bsd
|
||||
find_package(Libsysinfo REQUIRED)
|
||||
include_directories(${SYSINFO_INCLUDE_DIRS})
|
||||
set(libobs_PLATFORM_DEPS
|
||||
${libobs_PLATFORM_DEPS}
|
||||
${SYSINFO_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
@@ -426,7 +426,7 @@ struct gs_window {
|
||||
void *hwnd;
|
||||
#elif defined(__APPLE__)
|
||||
__unsafe_unretained id view;
|
||||
#elif defined(__linux__)
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
/* I'm not sure how portable defining id to uint32_t is. */
|
||||
uint32_t id;
|
||||
void* display;
|
||||
|
@@ -16,6 +16,10 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define _WITH_GETLINE
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
@@ -26,7 +26,6 @@
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
#include <sys/times.h>
|
||||
#include <sys/vtimes.h>
|
||||
#endif
|
||||
|
||||
#include "darray.h"
|
||||
|
@@ -26,6 +26,10 @@
|
||||
#include <semaphore.h>
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
#include "bmem.h"
|
||||
#include "threading.h"
|
||||
|
||||
@@ -256,6 +260,8 @@ void os_set_thread_name(const char *name)
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
pthread_setname_np(name);
|
||||
#elif defined(__FreeBSD__)
|
||||
pthread_set_name_np(pthread_self(), name);
|
||||
#elif !defined(__MINGW32__)
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user