summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2012-05-10 15:35:07 +0100
committerPete Batard <pete@akeo.ie>2012-05-10 15:36:34 +0100
commit207566535293136c89bc5b7df8c588418171e54f (patch)
treec2d6c405bfeaff09f92addb6931559b901c2915a
parent3c755e14d525a85f05e40c8a8ed785a77a218680 (diff)
downloadlibusbx-207566535293136c89bc5b7df8c588418171e54f.tar.gz
Samples: prefer __linux__ over __linux define in xusb
* While both should work, __linux__ seems to be preferred and what we use in threads_posix.c * Also fix a typo in .private/README.txt
-rw-r--r--.private/README.txt2
-rw-r--r--examples/xusb.c6
-rw-r--r--libusb/version.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/.private/README.txt b/.private/README.txt
index 1a28311..9894138 100644
--- a/.private/README.txt
+++ b/.private/README.txt
@@ -1,5 +1,5 @@
This directory contains private internal scripts used by the libusbx
-project project maintainers.
+project maintainers.
These scripts are not intended for general usage and will not be
exported when producing release archives.
diff --git a/examples/xusb.c b/examples/xusb.c
index c811353..2c0409f 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -583,7 +583,7 @@ static int test_device(uint16_t vid, uint16_t pid)
const struct libusb_endpoint_descriptor *endpoint;
int i, j, k, r;
int iface, nb_ifaces, first_iface = -1;
-#if defined(__linux)
+#if defined(__linux__)
// Attaching/detaching the kernel driver is only relevant for Linux
int iface_detached = -1;
#endif
@@ -679,7 +679,7 @@ static int test_device(uint16_t vid, uint16_t pid)
{
printf("\nClaiming interface %d...\n", iface);
r = libusb_claim_interface(handle, iface);
-#if defined(__linux)
+#if defined(__linux__)
if ((r != LIBUSB_SUCCESS) && (iface == 0)) {
// Maybe we need to detach the driver
perr(" Failed. Trying to detach driver...\n");
@@ -734,7 +734,7 @@ static int test_device(uint16_t vid, uint16_t pid)
libusb_release_interface(handle, iface);
}
-#if defined(__linux)
+#if defined(__linux__)
if (iface_detached >= 0) {
printf("Re-attaching kernel driver...\n");
libusb_attach_kernel_driver(handle, iface_detached);
diff --git a/libusb/version.h b/libusb/version.h
index a67be48..0d262eb 100644
--- a/libusb/version.h
+++ b/libusb/version.h
@@ -9,7 +9,7 @@
#define LIBUSB_MICRO 11
#endif
#ifndef LIBUSB_NANO
-#define LIBUSB_NANO 10499
+#define LIBUSB_NANO 10500
#endif
/* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
#ifndef LIBUSB_RC