diff --git a/src/wavedata.c b/src/wavedata.c index 910577f..a926596 100644 --- a/src/wavedata.c +++ b/src/wavedata.c @@ -28,7 +28,7 @@ # include # define dlopen(path, flags) LoadLibrary(path) # define dlclose(lib) FreeLibrary((HMODULE)lib) -# define dlsym(lib, sym) GetProcAddress((HMODULE)lib, sym) +# define dlfunc(lib, sym) GetProcAddress((HMODULE)lib, sym) # define snprintf _snprintf #else # include @@ -55,10 +55,12 @@ wavedata_load(Wavedata* w, free(lib_path); if (handle) { +#ifndef _WIN32 // Avoid pedantic warnings about fetching functions with dlsym typedef void (*VoidFunc)(void); typedef VoidFunc (*VoidFuncGetter)(void*, const char*); VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym; +#endif typedef int (*DescFunc)(Wavedata*, unsigned long); DescFunc desc_func = (DescFunc)dlfunc(handle, wdat_descriptor_name);