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

This commit is contained in:
Tobias Doerffel
2009-03-12 19:32:40 +01:00
parent 03bf853a4d
commit 46097b72d7
4 changed files with 19 additions and 4 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
*
@@ -57,7 +57,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

@@ -3,7 +3,7 @@
/*
* main.cpp - just main.cpp which is starting up app...
*
* 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
*
@@ -50,6 +50,10 @@
#include <process.h>
#endif
#ifdef LMMS_HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "lmmsversion.h"
#include "config_mgr.h"
#include "embed.h"
@@ -355,6 +359,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;
@@ -363,6 +368,7 @@ int main( int argc, char * * argv )
printf( "Notice: could not set realtime priority.\n" );
}
#endif
#endif
#endif
configManager::inst()->loadConfigFile();