Skip to content

Instantly share code, notes, and snippets.

@grundprinzip
Last active December 12, 2015 01:49
Show Gist options
  • Save grundprinzip/4693990 to your computer and use it in GitHub Desktop.
Save grundprinzip/4693990 to your computer and use it in GitHub Desktop.
Patch GCC
--- a/libstdc++-v3/config/os/bsd/darwin/os_defines.h
+++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h
@@ -42,4 +42,9 @@
// Static initializer macro is buggy in darwin, see libstdc++/51906
#define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
+// Configure checks for nanosleep fail on Darwin, but nanosleep and
+// sched_yield are always available, so use them.
+#define _GLIBCXX_USE_NANOSLEEP 1
+#define _GLIBCXX_USE_SCHED_YIELD 1
+
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment