Skip to content

Commit 966d3f1

Browse files
add initlogfd
1 parent edba97a commit 966d3f1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

cgo/util.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package cgo
2+
3+
/*
4+
#cgo LDFLAGS: -L${SRCDIR}/..
5+
#cgo pkg-config: ${SRCDIR}/../filcrypto.pc
6+
#include "../filcrypto.h"
7+
#include <stdlib.h>
8+
*/
9+
import "C"
10+
11+
func InitLogFd(fd int32) error {
12+
resp := C.init_log_fd(C.int32_t(fd))
13+
defer resp.destroy()
14+
15+
if err := CheckErr(resp); err != nil {
16+
return err
17+
}
18+
19+
return nil
20+
}

0 commit comments

Comments
 (0)