aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/entropybroker/use-sched_yield.patch
blob: 6a06bcc310339b39123f71234f5ee27b5e6ee0ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/utils.cpp b/utils.cpp
index 33a8f97..805035f 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -1,5 +1,5 @@
 #include <string>
-#include <pthread.h>
+#include <sched.h>
 #include <vector>
 #include <stdarg.h>
 #include <unistd.h>
@@ -26,6 +26,7 @@
 #ifdef linux
 #include <sys/syscall.h>
 #endif
+# include <sched.h>
 
 #include "defines.h"
 #include "error.h"
@@ -641,7 +642,7 @@ void my_yield()
 {
 	// sched_yield
 
-	pthread_check(pthread_yield(), "pthread_yield");
+	pthread_check(sched_yield(), "sched_yield");
 }
 
 bool file_exist(const char *file)