Open
Description
I was playing around with https://github.com/alphahorizonio/unisockets and I've noticed some issues when compiling its code for wasi
, narrowed it down to the snippet below and it seems like it's the issue with <sys/socket.h>
and underlying wasi implementation
package main
/*
#include <sys/socket.h>
*/
import "C"
const (
SHUT_RDWR = int32(C.SHUT_RDWR)
)
func main() {
}
Compiled with tinygo build -target wasi main.go
Output tinygo/lib/wasi-libc/sysroot/include/__header_sys_socket.h:12:35: unexpected token ILLEGAL, expected end of expression
Env
- Tinygo version: 0.26.0
- go version go1.19.4 linux/amd64