aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/entropybroker/use-sched_yield.patch
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/entropybroker/use-sched_yield.patch')
-rw-r--r--unmaintained/entropybroker/use-sched_yield.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/unmaintained/entropybroker/use-sched_yield.patch b/unmaintained/entropybroker/use-sched_yield.patch
new file mode 100644
index 0000000000..6a06bcc310
--- /dev/null
+++ b/unmaintained/entropybroker/use-sched_yield.patch
@@ -0,0 +1,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)