aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/windows.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/utils/windows.h')
-rw-r--r--src/libstrongswan/utils/windows.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/windows.h b/src/libstrongswan/utils/windows.h
index 90c92fd60..83a6d6253 100644
--- a/src/libstrongswan/utils/windows.h
+++ b/src/libstrongswan/utils/windows.h
@@ -68,6 +68,15 @@ static inline void srandom(unsigned int seed)
}
/**
+ * Replacement of sched_yield(2) from <sched.h>
+ */
+static inline int sched_yield(void)
+{
+ Sleep(0);
+ return 0;
+}
+
+/**
* strdup(3), the Windows variant can't free(strdup("")) and others
*/
#define strdup strdup_windows