shithub: npe

Download patch

ref: 251e5dcb47809aaf3a7f88f5c924b356ee9a991e
parent: af96a6e69d7786babf1ea40f3d5436db7cb7d805
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu May 6 14:17:43 EDT 2021

do NOT include <thread.h> in the common header

--- a/include/npe/npe.h
+++ b/include/npe/npe.h
@@ -28,7 +28,6 @@
 
 /* to override "main" with our own threadmain */
 #ifndef __plan9_keep_main__
-#include <thread.h>
 #define main npe_main_renamed
 #pragma lib "libthread.a"
 #endif
--- a/libnpe/sigaction.c
+++ b/libnpe/sigaction.c
@@ -1,4 +1,5 @@
 #include <signal.h>
+#include <thread.h>
 
 /* FIXME this only supports a single handler */
 
--- a/libnpe_pthread/_pthread.h
+++ b/libnpe_pthread/_pthread.h
@@ -1,5 +1,6 @@
 #include <npe.h>
 #include <pthread.h>
+#include <thread.h>
 
 struct pthread_attr_t {
     unsigned stack_size;
--- a/libnpe_sdl2/_sdl.h
+++ b/libnpe_sdl2/_sdl.h
@@ -2,6 +2,7 @@
 #include <sys/stat.h>
 #include <stdint.h>
 #include <tos.h>
+#include <thread.h>
 #include <draw.h>
 #include <memdraw.h>
 #include <mouse.h>