void __wasi_fd_write(...) { // do redirect return original_fd_write(...); } void original_fd_write(...) __attribute__(( __import_module__("wasi_snapshot_preview1"), __import_name__("fd_write") ))