Skip to content

Commit

Permalink
got wasi test to pass with clang under Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuraiCrow committed Nov 7, 2022
1 parent 8d949d1 commit 526d1dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion wasi/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CFLAGS += -std=c89 -Wunused-result -Wall -Wpedantic -Wno-long-long -Wno-unused-function
# TODO Find out why limits.h doesn't define PATH_MAX on Manjaro Linux
CFLAGS += -std=c89 -Wunused-result -Wall -Wno-long-long -Wno-unused-function -DPATH_MAX=65536
LDFLAGS += -lm

ifneq (,$(findstring base,$(SANITIZERS)))
Expand Down
5 changes: 3 additions & 2 deletions wasi/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ testResolvePath(
fprintf(stderr, "OK: resolvePath(%s, %s) == %s\n", directory, path, expected);
}

wasmMemory wasiMemory;

int
main(int argc, char* argv[]) {
wasmMemory m;
wasmMemoryAllocate(&m, 2, 65535);
wasmMemoryAllocate(&wasiMemory, 2, 65535);
if (!wasiInit(argc, argv, environ)) {
fprintf(stderr, "failed to initialize WASI\n");
return 1;
Expand Down

0 comments on commit 526d1dd

Please sign in to comment.