diff options
Diffstat (limited to 'src/osd/modules/netdev/pcap.c')
-rw-r--r-- | src/osd/modules/netdev/pcap.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/osd/modules/netdev/pcap.c b/src/osd/modules/netdev/pcap.c index 3e48aebb057..7cdb4673088 100644 --- a/src/osd/modules/netdev/pcap.c +++ b/src/osd/modules/netdev/pcap.c @@ -1,7 +1,13 @@ #if defined(OSD_NET_USE_PCAP) #if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS) - +#ifdef UNICODE +#define LIB_NAME L"wpcap.dll" +#define LoadDynamicLibrary LoadLibraryW +#else +#define LIB_NAME "wpcap.dll" +#define LoadDynamicLibrary LoadLibraryA +#endif #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif @@ -15,7 +21,6 @@ #if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS) -#define LIB_NAME L"wpcap.dll" #define LIB_ERROR_STR "Unable to load winpcap: %lx\n" typedef DWORD except_type; @@ -39,7 +44,7 @@ typedef const char *except_type; #define FreeLibrary(x) dlclose(x) #define GetLastError() dlerror() #define GetProcAddress(x, y) dlsym(x, y) -#define LoadLibrary(x) dlopen(x, RTLD_LAZY) +#define LoadDynamicLibrary(x) dlopen(x, RTLD_LAZY) #endif @@ -239,7 +244,7 @@ bool pcap_module::probe() { if (handle == NULL) { - handle = LoadLibrary(LIB_NAME); + handle = LoadDynamicLibrary(LIB_NAME); return (handle != NULL); } return true; |