1 //go:build (linux && !baremetal && 386) || (linux && !baremetal && arm && !wasip1 && !wasip2)
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 temporarily 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 }
23