mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
More pointless UNIX variability
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//go:build !darwin
|
||||
//go:build !darwin && !freebsd && !dragonfly
|
||||
|
||||
package utils
|
||||
|
||||
@@ -11,9 +11,18 @@ import (
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
func mknodAt(parent *os.File, name string, mode uint32, dev int) (err error) {
|
||||
func mknodAt(parent *os.File, name string, mode uint32, dev uint64) (err error) {
|
||||
for {
|
||||
if err = unix.Mknodat(int(parent.Fd()), name, mode, dev); err != unix.EINTR {
|
||||
if err = unix.Mknodat(int(parent.Fd()), name, mode, int(dev)); err != unix.EINTR {
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func readLinkAt(parent *os.File, name string, buf []byte) (n int, err error) {
|
||||
for {
|
||||
if n, err = unix.Readlinkat(int(parent.Fd()), name, buf[:]); err != unix.EINTR {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user