Various fixes for better OpenBSD compatibility (thanks to Jacob Meuser)

(cherry picked from commit 46097b72d7)

Conflicts:

	src/core/main.cpp
This commit is contained in:
Tobias Doerffel
2009-03-12 19:35:49 +01:00
parent ab35c12552
commit efbe9c94c0
4 changed files with 18 additions and 3 deletions

View File

@@ -434,6 +434,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/lmms.1.gz COMMAND gzip -c ${CMAKE_
ADD_EXECUTABLE(lmms ${lmms_SOURCES} ${lmms_INCLUDES} ${LIBSAMPLERATE_SOURCES} ${LMMS_ER_H} ${lmms_UI_out} lmmsconfig.h ${WINRC} ${CMAKE_BINARY_DIR}/lmms.1.gz)
IF(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(lmms PROPERTIES LINK_FLAGS "${LINK_FLAGS} -mwindows")
ADD_CUSTOM_COMMAND(TARGET lmms POST_BUILD COMMAND ${STRIP} ${CMAKE_BINARY_DIR}/lmms.exe)
@@ -443,9 +444,13 @@ IF(LMMS_BUILD_WIN32)
ELSE(LMMS_BUILD_WIN64)
INSTALL(FILES /opt/mingw32/bin/QtCore4.dll /opt/mingw32/bin/QtGui4.dll /opt/mingw32/bin/QtXml4.dll /opt/mingw32/bin/libz.dll /opt/mingw32/bin/libsndfile-1.dll /opt/mingw32/bin/libvorbis-0.dll /opt/mingw32/bin/libvorbisenc-2.dll /opt/mingw32/bin/libvorbisfile-3.dll /opt/mingw32/bin/libogg-0.dll /opt/mingw32/bin/libfluidsynth-1.dll /opt/mingw32/bin/libfftw3f-3.dll /opt/mingw32/bin/SDL.dll /opt/mingw32/i586-pc-mingw32/bin/mingwm10.dll DESTINATION .)
ENDIF(LMMS_BUILD_WIN64)
ELSE(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(lmms PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Wl,-E")
INSTALL(TARGETS lmms RUNTIME DESTINATION bin)
INSTALL(FILES ${CMAKE_BINARY_DIR}/lmms.1.gz DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1/ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
ENDIF(LMMS_BUILD_WIN32)
#

View File

@@ -1,7 +1,7 @@
/*
* remote_plugin.h - base class providing RPC like mechanisms
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -64,6 +64,10 @@ typedef int32_t key_t;
#include <sys/shm.h>
#endif
#ifdef LMMS_HAVE_UNISTD_H
#include <unistd.h>
#endif
#endif

View File

@@ -3,7 +3,7 @@
/*
* audio_oss.cpp - device-class that implements OSS-PCM-output
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -56,7 +56,7 @@
#ifdef LMMS_HAVE_SYS_SOUNDCARD_H
// This is recommended by OSS
#include <sys/soundcard.h>
#elif LMMS_HAVE_SOUNDCARD_H
#elif defined(LMMS_HAVE_SOUNDCARD_H)
// This is installed on some systems
#include <soundcard.h>
#endif

View File

@@ -50,6 +50,10 @@
#include <process.h>
#endif
#ifdef LMMS_HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "config_mgr.h"
#include "embed.h"
#include "engine.h"
@@ -345,6 +349,7 @@ int main( int argc, char * * argv )
// try to set realtime priority
#ifdef LMMS_BUILD_LINUX
#ifdef LMMS_HAVE_SCHED_H
#ifndef __OpenBSD__
struct sched_param sparam;
sparam.sched_priority = ( sched_get_priority_max( SCHED_FIFO ) +
sched_get_priority_min( SCHED_FIFO ) ) / 2;
@@ -353,6 +358,7 @@ int main( int argc, char * * argv )
printf( "Notice: could not set realtime priority.\n" );
}
#endif
#endif
#endif
configManager::inst()->loadConfigFile();