summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--libusb/core.c2
-rw-r--r--libusb/libusb.h2
-rw-r--r--libusb/os/poll_posix.h6
-rw-r--r--libusb/os/threads_windows.c2
-rw-r--r--libusb/os/windows_usb.c8
-rw-r--r--libusb_dll.dsp4
-rw-r--r--libusb_static.dsp4
8 files changed, 19 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 8d3ba9d..f2d977b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,7 @@ case $host in
AC_SUBST(OS_WINDOWS)
AC_MSG_RESULT([Windows])
backend="windows"
- threads="posix"
+ threads="posix"
LIBS="-lpthread -lsetupapi -lole32"
AM_CFLAGS=""
AM_LDFLAGS="-no-undefined"
diff --git a/libusb/core.c b/libusb/core.c
index 7be7f11..47d5108 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -831,8 +831,8 @@ API_EXPORTED void libusb_unref_device(libusb_device *dev)
usbi_mutex_lock(&dev->ctx->usb_devs_lock);
list_del(&dev->list);
usbi_mutex_unlock(&dev->ctx->usb_devs_lock);
- usbi_mutex_destroy(&dev->lock);
+ usbi_mutex_destroy(&dev->lock);
free(dev);
}
}
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 8986013..0127d9f 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -28,8 +28,8 @@
#include <sys/time.h>
#endif
#include <sys/types.h>
-#include <limits.h>
#include <time.h>
+#include <limits.h>
/* 'interface' might be defined as a macro on Windows, so we need to
* undefine it so as not to break the current libusb API, because
diff --git a/libusb/os/poll_posix.h b/libusb/os/poll_posix.h
index 0e9981d..17298a5 100644
--- a/libusb/os/poll_posix.h
+++ b/libusb/os/poll_posix.h
@@ -1,5 +1,5 @@
-#ifndef __LIBUSB_UNISTD_POSIX_H__
-#define __LIBUSB_UNISTD_POSIX_H__
+#ifndef __LIBUSB_POLL_POSIX_H__
+#define __LIBUSB_POLL_POSIX_H__
#include <unistd.h>
#include <poll.h>
@@ -9,4 +9,4 @@
#define usbi_pipe pipe
#define usbi_poll poll
-#endif /* __LIBUSB_UNISTD_POSIX_H__ */
+#endif /* __LIBUSB_POLL_POSIX_H__ */
diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c
index da49eec..7762190 100644
--- a/libusb/os/threads_windows.c
+++ b/libusb/os/threads_windows.c
@@ -61,7 +61,7 @@ int usbi_mutex_lock(usbi_mutex_t *mutex) {
// so don't know proper errno
}
int usbi_mutex_unlock(usbi_mutex_t *mutex) {
- if(!mutex) return ((errno=EINVAL));
+ if(!mutex) return ((errno=EINVAL));
if(!ReleaseMutex(*mutex)) return ((errno=EPERM ));
return 0;
}
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index d6e9f9d..1cba34f 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -2535,7 +2535,7 @@ static int winusb_submit_control_transfer(struct usbi_transfer *itransfer)
usbi_dbg("will use interface %d", current_interface);
winusb_handle = handle_priv->interface_handle[current_interface].api_handle;
- wfd = usbi_create_fd(winusb_handle, _O_RDONLY, ctx);
+ wfd = usbi_create_fd(winusb_handle, _O_RDONLY, ctx);
if (wfd.fd < 0) {
return LIBUSB_ERROR_NO_MEM;
}
@@ -2611,7 +2611,7 @@ static int winusb_submit_bulk_transfer(struct usbi_transfer *itransfer)
winusb_handle = handle_priv->interface_handle[current_interface].api_handle;
direction_in = transfer->endpoint & LIBUSB_ENDPOINT_IN;
- wfd = usbi_create_fd(winusb_handle, direction_in?_O_RDONLY:_O_WRONLY, ctx);
+ wfd = usbi_create_fd(winusb_handle, direction_in?_O_RDONLY:_O_WRONLY, ctx);
if (wfd.fd < 0) {
return LIBUSB_ERROR_NO_MEM;
}
@@ -3575,7 +3575,7 @@ static int hid_submit_control_transfer(struct usbi_transfer *itransfer)
usbi_dbg("will use interface %d", current_interface);
hid_handle = handle_priv->interface_handle[current_interface].api_handle;
- wfd = usbi_create_fd(hid_handle, _O_RDONLY, ctx);
+ wfd = usbi_create_fd(hid_handle, _O_RDONLY, ctx);
if (wfd.fd < 0) {
return LIBUSB_ERROR_NO_MEM;
}
@@ -3677,7 +3677,7 @@ static int hid_submit_bulk_transfer(struct usbi_transfer *itransfer) {
hid_handle = handle_priv->interface_handle[current_interface].api_handle;
direction_in = transfer->endpoint & LIBUSB_ENDPOINT_IN;
- wfd = usbi_create_fd(hid_handle, direction_in?_O_RDONLY:_O_WRONLY, ctx);
+ wfd = usbi_create_fd(hid_handle, direction_in?_O_RDONLY:_O_WRONLY, ctx);
if (wfd.fd < 0) {
return LIBUSB_ERROR_NO_MEM;
}
diff --git a/libusb_dll.dsp b/libusb_dll.dsp
index 9f00d99..de2424c 100644
--- a/libusb_dll.dsp
+++ b/libusb_dll.dsp
@@ -163,6 +163,10 @@ SOURCE=.\libusb\os\linux_usbfs.h
# End Source File
# Begin Source File
+SOURCE=.\libusb\os\poll_posix.h
+# End Source File
+# Begin Source File
+
SOURCE=.\msvc\resource.h
# End Source File
# Begin Source File
diff --git a/libusb_static.dsp b/libusb_static.dsp
index 922c974..ae6879b 100644
--- a/libusb_static.dsp
+++ b/libusb_static.dsp
@@ -147,6 +147,10 @@ SOURCE=.\libusb\os\linux_usbfs.h
# End Source File
# Begin Source File
+SOURCE=.\libusb\os\poll_posix.h
+# End Source File
+# Begin Source File
+
SOURCE=.\libusb\os\threads_posix.h
# End Source File
# Begin Source File