fix: wasm requires strict function prototypes

* `pthread_mutex_*` and friends are also invalid then but they're not
  currently tested (and there's no wasi prong in `pthread_mutex_t`)
This commit is contained in:
GasInfinity
2026-04-21 14:45:24 +02:00
parent a2a91199d7
commit f8e9593851
2 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -12,9 +12,9 @@ test "pthread_spinlock_t" {
_ = c.pthread_spin_init(&spin, c.PTHREAD_PROCESS_PRIVATE);
defer _ = c.pthread_spin_destroy(&spin);
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_trylock(&spin));
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_unlock(&spin));
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_trylock(&spin));
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_unlock(&spin));
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_lock(&spin));
try std.testing.expectEqual(.SUCCESS, c.pthread_spin_unlock(&spin));
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_lock(&spin));
try std.testing.expectEqual(@intFromEnum(c.E.SUCCESS), c.pthread_spin_unlock(&spin));
}