aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb20.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2013-07-14 10:22:00 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2013-07-14 10:22:00 +0000
commit99cd1f32af556ea58a3d7b6b4ebbd2d52c0d3af0 (patch)
tree9a0ea53519048e309b6320835b617a19a0376e47 /lib/libusb/libusb20.c
parenta40a377cc7eb11a8735e9cb029b125f5022f6c3f (diff)
downloadsrc-99cd1f32af556ea58a3d7b6b4ebbd2d52c0d3af0.tar.gz
src-99cd1f32af556ea58a3d7b6b4ebbd2d52c0d3af0.zip
Add some missing definitions to build a working FreeBSD's libusb under Linux.
Notes
Notes: svn path=/head/; revision=253339
Diffstat (limited to 'lib/libusb/libusb20.c')
-rw-r--r--lib/libusb/libusb20.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c
index ed332a6a93c1..1de3a265125a 100644
--- a/lib/libusb/libusb20.c
+++ b/lib/libusb/libusb20.c
@@ -1202,27 +1202,13 @@ libusb20_be_alloc(const struct libusb20_backend_methods *methods)
struct libusb20_backend *
libusb20_be_alloc_linux(void)
{
- struct libusb20_backend *pbe;
-
-#ifdef __linux__
- pbe = libusb20_be_alloc(&libusb20_linux_backend);
-#else
- pbe = NULL;
-#endif
- return (pbe);
+ return (NULL);
}
struct libusb20_backend *
libusb20_be_alloc_ugen20(void)
{
- struct libusb20_backend *pbe;
-
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- pbe = libusb20_be_alloc(&libusb20_ugen20_backend);
-#else
- pbe = NULL;
-#endif
- return (pbe);
+ return (libusb20_be_alloc(&libusb20_ugen20_backend));
}
struct libusb20_backend *
@@ -1230,10 +1216,12 @@ libusb20_be_alloc_default(void)
{
struct libusb20_backend *pbe;
+#ifdef __linux__
pbe = libusb20_be_alloc_linux();
if (pbe) {
return (pbe);
}
+#endif
pbe = libusb20_be_alloc_ugen20();
if (pbe) {
return (pbe);