Thu 09 Jun 2016 08:40:20 AM UTC, comment #2:
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)
|