fix(c/libuv): Add libuv fs struct new func

Signed-off-by: hackerchai <i@hackerchai.com>
This commit is contained in:
hackerchai
2024-07-30 15:18:54 +08:00
parent d2975479f2
commit ceac95c81a
3 changed files with 10 additions and 0 deletions

6
c/libuv/_wrap/fs.c Normal file
View File

@@ -0,0 +1,6 @@
#include <uv.h>
uv_fs_t uv_fs_new() {
uv_fs_t req;
return req;
}

View File

@@ -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

View File

@@ -9,6 +9,7 @@ import (
const (
LLGoPackage = "link: $(pkg-config --libs libuv); -luv"
LLGoFiles = "$(pkg-config --cflags libuv): _wrap/fs.c"
)
// ----------------------------------------------