github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/os/seek_unix_bad.go (about) 1 //go:build (linux && !baremetal && 386) || (linux && !baremetal && arm && !wasi) 2 3 package os 4 5 import ( 6 "syscall" 7 ) 8 9 // On linux, we use upstream's syscall package. 10 // But we do not yet implement Go Assembly, so we don't see a few functions written in assembly there. 11 // In particular, on i386 and arm, the function syscall.seek is missing, breaking syscall.Seek. 12 // This in turn causes os.(*File).Seek, time, io/fs, and path/filepath to fail to link. 13 // 14 // To temporarly let all the above at least link, provide a stub for syscall.seek. 15 // This belongs in syscall, but on linux, we use upstream's syscall. 16 // Remove once we support Go Assembly. 17 // TODO: make this a non-stub, and thus fix the whole problem? 18 19 //export syscall.seek 20 func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) { 21 return 0, syscall.ENOTSUP 22 }