Bloody lazy Crapple

No mknodat. Sigh.
This commit is contained in:
Kovid Goyal
2026-04-24 14:22:41 +05:30
parent 2c37fb4845
commit ca7388c145
3 changed files with 43 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
//go:build !darwin
package utils
import (
"fmt"
"os"
"golang.org/x/sys/unix"
)
var _ = fmt.Print
func mknodAt(parent *os.File, name string, mode uint32, dev int) (err error) {
for {
if err = unix.Mknodat(int(parent.Fd()), name, mode, dev); err != unix.EINTR {
break
}
}
return
}