Skip to content

Commit eab1a29

Browse files
authored
[WasmFS] Fix need for wasmfs forward declarations. NFC (#23822)
1 parent 9f1dfb6 commit eab1a29

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

system/lib/wasmfs/js_api.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <dirent.h>
77
#include <syscall_arch.h>
88
#include <unistd.h>
9+
#include <emscripten/wasmfs.h>
910

1011
#include "backend.h"
1112
#include "file.h"
@@ -22,11 +23,6 @@ using namespace wasmfs;
2223

2324
extern "C" {
2425

25-
// TODO: Replace forward declarations with #include <emscripten/wasmfs.h> and
26-
// resolve wasmfs::backend_t namespace conflicts.
27-
__wasi_fd_t wasmfs_create_file(const char* pathname, mode_t mode, backend_t backend);
28-
int wasmfs_create_directory(const char* path, int mode, backend_t backend);
29-
3026
// Copy the file specified by the pathname into JS.
3127
// Return a pointer to the JS buffer in HEAPU8.
3228
// The buffer will also contain the file length.
@@ -285,7 +281,7 @@ int _wasmfs_lstat(char* path, struct stat* statBuf) {
285281
// The legacy JS API requires a mountpoint to already exist, so WasmFS will
286282
// attempt to remove the target directory if it exists before replacing it with
287283
// a mounted directory.
288-
int _wasmfs_mount(char* path, wasmfs::backend_t created_backend) {
284+
int _wasmfs_mount(char* path, ::backend_t created_backend) {
289285
int err = __syscall_rmdir((intptr_t)path);
290286

291287
// The legacy JS API mount requires the directory to already exist, but we

0 commit comments

Comments
 (0)