git: a90aad5b6a21 - main - www/unit-wasm: both read and write permissions are required

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Tue, 26 Nov 2024 20:20:23 UTC
The branch main has been updated by osa:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a90aad5b6a213ecd9d4412e555a21a532be4a52b

commit a90aad5b6a213ecd9d4412e555a21a532be4a52b
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2024-11-26 20:19:51 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2024-11-26 20:20:17 +0000

    www/unit-wasm: both read and write permissions are required
    
    Bump PORTREVISION.
---
 www/unit-wasm/Makefile                            | 2 +-
 www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/unit-wasm/Makefile b/www/unit-wasm/Makefile
index f919d9be0dc9..73ccfd59cdfc 100644
--- a/www/unit-wasm/Makefile
+++ b/www/unit-wasm/Makefile
@@ -1,5 +1,5 @@
 PKGNAMESUFFIX=	-${UNIT_MODNAME}
-PORTREVISION=	3
+PORTREVISION=	4
 
 UNIT_MODNAME=	wasm
 
diff --git a/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c b/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c
index 702c2f4fdda5..9798c0438bd5 100644
--- a/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c
+++ b/www/unit/files/patch-src_wasm_nxt__rt__wasmtime.c
@@ -6,8 +6,8 @@
      for (dir = ctx->dirs; dir != NULL && *dir != NULL; dir++) {
 -        wasi_config_preopen_dir(wasi_config, *dir, *dir);
 +        wasi_config_preopen_dir(wasi_config, *dir, *dir,
-+                                 WASMTIME_WASI_DIR_PERMS_WRITE,
-+                                 WASMTIME_WASI_FILE_PERMS_WRITE);
++                WASMTIME_WASI_DIR_PERMS_READ|WASMTIME_WASI_DIR_PERMS_WRITE,
++                WASMTIME_WASI_FILE_PERMS_READ|WASMTIME_WASI_FILE_PERMS_WRITE);
      }
  
      error = wasmtime_context_set_wasi(rt_ctx->ctx, wasi_config);