Skip to content

Commit

Permalink
fix missing SendNullByte on NetBSD
Browse files Browse the repository at this point in the history
copy transport_unixcred_openbsd.go to transport_unixcred_netbsd.go
  • Loading branch information
ilylily authored and jsouthworth committed Oct 26, 2021
1 parent 2ece603 commit 836e65c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions transport_unixcred_netbsd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package dbus

import "io"

func (t *unixTransport) SendNullByte() error {
n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil)
if err != nil {
return err
}
if n != 1 {
return io.ErrShortWrite
}
return nil
}

0 comments on commit 836e65c

Please sign in to comment.