diff --git a/c/libuv/_wrap/fs.c b/c/libuv/_wrap/fs.c new file mode 100644 index 00000000..6728e4ee --- /dev/null +++ b/c/libuv/_wrap/fs.c @@ -0,0 +1,6 @@ +#include + +uv_fs_t uv_fs_new() { + uv_fs_t req; + return req; +} \ No newline at end of file diff --git a/c/libuv/fs.go b/c/libuv/fs.go index 62a3c193..b29c815b 100644 --- a/c/libuv/fs.go +++ b/c/libuv/fs.go @@ -106,6 +106,9 @@ type FsPollCb func(handle *FsPoll, status c.Int, events c.Int) /* Fs related function and method */ +//go:linkname FsNew C.uv_fs_new +func FsNew() Fs + //go:linkname FsGetType C.uv_fs_get_type func FsGetType(req *Fs) FsType diff --git a/c/libuv/libuv.go b/c/libuv/libuv.go index 9465f00e..b11d6ad9 100644 --- a/c/libuv/libuv.go +++ b/c/libuv/libuv.go @@ -9,6 +9,7 @@ import ( const ( LLGoPackage = "link: $(pkg-config --libs libuv); -luv" + LLGoFiles = "$(pkg-config --cflags libuv): _wrap/fs.c" ) // ----------------------------------------------