From 2ce2a4937465a192a5aeb6e8c111b59fb87f3eb0 Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Wed, 14 Feb 2024 22:02:52 +0000
Subject: [PATCH] testsuite: fix hs_try_putmvar002 for targets without
 pthread.h

hs_try_putmvar002 includes pthread.h and doesn't work on targets
without this header (e.g. wasm32). It doesn't need to include this
header at all. This was previously unnoticed by wasm CI, though recent
toolchain upgrade brought in upstream changes that completely removes
pthread.h in the single-threaded wasm32-wasi sysroot, therefore we
need to handle that change.
---
 testsuite/tests/concurrent/should_run/hs_try_putmvar002_c.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar002_c.c b/testsuite/tests/concurrent/should_run/hs_try_putmvar002_c.c
index 34a339da93b5..79076e6497c2 100644
--- a/testsuite/tests/concurrent/should_run/hs_try_putmvar002_c.c
+++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar002_c.c
@@ -1,6 +1,5 @@
 #include "HsFFI.h"
 #include <unistd.h>
-#include <pthread.h>
 #include "hs_try_putmvar002_stub.h"
 
 void externalPutMVar(HsStablePtr mvar, HsInt cap)
-- 
GitLab