mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
FreeBSD compatibility patch upstream from the port
This commit is contained in:
parent
06ef8a4e09
commit
22dd94fc5c
3 changed files with 17 additions and 6 deletions
|
@ -75,10 +75,10 @@ option ( enable-readline "compile readline lib line editing (if it is available)
|
|||
option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
|
||||
|
||||
# Platform specific options
|
||||
if ( CMAKE_SYSTEM MATCHES "Linux" )
|
||||
if ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
|
||||
option ( enable-lash "compile LASH support (if it is available)" on )
|
||||
option ( enable-alsa "compile ALSA support (if it is available)" on )
|
||||
endif ( CMAKE_SYSTEM MATCHES "Linux" )
|
||||
endif ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
|
||||
|
||||
if ( CMAKE_SYSTEM MATCHES "Darwin" )
|
||||
option ( enable-coreaudio "compile CoreAudio support (if it is available)" on )
|
||||
|
@ -94,11 +94,11 @@ endif ( CMAKE_SYSTEM MATCHES "OS2" )
|
|||
|
||||
# Initialize the library directory name suffix.
|
||||
if (NOT MINGW AND NOT MSVC)
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|DragonFly")
|
||||
set ( _init_lib_suffix "64" )
|
||||
else ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set ( _init_lib_suffix "" )
|
||||
endif ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
endif ( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|DragonFly")
|
||||
else ()
|
||||
set ( _init_lib_suffix "" )
|
||||
endif()
|
||||
|
|
|
@ -53,7 +53,11 @@ set (INFO_INSTALL_DIR "share/info" CACHE STRING "The info install dir")
|
|||
mark_as_advanced (INFO_INSTALL_DIR)
|
||||
|
||||
# MAN_INSTALL_DIR - the man pages install dir
|
||||
set (MAN_INSTALL_DIR "share/man/man1" CACHE STRING "The man pages install dir")
|
||||
if ( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|DragonFly")
|
||||
set (MAN_INSTALL_DIR "man/man1" CACHE STRING "The man pages install dir")
|
||||
else()
|
||||
set (MAN_INSTALL_DIR "share/man/man1" CACHE STRING "The man pages install dir")
|
||||
endif()
|
||||
mark_as_advanced (MAN_INSTALL_DIR)
|
||||
|
||||
# SYSCONF_INSTALL_DIR - the config file install dir
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "fluid_rtkit.h"
|
||||
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
@ -42,10 +42,17 @@
|
|||
#include <sys/syscall.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
static pid_t _gettid(void)
|
||||
{
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
return pthread_getthreadid_np();
|
||||
#else
|
||||
return (pid_t) syscall(SYS_gettid);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int translate_error(const char *name)
|
||||
|
|
Loading…
Reference in a new issue