summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-10-26 11:30:08 +0100
committerPete Batard <pbatard@gmail.com>2010-10-26 11:39:54 +0100
commit281d8009bec0a46c28b4717c2c14630172dd2593 (patch)
tree58fe92256bf89356030933ae241e2e6330b2b9c8
parentd9a0a98addd5e6f74238dc68514f6765652ceeee (diff)
downloadlibusb-281d8009bec0a46c28b4717c2c14630172dd2593.tar.gz
set DLL API call declarations to static
* prevents redefinition warnings when an app is statically linking against SetupAPI.lib in MSVC for instance.
-rw-r--r--libusb/os/windows_usb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libusb/os/windows_usb.h b/libusb/os/windows_usb.h
index 8d62f9f..80e3dec 100644
--- a/libusb/os/windows_usb.h
+++ b/libusb/os/windows_usb.h
@@ -328,7 +328,8 @@ struct driver_lookup {
* API macros - from libusb-win32 1.x
*/
#define DLL_DECLARE(api, ret, name, args) \
- typedef ret (api * __dll_##name##_t)args; __dll_##name##_t name = NULL
+ typedef ret (api * __dll_##name##_t)args; \
+ static __dll_##name##_t name = NULL
#define DLL_LOAD(dll, name, ret_on_failure) \
do { \