OpenBSD build fix.

- No timidity user defined parameters supported.
- Shared libraries versioning policy differs on OpenBSD.
This commit is contained in:
David Carlier 2017-10-21 18:07:24 +01:00 committed by Rachael Alexanderson
parent 88deddbc3b
commit b871b1898d
2 changed files with 12 additions and 0 deletions

View file

@ -48,7 +48,9 @@
#include <sys/types.h>
#include <sys/wait.h>
#ifndef __OpenBSD__
#include <wordexp.h>
#endif
#include <glob.h>
#include <signal.h>
@ -533,7 +535,9 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
}
int forkres;
#ifndef __OpenBSD__
wordexp_t words;
#endif
glob_t glb;
// Get timidity executable path
@ -541,8 +545,10 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
glob(ExeName.GetChars(), 0, NULL, &glb);
if(glb.gl_pathc != 0)
exename = glb.gl_pathv[0];
#ifndef __OpenBSD__
// Get user-defined extra args
wordexp(timidity_extargs, &words, WRDE_NOCMD);
#endif
std::string chorusarg = std::string("-EFchorus=") + *timidity_chorus;
std::string reverbarg = std::string("-EFreverb=") + *timidity_reverb;
@ -557,8 +563,10 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
std::vector<const char*> arglist;
arglist.push_back(exename);
#ifndef __OpenBSD__
for(size_t i = 0;i < words.we_wordc;i++)
arglist.push_back(words.we_wordv[i]);
#endif
if(**timidity_config != '\0')
{
arglist.push_back("-c");
@ -611,7 +619,9 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
}*/
}
#ifndef __OpenBSD__
wordfree(&words);
#endif
globfree (&glb);
return ChildProcess != -1;
#endif // _WIN32

View file

@ -72,6 +72,8 @@ CVAR (String, snd_alresampler, "Default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
#define OPENALLIB "openal32.dll"
#elif defined(__APPLE__)
#define OPENALLIB "OpenAL.framework/OpenAL"
#elif defined(__OpenBSD__)
#define OPENALLIB "libopenal.so"
#else
#define OPENALLIB "libopenal.so.1"
#endif