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

@@ -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();