Skip to content

Commit c227930

Browse files
authored
[WasmFS] Fix linkage of wasmfs_create_root_dir. NFC (#24834)
This function should be `extern "C"` and not part the wasmfs namespace.
1 parent e8d2b61 commit c227930

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

system/lib/wasmfs/backends/noderawfs_root.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
#include "emscripten/wasmfs.h"
77

8-
namespace wasmfs {
9-
108
backend_t wasmfs_create_root_dir(void) {
119
return wasmfs_create_node_backend(".");
1210
}
13-
14-
} // namespace wasmfs

system/lib/wasmfs/wasmfs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ WasmFS::~WasmFS() {
8989

9090
// Special backends that want to install themselves as the root use this hook.
9191
// Otherwise, we use the default backends.
92-
__attribute__((weak)) extern backend_t wasmfs_create_root_dir(void) {
92+
__attribute__((weak)) extern "C" backend_t wasmfs_create_root_dir(void) {
9393
#ifdef WASMFS_CASE_INSENSITIVE
9494
return createIgnoreCaseBackend([]() { return createMemoryBackend(); });
9595
#else

0 commit comments

Comments
 (0)