aboutsummaryrefslogtreecommitdiff
path: root/src/compat/osx.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat/osx.h')
-rw-r--r--src/compat/osx.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/compat/osx.h b/src/compat/osx.h
new file mode 100644
index 0000000..7169d7e
--- /dev/null
+++ b/src/compat/osx.h
@@ -0,0 +1,27 @@
1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef OSX_COMPATIBILITY__H
9#define OSX_COMPATIBILITY__H
10
11#ifdef __APPLE__
12
13#ifndef TEMP_FAILURE_RETRY
14#define TEMP_FAILURE_RETRY(expression) \
15 (__extension__ \
16 ({ long int __result; \
17 do __result = (long int) (expression); \
18 while (__result == -1L && errno == EINTR); \
19 __result; }))
20#endif
21
22#include <sched.h>
23
24#define pthread_yield() sched_yield()
25#endif /* __APPLE__ */
26#endif
27