]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
apple: Redefine some additional clashing Mach types
authorMartin Willi <martin@revosec.ch>
Tue, 16 Dec 2014 15:55:29 +0000 (16:55 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 16 Dec 2014 16:22:28 +0000 (17:22 +0100)
While they usually are not included in a normal strongSwan build, the XPC
header indirectly defines these Mach types. To build charon-xpc, which uses
both XPC and strongSwan includes, we have to redefine these types.

src/libcharon/sa/task.h
src/libstrongswan/networking/host.h
src/libstrongswan/processing/processor.h
src/libstrongswan/utils/compat/apple.h

index f2c4299ccd5b92cdaca0126db8f05d833257c058..8e380851aa671d1f461ef92124ad8ce45bcb2f83 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef TASK_H_
 #define TASK_H_
 
+#include <utils/utils.h>
+
 typedef enum task_type_t task_type_t;
 typedef struct task_t task_t;
 
index 26f23bc997330ece466699d6f08253a607420940..db6f4dd499c46bddd91fca2c62d0b448e8bc4585 100644 (file)
@@ -24,6 +24,9 @@
 #ifndef HOST_H_
 #define HOST_H_
 
+#include <utils/utils.h>
+#include <utils/chunk.h>
+
 typedef enum host_diff_t host_diff_t;
 typedef struct host_t host_t;
 
@@ -31,9 +34,6 @@ typedef struct host_t host_t;
 #include <stdio.h>
 #include <sys/types.h>
 
-#include <utils/utils.h>
-#include <utils/chunk.h>
-
 /**
  * Representates a Host
  *
index f96530e5409fdbf75b7c41a749ec538c83861c22..ee08870fb28dc3d96a10e062d0209368747d72e6 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef PROCESSOR_H_
 #define PROCESSOR_H_
 
+#include <utils/utils.h>
+
 typedef struct processor_t processor_t;
 
 #include <stdlib.h>
index 77e07227990cc81768273fbf92263e5ab7fab4bc..61afb9d9e694f289ac26ed9932f5da36df605caf 100644 (file)
 /* Mach uses a semaphore_create() call, use a different name for ours */
 #define semaphore_create(x) strongswan_semaphore_create(x)
 
+/* Since OS X 10.10 XPC includes some additional conflicting Mach types */
+#define host_t strongswan_host_t
+#define processor_t strongswan_processor_t
+#define task_t strongswan_task_t
+#define thread_t strongswan_thread_t
+
 /* forward declaration, see below */
 static inline int precancellable_poll(struct pollfd fds[], nfds_t nfds,
                                                                          int timeout);