diff --git a/emper/Dispatcher.cpp b/emper/Dispatcher.cpp
index 0a5e4a44a13299aa6a708a1ce3f98f334079e7fd..2499cad08cfd38009c2ebdd69385e103f485bac9 100644
--- a/emper/Dispatcher.cpp
+++ b/emper/Dispatcher.cpp
@@ -2,7 +2,7 @@
 // Copyright © 2020 Florian Schmaus
 #include "Dispatcher.hpp"
 
-#include <pthread.h>	// for pthread_yield
+#include <sched.h>
 
 #include "Emper.hpp"
 #include "Runtime.hpp"	// for Runtime
@@ -17,6 +17,6 @@ void Dispatcher::dispatchLoopDoSleep() {
 	if constexpr (emper::WORKER_SLEEP) {
 		runtime.dispatchLoopSleep();
 	} else {
-		pthread_yield();
+		sched_yield();
 	}
 }