libusbhxcfe-2.0.0.4.patchset revision 2f8cffd7
1From e61db96bc5ba7ed32d455f1408b46b8a93f499c6 Mon Sep 17 00:00:00 2001
2From: Adrien Destugues <pulkomandy@pulkomandy.tk>
3Date: Sat, 27 Feb 2016 09:36:52 +0100
4Subject: Fix Haiku build.
5
6
7diff --git a/build/Makefile b/build/Makefile
8index 9d37914..dcde088 100644
9--- a/build/Makefile
10+++ b/build/Makefile
11@@ -16,6 +16,10 @@ ifeq ($(UNAME), Linux)
12 CFLAGS += -fPIC
13 endif
14 
15+ifeq ($(UNAME), Haiku)
16+LDFLAGS= -g -shared
17+endif
18+
19 ifeq ($(UNAME), Darwin)
20 CFLAGS += -arch i386 -mmacosx-version-min=10.5
21 LDFLAGS += -arch i386 -dynamiclib -current_version 2.0 -install_name @executable_path/../Frameworks/libusbhxcfe.dylib -mmacosx-version-min=10.5
22-- 
232.7.0
24
25
26From 439fe6a0cc1121e347312ff2212af83037ee95ba Mon Sep 17 00:00:00 2001
27From: Adrien Destugues <pulkomandy@pulkomandy.tk>
28Date: Sat, 27 Feb 2016 10:04:16 +0100
29Subject: Haiku hacks.
30
31
32diff --git a/sources/ftdi.c b/sources/ftdi.c
33index 52874cc..6c53666 100644
34--- a/sources/ftdi.c
35+++ b/sources/ftdi.c
36@@ -249,11 +249,13 @@ int createlistenerthread(RDTHREADFUNCTION thread,int priority,ftdi_context ftdih
37 
38 	//pthread_attr_create(&threadattrib);
39 	pthread_attr_init(&threadattrib);
40+#ifndef __HAIKU__
41 	pthread_attr_setinheritsched(&threadattrib,PTHREAD_EXPLICIT_SCHED);
42 	//pthread_attr_setsched(&threadattrib,SCHED_FIFO);
43 	//pthread_attr_setprio(&threadattrib,4);
44 	
45 	pthread_attr_setschedpolicy(&threadattrib,SCHED_FIFO);
46+#endif
47 	param.sched_priority = sched_get_priority_max(SCHED_FIFO) ;
48 	/* set the new scheduling param */
49 	pthread_attr_setschedparam (&threadattrib, &param);
50-- 
512.7.0
52
53