File tree 1 file changed +14
-8
lines changed
CoreFoundation/RunLoop.subproj
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,20 @@ static pthread_t const kNilPthreadT = (pthread_t)0;
210
210
#define CFRUNLOOP_WAKEUP_FOR_WAKEUP_ENABLED () (0)
211
211
#endif
212
212
213
+
214
+ // NOTE: this is locally defined rather than in CFInternal.h as on Linux,
215
+ // `linux/sysctl.h` defines `struct __sysctl_args` with an `__unused` member
216
+ // which breaks the build.
217
+ #if DEPLOYMENT_TARGET_WINDOWS || TARGET_OS_CYGWIN || DEPLOYMENT_TARGET_LINUX
218
+ #ifndef __unused
219
+ #if __has_attribute (unused )
220
+ #define __unused __attribute__((unused))
221
+ #else
222
+ #define __unused
223
+ #endif
224
+ #endif // !defined(__unused)
225
+ #endif
226
+
213
227
// In order to reuse most of the code across Mach and Windows v1 RunLoopSources, we define a
214
228
// simple abstraction layer spanning Mach ports and Windows HANDLES
215
229
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
@@ -488,14 +502,6 @@ typedef int __CFPort;
488
502
typedef int __CFPortSet ;
489
503
#define CFPORTSET_NULL -1
490
504
491
- #ifndef __unused
492
- #if __has_attribute (unused )
493
- #define __unused __attribute__((unused))
494
- #else
495
- #define __unused
496
- #endif
497
- #endif // !defined(__unused)
498
-
499
505
static __CFPort __CFPortAllocate (__unused uintptr_t guard ) {
500
506
return eventfd (0 , EFD_CLOEXEC |EFD_NONBLOCK );
501
507
}
You can’t perform that action at this time.
0 commit comments