[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [bug #48134] ft245r.c : dispatch/dispatch.h: No such file
From: |
Phillip Stevens |
Subject: |
[avrdude-dev] [bug #48134] ft245r.c : dispatch/dispatch.h: No such file or directory |
Date: |
Thu, 9 Jun 2016 08:40:20 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Macintosh; PPC Mac OS X 10.4; rv:38.0) Gecko/20100101 Firefox/38.0 TenFourFox/7450 |
Follow-up Comment #2, bug #48134 (project avrdude):
Joerg,
I've prepared the diff as requested, and attached it to this bug.
Confirmed to work on OSX 10.4 Tiger.
avrdude 6.3
MacPorts 2.3.4
OSX10.4.11
I can't confirm it on later >10.6 OSX versions.
Pasted below, because it is short and helps traceability.
Cheers, Phillip
--- ft245r_original.c 2016-06-09 18:12:42.000000000 +1000
+++ ft245r.c 2016-06-09 18:27:39.000000000 +1000
@@ -123,14 +123,21 @@
#include <pthread.h>
#ifdef __APPLE__
-/* Mac OS X defines sem_init but actually does not implement them */
-#include <dispatch/dispatch.h>
+#include <AvailabilityMacros.h> /* since OS X 10.2 */
+#if(MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)
+/* Mac OS X defines sem_init but actually does not implement them */
+#include <dispatch/dispatch.h> /* since OSX 10.6 */
typedef dispatch_semaphore_t sem_t;
#define sem_init(psem,x,val) *psem = dispatch_semaphore_create(val)
#define sem_post(psem) dispatch_semaphore_signal(*psem)
#define sem_wait(psem) dispatch_semaphore_wait(*psem,
DISPATCH_TIME_FOREVER)
+
+#else
+#include <sys/semaphore.h> /* since OSX 10.2 through OSX 10.5 */
+#endif
+
#else
#include <semaphore.h>
#endif
(file #37438)
_______________________________________________________
Additional Item Attachment:
File name: ft245r.c.diff Size:0 KB
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?48134>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/