Index: Programs/usb_libusb-1.0.c
===================================================================
--- Programs/usb_libusb-1.0.c.orig
+++ Programs/usb_libusb-1.0.c
@@ -94,6 +94,19 @@ static int
 usbGetHandle (UsbDeviceExtension *devx) {
   if (!devx->handle) {
     int result;
+    DWORD mask, dummy;
+
+    if (GetProcessAffinityMask(GetCurrentProcess(), &mask, &dummy)) {
+      int i;
+      DWORD newmask = 0;
+      for (i = 0; i < sizeof(DWORD)*8; i++)
+        if (mask & (1<<i)) {
+	  newmask = 1<<i;
+	  break;
+	}
+      if (newmask)
+	SetProcessAffinityMask(GetCurrentProcess(), newmask);
+    }
 
     if ((result = libusb_open(devx->device, &devx->handle)) != LIBUSB_SUCCESS) {
       usbSetErrno(result, "libusb_open");
Index: Programs/usb_libusb.c
===================================================================
--- Programs/usb_libusb.c.orig
+++ Programs/usb_libusb.c
@@ -378,6 +378,20 @@ usbFindDevice (UsbDeviceChooser chooser,
   UsbDevice *device = NULL;
   int result;
 
+    DWORD mask, dummy;
+
+    if (GetProcessAffinityMask(GetCurrentProcess(), &mask, &dummy)) {
+      int i;
+      DWORD newmask = 0;
+      for (i = 0; i < sizeof(DWORD)*8; i++)
+        if (mask & (1<<i)) {
+	  newmask = 1<<i;
+	  break;
+	}
+      if (newmask)
+	SetProcessAffinityMask(GetCurrentProcess(), newmask);
+    }
+
   {
     static int initialized = 0;
     if (!initialized) {
