tog: use sched_yield(2) instead of pthread_yield(3) for portability pthread_yield(3) is an optional POSIX 2001 extension while sched_yield(2) is part of POSIX 2008. On OpenBSD they are actually equivalent, albeit not documented as such. Using sched_yield(2) helps the -portable version. Patch by Quentin Rameau
diff --git a/tog/tog.c b/tog/tog.c
index 52159fc..cbf77a9 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -38,6 +38,7 @@
#include <pthread.h>
#include <libgen.h>
#include <regex.h>
+#include <sched.h>
#include "got_version.h"
#include "got_error.h"
@@ -841,7 +842,7 @@ view_input(struct tog_view **new, int *done, struct tog_view *view,
if (errcode)
return got_error_set_errno(errcode,
"pthread_mutex_unlock");
- pthread_yield();
+ sched_yield();
errcode = pthread_mutex_lock(&tog_mutex);
if (errcode)
return got_error_set_errno(errcode,