Hi,

On 2015-01-03 18:53, Uwe Hermann wrote:

On Wed, Dec 31, 2014 at 12:40:23AM +0100, Uffe Jakobsen wrote:
This patch is needed for libsigrok to compile without errors on FreeBSD

Yup, something along those lines. Please add that to
src/libsigrok-internal.h though, there's an "#ifdef __FreeBSD__" for
similar portability quirks there already (and it affects more than just
one driver anyway). Not sure if it should be "false" or "true" though
(or just 0/1 to avoid the <stdbool.h> #include), we'll need to check what
exactly FreeBSD's libusb implementation supports and what libsigrok requires
currently. For now hardcoding either 0 or 1 is fine though.


New patch attached (aligned with your suggestions)

/Uffe :-)
>From bacd4730df7df6d93232f463818c0567f29d7f71 Mon Sep 17 00:00:00 2001
From: Uffe Jakobsen <[email protected]>
Date: Wed, 31 Dec 2014 00:32:44 +0100
Subject: [PATCH] Fix compile error on FreeBSD

---
 src/libsigrok-internal.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h
index a8d680e..bd2d4c7 100644
--- a/src/libsigrok-internal.h
+++ b/src/libsigrok-internal.h
@@ -159,6 +159,7 @@
 /* Portability fixes for FreeBSD. */
 #ifdef __FreeBSD__
 #define LIBUSB_CLASS_APPLICATION 0xfe
+#define libusb_has_capability(x) 0
 #define libusb_handle_events_timeout_completed(ctx, tv, c) \
 	libusb_handle_events_timeout(ctx, tv)
 #endif
-- 
2.2.1

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to