Fix Linux compile issues.

This commit is contained in:
cnlohr 2017-09-10 23:02:33 -04:00
parent 8830b99454
commit 71fd5c5aee
5 changed files with 6 additions and 5 deletions

View file

@ -17,11 +17,11 @@
#include "parameters.h"
#include "hook.h"
#include "configs.h"
#include <winsock2.h>
struct SoundDriver * sd;
#if defined(WIN32) || defined(USE_WINDOWS)
#include <winsock2.h>
#include <windows.h>
#define ESCAPE_KEY 0x1B

View file

@ -12,7 +12,8 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
sourcename = alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 1
firstval = 0

View file

@ -41,6 +41,6 @@ struct DriverInstances * SetupOutDriver( );
void RegOutDriver( const char * ron, struct DriverInstances * (*Init)( ) );
#define REGISTER_OUT_DRIVER( name ) \
void REGISTER##name() __attribute__((constructor)) { RegOutDriver( #name, name ); }
void __attribute__((constructor)) REGISTER##name() { RegOutDriver( #name, name ); }
#endif

View file

@ -58,7 +58,7 @@ void SetParametersFromString( const char * string );
void AddCallback( const char * name, ParamCallbackT t, void * v );
#define REGISTER_PARAM( parameter_name, type ) \
void REGISTER##parameter_name() __attribute__((constructor)) { RegisterValue( #parameter_name, type, &parameter_name, sizeof( parameter_name ) ); }
void __attribute__((constructor)) REGISTER##parameter_name() { RegisterValue( #parameter_name, type, &parameter_name, sizeof( parameter_name ) ); }
#endif

View file

@ -35,7 +35,7 @@ void CloseSound( struct SoundDriver * soundobject );
void RegSound( int priority, const char * name, SoundInitFn * fn );
#define REGISTER_SOUND( sounddriver, priority, name, function ) \
void REGISTER##sounddriver() __attribute__((constructor)) { RegSound( priority, name, function ); }
void __attribute__((constructor)) REGISTER##sounddriver() { RegSound( priority, name, function ); }
#endif