Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support compiling on darwin #31

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions splice/pair_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

package splice

import ()

func (p *Pair) LoadFromAt(fd uintptr, sz int, off int64) (int, error) {
panic("not implemented")
return 0, nil
}

func (p *Pair) LoadFrom(fd uintptr, sz int) (int, error) {
panic("not implemented")
return 0, nil
}

func (p *Pair) WriteTo(fd uintptr, n int) (int, error) {
panic("not implemented")
return 0, nil
}

func (p *Pair) discard() {
panic("not implemented")
}
6 changes: 0 additions & 6 deletions splice/splice.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ func fcntl(fd uintptr, cmd int, arg int) (val int, errno syscall.Errno) {
const F_SETPIPE_SZ = 1031
const F_GETPIPE_SZ = 1032

func osPipe() (int, int, error) {
var fds [2]int
err := syscall.Pipe2(fds[:], syscall.O_NONBLOCK)
return fds[0], fds[1], err
}

func newSplicePair() (p *Pair, err error) {
p = &Pair{}
p.r, p.w, err = osPipe()
Expand Down
7 changes: 7 additions & 0 deletions splice/splice_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package splice

import "fmt"

func osPipe() (int, int, error) {
return 0, 0, fmt.Errorf("not implemented")
}
9 changes: 9 additions & 0 deletions splice/splice_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package splice

import "syscall"

func osPipe() (int, int, error) {
var fds [2]int
err := syscall.Pipe2(fds[:], syscall.O_NONBLOCK)
return fds[0], fds[1], err
}
Loading