Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
905B

  1. diff --git a/src/wavedata.c b/src/wavedata.c
  2. index 910577f..a926596 100644
  3. --- a/src/wavedata.c
  4. +++ b/src/wavedata.c
  5. @@ -28,7 +28,7 @@
  6. # include <windows.h>
  7. # define dlopen(path, flags) LoadLibrary(path)
  8. # define dlclose(lib) FreeLibrary((HMODULE)lib)
  9. -# define dlsym(lib, sym) GetProcAddress((HMODULE)lib, sym)
  10. +# define dlfunc(lib, sym) GetProcAddress((HMODULE)lib, sym)
  11. # define snprintf _snprintf
  12. #else
  13. # include <dlfcn.h>
  14. @@ -55,10 +55,12 @@ wavedata_load(Wavedata* w,
  15. free(lib_path);
  16. if (handle) {
  17. +#ifndef _WIN32
  18. // Avoid pedantic warnings about fetching functions with dlsym
  19. typedef void (*VoidFunc)(void);
  20. typedef VoidFunc (*VoidFuncGetter)(void*, const char*);
  21. VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym;
  22. +#endif
  23. typedef int (*DescFunc)(Wavedata*, unsigned long);
  24. DescFunc desc_func = (DescFunc)dlfunc(handle, wdat_descriptor_name);