Make lang/go work past the ABI break, with 64-bit time_t.

Tested by DsP.

ok sthen@
This commit is contained in:
jsing 2013-08-25 11:57:27 +00:00
parent e1aa16ecbd
commit 88e063095f
17 changed files with 1330 additions and 1 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.12 2013/08/07 21:32:08 naddy Exp $
# $OpenBSD: Makefile,v 1.13 2013/08/25 11:57:27 jsing Exp $
ONLY_FOR_ARCHS = amd64 i386
COMMENT = Go programming language
VERSION = 1.1.1
REVISION = 0
EXTRACT_SUFX = .src.tar.gz
DISTNAME = go${VERSION}
PKGNAME = go-${VERSION}

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-src_pkg_runtime_defs_openbsd_386_h,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/runtime/defs_openbsd_386.h.orig Sun Aug 18 14:12:09 2013
+++ src/pkg/runtime/defs_openbsd_386.h Sun Aug 18 14:15:02 2013
@@ -112,7 +112,7 @@ struct Sigcontext {
int32 sc_eflags;
int32 sc_esp;
int32 sc_ss;
- int32 sc_onstack;
+ int32 __sc_unused;
int32 sc_mask;
int32 sc_trapno;
int32 sc_err;
@@ -134,11 +134,11 @@ struct StackT {
};
struct Timespec {
- int32 tv_sec;
+ int64 tv_sec;
int32 tv_nsec;
};
struct Timeval {
- int32 tv_sec;
+ int64 tv_sec;
int32 tv_usec;
};
struct Itimerval {

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-src_pkg_runtime_defs_openbsd_amd64_h,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/runtime/defs_openbsd_amd64.h.orig Sun Aug 18 14:12:19 2013
+++ src/pkg/runtime/defs_openbsd_amd64.h Sun Aug 18 14:15:43 2013
@@ -124,7 +124,7 @@ struct Sigcontext {
int64 sc_rsp;
int64 sc_ss;
void *sc_fpstate;
- int32 sc_onstack;
+ int32 __sc_unused;
int32 sc_mask;
};
struct Siginfo {
@@ -145,8 +145,7 @@ struct StackT {
};
struct Timespec {
- int32 tv_sec;
- byte Pad_cgo_0[4];
+ int64 tv_sec;
int64 tv_nsec;
};
struct Timeval {

View File

@ -0,0 +1,104 @@
$OpenBSD: patch-src_pkg_runtime_sys_openbsd_386_s,v 1.5 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/runtime/sys_openbsd_386.s.orig Sun Aug 18 14:12:32 2013
+++ src/pkg/runtime/sys_openbsd_386.s Sun Aug 18 14:38:13 2013
@@ -44,21 +44,22 @@ TEXT runtime·write(SB),7,$-4
INT $0x80
RET
-TEXT runtime·usleep(SB),7,$20
+TEXT runtime·usleep(SB),7,$24
MOVL $0, DX
MOVL usec+0(FP), AX
MOVL $1000000, CX
DIVL CX
- MOVL AX, 12(SP) // tv_sec
+ MOVL AX, 12(SP) // tv_sec - l32
+ MOVL $0, 16(SP) // tv_sec - h32
MOVL $1000, AX
MULL DX
- MOVL AX, 16(SP) // tv_nsec
+ MOVL AX, 20(SP) // tv_nsec
MOVL $0, 0(SP)
LEAL 12(SP), AX
MOVL AX, 4(SP) // arg 1 - rqtp
MOVL $0, 8(SP) // arg 2 - rmtp
- MOVL $240, AX // sys_nanosleep
+ MOVL $91, AX // sys_nanosleep
INT $0x80
RET
@@ -106,43 +107,46 @@ TEXT runtime·madvise(SB),7,$-4
RET
TEXT runtime·setitimer(SB),7,$-4
- MOVL $83, AX
+ MOVL $69, AX
INT $0x80
RET
// func now() (sec int64, nsec int32)
TEXT time·now(SB), 7, $32
- MOVL $232, AX
LEAL 12(SP), BX
- MOVL $0, 4(SP)
- MOVL BX, 8(SP)
+ MOVL $0, 4(SP) // arg 1 - clock_id
+ MOVL BX, 8(SP) // arg 2 - tp
+ MOVL $87, AX // sys_clock_gettime
INT $0x80
- MOVL 12(SP), AX // sec
- MOVL 16(SP), BX // nsec
- // sec is in AX, nsec in BX
+ MOVL 12(SP), AX // sec - l32
MOVL AX, sec+0(FP)
- MOVL $0, sec+4(FP)
+ MOVL 16(SP), AX // sec - h32
+ MOVL AX, sec+4(FP)
+
+ MOVL 20(SP), BX // nsec
MOVL BX, nsec+8(FP)
RET
// int64 nanotime(void) so really
// void nanotime(int64 *nsec)
TEXT runtime·nanotime(SB),7,$32
- MOVL $232, AX
LEAL 12(SP), BX
- MOVL $0, 4(SP)
- MOVL BX, 8(SP)
+ MOVL $0, 4(SP) // arg 1 - clock_id
+ MOVL BX, 8(SP) // arg 2 - tp
+ MOVL $87, AX // sys_clock_gettime
INT $0x80
- MOVL 12(SP), AX // sec
- MOVL 16(SP), BX // nsec
- // sec is in AX, nsec in BX
- // convert to DX:AX nsec
- MOVL $1000000000, CX
- MULL CX
+ MOVL 16(SP), CX // sec - h32
+ IMULL $1000000000, CX
+
+ MOVL 12(SP), AX // sec - l32
+ MOVL $1000000000, BX
+ MULL BX // result in dx:ax
+
+ MOVL 20(SP), BX // nsec
ADDL BX, AX
- ADCL $0, DX
+ ADCL CX, DX // add high bits with carry
MOVL ret+0(FP), DI
MOVL AX, 0(DI)
@@ -322,7 +326,7 @@ TEXT runtime·osyield(SB),7,$-4
RET
TEXT runtime·thrsleep(SB),7,$-4
- MOVL $300, AX // sys___thrsleep
+ MOVL $94, AX // sys___thrsleep
INT $0x80
RET

View File

@ -0,0 +1,67 @@
$OpenBSD: patch-src_pkg_runtime_sys_openbsd_amd64_s,v 1.5 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/runtime/sys_openbsd_amd64.s.orig Sun Aug 18 14:12:42 2013
+++ src/pkg/runtime/sys_openbsd_amd64.s Sun Aug 18 14:42:17 2013
@@ -61,7 +61,7 @@ TEXT runtime·thrsleep(SB),7,$0
MOVQ 24(SP), DX // arg 3 - tp
MOVQ 32(SP), R10 // arg 4 - lock
MOVQ 40(SP), R8 // arg 5 - abort
- MOVL $300, AX // sys___thrsleep
+ MOVL $94, AX // sys___thrsleep
SYSCALL
RET
@@ -129,7 +129,7 @@ TEXT runtime·usleep(SB),7,$16
MOVQ SP, DI // arg 1 - rqtp
MOVQ $0, SI // arg 2 - rmtp
- MOVL $240, AX // sys_nanosleep
+ MOVL $91, AX // sys_nanosleep
SYSCALL
RET
@@ -137,7 +137,7 @@ TEXT runtime·raise(SB),7,$16
MOVL $299, AX // sys_getthrid
SYSCALL
MOVQ AX, DI // arg 1 - pid
- MOVL sig+0(FP), SI // arg 2 - signum
+ MOVL sig+0(FP), SI // arg 2 - signum
MOVL $37, AX // sys_kill
SYSCALL
RET
@@ -146,7 +146,7 @@ TEXT runtime·setitimer(SB),7,$-8
MOVL 8(SP), DI // arg 1 - which
MOVQ 16(SP), SI // arg 2 - itv
MOVQ 24(SP), DX // arg 3 - oitv
- MOVL $83, AX // sys_setitimer
+ MOVL $69, AX // sys_setitimer
SYSCALL
RET
@@ -154,9 +154,9 @@ TEXT runtime·setitimer(SB),7,$-8
TEXT time·now(SB), 7, $32
MOVQ $0, DI // arg 1 - clock_id
LEAQ 8(SP), SI // arg 2 - tp
- MOVL $232, AX // sys_clock_gettime
+ MOVL $87, AX // sys_clock_gettime
SYSCALL
- MOVL 8(SP), AX // sec
+ MOVQ 8(SP), AX // sec
MOVQ 16(SP), DX // nsec
// sec is in AX, nsec in DX
@@ -164,12 +164,12 @@ TEXT time·now(SB), 7, $32
MOVL DX, nsec+8(FP)
RET
-TEXT runtime·nanotime(SB),7,$32
+TEXT runtime·nanotime(SB),7,$24
MOVQ $0, DI // arg 1 - clock_id
LEAQ 8(SP), SI // arg 2 - tp
- MOVL $232, AX // sys_clock_gettime
+ MOVL $87, AX // sys_clock_gettime
SYSCALL
- MOVL 8(SP), AX // sec
+ MOVQ 8(SP), AX // sec
MOVQ 16(SP), DX // nsec
// sec is in AX, nsec in DX

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_pkg_syscall_syscall_openbsd_386_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/syscall_openbsd_386.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/syscall_openbsd_386.go Sun Aug 18 17:53:55 2013
@@ -9,7 +9,7 @@ func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
+ ts.Sec = int64(nsec / 1e9)
ts.Nsec = int32(nsec % 1e9)
return
}
@@ -19,7 +19,7 @@ func TimevalToNsec(tv Timeval) int64 { return int64(tv
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
+ tv.Sec = int64(nsec / 1e9)
return
}

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-src_pkg_syscall_syscall_openbsd_amd64_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/syscall_openbsd_amd64.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/syscall_openbsd_amd64.go Sun Aug 18 17:53:55 2013
@@ -9,7 +9,7 @@ func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
+ ts.Sec = nsec / 1e9
ts.Nsec = nsec % 1e9
return
}
@@ -19,12 +19,12 @@ func TimevalToNsec(tv Timeval) int64 { return int64(tv
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
+ tv.Sec = nsec / 1e9
return
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
+ k.Ident = uint64(fd)
k.Filter = int16(mode)
k.Flags = uint16(flags)
}

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_pkg_syscall_syscall_openbsd_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/syscall_openbsd.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/syscall_openbsd.go Sun Aug 18 17:53:55 2013
@@ -90,6 +90,11 @@ func Pipe(p []int) (err error) {
return
}
+//sys getdents(fd int, buf []byte) (n int, err error)
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ return getdents(fd, buf)
+}
+
// TODO
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
return -1, ENOSYS
@@ -119,7 +124,6 @@ func sendfile(outfd int, infd int, offset *int64, coun
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
//sys Fsync(fd int) (err error)
//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
//sysnb Getegid() (egid int)
//sysnb Geteuid() (uid int)
//sys Getfsstat(buf []Statfs_t, flags int) (n int, err error)

View File

@ -0,0 +1,150 @@
$OpenBSD: patch-src_pkg_syscall_zerrors_openbsd_386_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zerrors_openbsd_386.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zerrors_openbsd_386.go Sun Aug 18 17:53:55 2013
@@ -77,7 +77,7 @@ const (
BIOCGFILDROP = 0x40044278
BIOCGHDRCMPLT = 0x40044274
BIOCGRSIG = 0x40044273
- BIOCGRTIMEOUT = 0x4008426e
+ BIOCGRTIMEOUT = 0x400c426e
BIOCGSTATS = 0x4008426f
BIOCIMMEDIATE = 0x80044270
BIOCLOCK = 0x20004276
@@ -91,7 +91,7 @@ const (
BIOCSFILDROP = 0x80044279
BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044272
- BIOCSRTIMEOUT = 0x8008426d
+ BIOCSRTIMEOUT = 0x800c426d
BIOCVERSION = 0x40044271
BPF_A = 0x10
BPF_ABS = 0x20
@@ -197,8 +197,6 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EMT_TAGOVF = 0x1
- EMUL_ENABLED = 0x1
- EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9
ETHERMIN = 0x2e
ETHERMTU = 0x5dc
@@ -439,6 +437,7 @@ const (
F_WRLCK = 0x3
HUPCL = 0x4000
ICANON = 0x100
+ ICMP6_FILTER = 0x12
ICRNL = 0x100
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
@@ -712,6 +711,8 @@ const (
IPPROTO_AH = 0x33
IPPROTO_CARP = 0x70
IPPROTO_DIVERT = 0x102
+ IPPROTO_DIVERT_INIT = 0x2
+ IPPROTO_DIVERT_RESP = 0x1
IPPROTO_DONE = 0x101
IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8
@@ -782,6 +783,7 @@ const (
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
IPV6_RECVPATHMTU = 0x2b
@@ -806,6 +808,7 @@ const (
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
+ IP_DIVERTFL = 0x1022
IP_DROP_MEMBERSHIP = 0xd
IP_ESP_NETWORK_LEVEL = 0x16
IP_ESP_TRANS_LEVEL = 0x15
@@ -925,6 +928,9 @@ const (
PARODD = 0x2000
PENDIN = 0x20000000
PF_FLUSH = 0x1
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
PT_MASK = 0x3ff000
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
@@ -1033,7 +1039,7 @@ const (
SIOCBRDGGHT = 0xc0146951
SIOCBRDGGIFFLGS = 0xc054693e
SIOCBRDGGMA = 0xc0146953
- SIOCBRDGGPARAM = 0xc0386958
+ SIOCBRDGGPARAM = 0xc03c6958
SIOCBRDGGPRI = 0xc0146950
SIOCBRDGGRL = 0xc028694f
SIOCBRDGGSIFS = 0xc054693c
@@ -1063,6 +1069,7 @@ const (
SIOCGETPFSYNC = 0xc02069f8
SIOCGETSGCNT = 0xc0147534
SIOCGETVIFCNT = 0xc0147533
+ SIOCGETVLAN = 0xc0206990
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921
SIOCGIFASYNCMAP = 0xc020697c
@@ -1073,9 +1080,9 @@ const (
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc024698b
- SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc024698a
SIOCGIFGROUP = 0xc0246988
+ SIOCGIFHARDMTU = 0xc02069a5
SIOCGIFMEDIA = 0xc0286936
SIOCGIFMETRIC = 0xc0206917
SIOCGIFMTU = 0xc020697e
@@ -1092,6 +1099,7 @@ const (
SIOCGLIFPHYRTABLE = 0xc02069a2
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
+ SIOCGSPPPPARAMS = 0xc0206994
SIOCGVH = 0xc02069f6
SIOCIFCREATE = 0x8020697a
SIOCIFDESTROY = 0x80206979
@@ -1100,6 +1108,7 @@ const (
SIOCSETLABEL = 0x80206999
SIOCSETPFLOW = 0x802069fd
SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
SIOCSHIWAT = 0x80047300
SIOCSIFADDR = 0x8020690c
SIOCSIFASYNCMAP = 0x8020697d
@@ -1108,7 +1117,6 @@ const (
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
SIOCSIFGATTR = 0x8024698c
- SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020691f
SIOCSIFMEDIA = 0xc0206935
SIOCSIFMETRIC = 0x80206918
@@ -1124,6 +1132,7 @@ const (
SIOCSLIFPHYRTABLE = 0x802069a1
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
+ SIOCSSPPPPARAMS = 0x80206993
SIOCSVH = 0xc02069f5
SOCK_DGRAM = 0x2
SOCK_RAW = 0x3
@@ -1167,6 +1176,7 @@ const (
TCP_MD5SIG = 0x4
TCP_MSS = 0x200
TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
TCP_NSTATES = 0xb
TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2
@@ -1186,7 +1196,7 @@ const (
TIOCGETD = 0x4004741a
TIOCGFLAGS = 0x4004745d
TIOCGPGRP = 0x40047477
- TIOCGTSTAMP = 0x4008745b
+ TIOCGTSTAMP = 0x400c745b
TIOCGWINSZ = 0x40087468
TIOCMBIC = 0x8004746b
TIOCMBIS = 0x8004746c

View File

@ -0,0 +1,131 @@
$OpenBSD: patch-src_pkg_syscall_zerrors_openbsd_amd64_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zerrors_openbsd_amd64.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zerrors_openbsd_amd64.go Sun Aug 18 17:53:55 2013
@@ -140,10 +140,8 @@ const (
BPF_W = 0x0
BPF_X = 0x8
BRKINT = 0x2
- CCR0_FLUSH = 0x10
CFLUSH = 0xf
CLOCAL = 0x8000
- CPUID_CFLUSH = 0x80000
CREAD = 0x800
CS5 = 0x0
CS6 = 0x100
@@ -198,13 +196,7 @@ const (
ECHOKE = 0x1
ECHONL = 0x10
ECHOPRT = 0x20
- EFER_LMA = 0x400
- EFER_LME = 0x100
- EFER_NXE = 0x800
- EFER_SCE = 0x1
EMT_TAGOVF = 0x1
- EMUL_ENABLED = 0x1
- EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9
ETHERMIN = 0x2e
ETHERMTU = 0x5dc
@@ -445,6 +437,7 @@ const (
F_WRLCK = 0x3
HUPCL = 0x4000
ICANON = 0x100
+ ICMP6_FILTER = 0x12
ICRNL = 0x100
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
@@ -718,6 +711,8 @@ const (
IPPROTO_AH = 0x33
IPPROTO_CARP = 0x70
IPPROTO_DIVERT = 0x102
+ IPPROTO_DIVERT_INIT = 0x2
+ IPPROTO_DIVERT_RESP = 0x1
IPPROTO_DONE = 0x101
IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8
@@ -788,6 +783,7 @@ const (
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
IPV6_RECVPATHMTU = 0x2b
@@ -812,6 +808,7 @@ const (
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
+ IP_DIVERTFL = 0x1022
IP_DROP_MEMBERSHIP = 0xd
IP_ESP_NETWORK_LEVEL = 0x16
IP_ESP_TRANS_LEVEL = 0x15
@@ -931,7 +928,9 @@ const (
PARODD = 0x2000
PENDIN = 0x20000000
PF_FLUSH = 0x1
- PMC5_PIPELINE_FLUSH = 0x15
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
@@ -1069,6 +1068,7 @@ const (
SIOCGETPFSYNC = 0xc02069f8
SIOCGETSGCNT = 0xc0207534
SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921
SIOCGIFASYNCMAP = 0xc020697c
@@ -1079,9 +1079,9 @@ const (
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc028698b
- SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc028698a
SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
SIOCGIFMEDIA = 0xc0306936
SIOCGIFMETRIC = 0xc0206917
SIOCGIFMTU = 0xc020697e
@@ -1098,6 +1098,7 @@ const (
SIOCGLIFPHYRTABLE = 0xc02069a2
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
+ SIOCGSPPPPARAMS = 0xc0206994
SIOCGVH = 0xc02069f6
SIOCIFCREATE = 0x8020697a
SIOCIFDESTROY = 0x80206979
@@ -1106,6 +1107,7 @@ const (
SIOCSETLABEL = 0x80206999
SIOCSETPFLOW = 0x802069fd
SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
SIOCSHIWAT = 0x80047300
SIOCSIFADDR = 0x8020690c
SIOCSIFASYNCMAP = 0x8020697d
@@ -1114,7 +1116,6 @@ const (
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
SIOCSIFGATTR = 0x8028698c
- SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020691f
SIOCSIFMEDIA = 0xc0206935
SIOCSIFMETRIC = 0x80206918
@@ -1130,6 +1131,7 @@ const (
SIOCSLIFPHYRTABLE = 0x802069a1
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
+ SIOCSSPPPPARAMS = 0x80206993
SIOCSVH = 0xc02069f5
SOCK_DGRAM = 0x2
SOCK_RAW = 0x3
@@ -1173,6 +1175,7 @@ const (
TCP_MD5SIG = 0x4
TCP_MSS = 0x200
TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
TCP_NSTATES = 0xb
TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-src_pkg_syscall_zsyscall_openbsd_386_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zsyscall_openbsd_386.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zsyscall_openbsd_386.go Sun Aug 18 17:53:55 2013
@@ -268,6 +268,23 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -499,23 +516,6 @@ func Fsync(fd int) (err error) {
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
if e1 != 0 {
err = e1
}

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-src_pkg_syscall_zsyscall_openbsd_amd64_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zsyscall_openbsd_amd64.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zsyscall_openbsd_amd64.go Sun Aug 18 17:53:55 2013
@@ -268,6 +268,23 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -499,23 +516,6 @@ func Fsync(fd int) (err error) {
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
if e1 != 0 {
err = e1
}

View File

@ -0,0 +1,46 @@
$OpenBSD: patch-src_pkg_syscall_zsysctl_openbsd_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zsysctl_openbsd.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zsysctl_openbsd.go Sun Aug 18 17:53:55 2013
@@ -87,7 +87,6 @@ var sysctlMib = []mibentry{
{"kern.proc", []_C_int{1, 66}},
{"kern.random", []_C_int{1, 31}},
{"kern.rawpartition", []_C_int{1, 24}},
- {"kern.rthreads", []_C_int{1, 74}},
{"kern.saved_ids", []_C_int{1, 20}},
{"kern.securelevel", []_C_int{1, 9}},
{"kern.seminfo", []_C_int{1, 61}},
@@ -227,7 +226,6 @@ var sysctlMib = []mibentry{
{"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
{"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
{"net.inet6.ip6.kame_version", []_C_int{4, 24, 17, 20}},
- {"net.inet6.ip6.keepfaith", []_C_int{4, 24, 17, 13}},
{"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
{"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
{"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
@@ -258,26 +256,6 @@ var sysctlMib = []mibentry{
{"net.mpls.ttl", []_C_int{4, 33, 2}},
{"net.pflow.stats", []_C_int{4, 34, 1}},
{"net.pipex.enable", []_C_int{4, 35, 1}},
- {"user.bc_base_max", []_C_int{8, 2}},
- {"user.bc_dim_max", []_C_int{8, 3}},
- {"user.bc_scale_max", []_C_int{8, 4}},
- {"user.bc_string_max", []_C_int{8, 5}},
- {"user.coll_weights_max", []_C_int{8, 6}},
- {"user.cs_path", []_C_int{8, 1}},
- {"user.expr_nest_max", []_C_int{8, 7}},
- {"user.line_max", []_C_int{8, 8}},
- {"user.posix2_c_bind", []_C_int{8, 11}},
- {"user.posix2_c_dev", []_C_int{8, 12}},
- {"user.posix2_char_term", []_C_int{8, 13}},
- {"user.posix2_fort_dev", []_C_int{8, 14}},
- {"user.posix2_fort_run", []_C_int{8, 15}},
- {"user.posix2_localedef", []_C_int{8, 16}},
- {"user.posix2_sw_dev", []_C_int{8, 17}},
- {"user.posix2_upe", []_C_int{8, 18}},
- {"user.posix2_version", []_C_int{8, 10}},
- {"user.re_dup_max", []_C_int{8, 9}},
- {"user.stream_max", []_C_int{8, 19}},
- {"user.tzname_max", []_C_int{8, 20}},
{"vm.anonmin", []_C_int{2, 7}},
{"vm.loadavg", []_C_int{2, 2}},
{"vm.maxslp", []_C_int{2, 10}},

View File

@ -0,0 +1,184 @@
$OpenBSD: patch-src_pkg_syscall_zsysnum_openbsd_386_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zsysnum_openbsd_386.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zsysnum_openbsd_386.go Sun Aug 18 17:53:55 2013
@@ -10,10 +10,10 @@ const (
SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
SYS_OPEN = 5 // { int sys_open(const char *path, \
SYS_CLOSE = 6 // { int sys_close(int fd); }
- SYS_WAIT4 = 7 // { pid_t sys_wait4(pid_t pid, int *status, int options, \
SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
@@ -21,6 +21,7 @@ const (
SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
SYS_GETPID = 20 // { pid_t sys_getpid(void); }
SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
@@ -39,8 +40,11 @@ const (
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
SYS_SYNC = 36 // { void sys_sync(void); }
SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
@@ -51,6 +55,7 @@ const (
SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
SYS_ACCT = 51 // { int sys_acct(const char *path); }
SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
SYS_REBOOT = 55 // { int sys_reboot(int opt); }
SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
@@ -59,36 +64,52 @@ const (
SYS_EXECVE = 59 // { int sys_execve(const char *path, \
SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, \
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, \
SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
- SYS_SETITIMER = 83 // { int sys_setitimer(int which, \
- SYS_GETITIMER = 86 // { int sys_getitimer(int which, \
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
- SYS_SELECT = 93 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
SYS_FSYNC = 95 // { int sys_fsync(int fd); }
SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
- SYS_GETTIMEOFDAY = 116 // { int sys_gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int sys_getrusage(int who, struct rusage *rusage); }
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
SYS_READV = 120 // { ssize_t sys_readv(int fd, \
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
- SYS_SETTIMEOFDAY = 122 // { int sys_settimeofday(const struct timeval *tv, \
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
@@ -101,7 +122,6 @@ const (
SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
- SYS_UTIMES = 138 // { int sys_utimes(const char *path, \
SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
SYS_SETSID = 147 // { int sys_setsid(void); }
SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
@@ -122,21 +142,17 @@ const (
SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int sys___sysctl(int *name, u_int namelen, \
+ SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
- SYS_FUTIMES = 206 // { int sys_futimes(int fd, \
SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
- SYS_CLOCK_GETTIME = 232 // { int sys_clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int sys_clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 234 // { int sys_clock_getres(clockid_t clock_id, \
- SYS_NANOSLEEP = 240 // { int sys_nanosleep(const struct timespec *rqtp, \
SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
@@ -148,7 +164,6 @@ const (
SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
SYS_KQUEUE = 269 // { int sys_kqueue(void); }
- SYS_KEVENT = 270 // { int sys_kevent(int fd, \
SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
@@ -160,32 +175,22 @@ const (
SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
- SYS_STAT = 291 // { int sys_stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 292 // { int sys_fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 293 // { int sys_lstat(const char *path, struct stat *ub); }
SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
- SYS___THRSLEEP = 300 // { int sys___thrsleep(const volatile void *ident, \
SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
- SYS_GETFSSTAT = 306 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
- SYS_STATFS = 307 // { int sys_statfs(const char *path, \
- SYS_FSTATFS = 308 // { int sys_fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 309 // { int sys_fhstatfs(const fhandle_t *fhp, \
SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
- SYS_GETDIRENTRIES = 312 // { int sys_getdirentries(int fd, char *buf, \
SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
- SYS_FSTATAT = 316 // { int sys_fstatat(int fd, const char *path, \
SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
@@ -195,8 +200,6 @@ const (
SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
- SYS_UTIMENSAT = 326 // { int sys_utimensat(int fd, const char *path, \
- SYS_FUTIMENS = 327 // { int sys_futimens(int fd, \
SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
)

View File

@ -0,0 +1,184 @@
$OpenBSD: patch-src_pkg_syscall_zsysnum_openbsd_amd64_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/zsysnum_openbsd_amd64.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/zsysnum_openbsd_amd64.go Sun Aug 18 17:53:55 2013
@@ -10,10 +10,10 @@ const (
SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
SYS_OPEN = 5 // { int sys_open(const char *path, \
SYS_CLOSE = 6 // { int sys_close(int fd); }
- SYS_WAIT4 = 7 // { pid_t sys_wait4(pid_t pid, int *status, int options, \
SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
@@ -21,6 +21,7 @@ const (
SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
SYS_GETPID = 20 // { pid_t sys_getpid(void); }
SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
@@ -39,8 +40,11 @@ const (
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
SYS_SYNC = 36 // { void sys_sync(void); }
SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
@@ -51,6 +55,7 @@ const (
SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
SYS_ACCT = 51 // { int sys_acct(const char *path); }
SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
SYS_REBOOT = 55 // { int sys_reboot(int opt); }
SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
@@ -59,36 +64,52 @@ const (
SYS_EXECVE = 59 // { int sys_execve(const char *path, \
SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, \
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, \
SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
- SYS_SETITIMER = 83 // { int sys_setitimer(int which, \
- SYS_GETITIMER = 86 // { int sys_getitimer(int which, \
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
- SYS_SELECT = 93 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
SYS_FSYNC = 95 // { int sys_fsync(int fd); }
SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
- SYS_GETTIMEOFDAY = 116 // { int sys_gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int sys_getrusage(int who, struct rusage *rusage); }
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
SYS_READV = 120 // { ssize_t sys_readv(int fd, \
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
- SYS_SETTIMEOFDAY = 122 // { int sys_settimeofday(const struct timeval *tv, \
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
@@ -101,7 +122,6 @@ const (
SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
- SYS_UTIMES = 138 // { int sys_utimes(const char *path, \
SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
SYS_SETSID = 147 // { int sys_setsid(void); }
SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
@@ -122,21 +142,17 @@ const (
SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int sys___sysctl(int *name, u_int namelen, \
+ SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \
SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
- SYS_FUTIMES = 206 // { int sys_futimes(int fd, \
SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
- SYS_CLOCK_GETTIME = 232 // { int sys_clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int sys_clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 234 // { int sys_clock_getres(clockid_t clock_id, \
- SYS_NANOSLEEP = 240 // { int sys_nanosleep(const struct timespec *rqtp, \
SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
@@ -148,7 +164,6 @@ const (
SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
SYS_KQUEUE = 269 // { int sys_kqueue(void); }
- SYS_KEVENT = 270 // { int sys_kevent(int fd, \
SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
@@ -160,32 +175,22 @@ const (
SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
- SYS_STAT = 291 // { int sys_stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 292 // { int sys_fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 293 // { int sys_lstat(const char *path, struct stat *ub); }
SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
- SYS___THRSLEEP = 300 // { int sys___thrsleep(const volatile void *ident, \
SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
- SYS_GETFSSTAT = 306 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
- SYS_STATFS = 307 // { int sys_statfs(const char *path, \
- SYS_FSTATFS = 308 // { int sys_fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 309 // { int sys_fhstatfs(const fhandle_t *fhp, \
SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
- SYS_GETDIRENTRIES = 312 // { int sys_getdirentries(int fd, char *buf, \
SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
- SYS_FSTATAT = 316 // { int sys_fstatat(int fd, const char *path, \
SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
@@ -195,8 +200,6 @@ const (
SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
- SYS_UTIMENSAT = 326 // { int sys_utimensat(int fd, const char *path, \
- SYS_FUTIMENS = 327 // { int sys_futimens(int fd, \
SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
)

View File

@ -0,0 +1,124 @@
$OpenBSD: patch-src_pkg_syscall_ztypes_openbsd_386_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/ztypes_openbsd_386.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/ztypes_openbsd_386.go Sun Aug 18 17:53:55 2013
@@ -19,12 +19,12 @@ type (
)
type Timespec struct {
- Sec int32
+ Sec int64
Nsec int32
}
type Timeval struct {
- Sec int32
+ Sec int64
Usec int32
}
@@ -72,14 +72,13 @@ const (
)
type Stat_t struct {
- Dev int32
- Ino uint32
Mode uint32
+ Dev int32
+ Ino uint64
Nlink uint32
Uid uint32
Gid uint32
Rdev int32
- Lspare0 int32
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -88,9 +87,7 @@ type Stat_t struct {
Blksize uint32
Flags uint32
Gen uint32
- Lspare1 int32
X__st_birthtim Timespec
- Qspare [2]int64
}
type Statfs_t struct {
@@ -110,11 +107,12 @@ type Statfs_t struct {
F_fsid Fsid
F_namemax uint32
F_owner uint32
- F_ctime uint32
- F_spare [3]uint32
+ F_ctime uint64
F_fstypename [16]int8
F_mntonname [90]int8
F_mntfromname [90]int8
+ F_mntfromspec [90]int8
+ Pad_cgo_0 [2]byte
Mount_info [160]byte
}
@@ -127,11 +125,13 @@ type Flock_t struct {
}
type Dirent struct {
- Fileno uint32
- Reclen uint16
- Type uint8
- Namlen uint8
- Name [256]int8
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ X__d_padding [4]uint8
+ Name [256]int8
}
type Fsid struct {
@@ -226,6 +226,15 @@ type Inet6Pktinfo struct {
Ifindex uint32
}
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
const (
SizeofSockaddrInet4 = 0x10
SizeofSockaddrInet6 = 0x1c
@@ -238,6 +247,8 @@ const (
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
)
const (
@@ -251,7 +262,7 @@ type Kevent_t struct {
Filter int16
Flags uint16
Fflags uint32
- Data int32
+ Data int64
Udata *byte
}
@@ -260,8 +271,8 @@ type FdSet struct {
}
const (
- SizeofIfMsghdr = 0xe8
- SizeofIfData = 0xd0
+ SizeofIfMsghdr = 0xec
+ SizeofIfData = 0xd4
SizeofIfaMsghdr = 0x18
SizeofIfAnnounceMsghdr = 0x1a
SizeofRtMsghdr = 0x58

View File

@ -0,0 +1,117 @@
$OpenBSD: patch-src_pkg_syscall_ztypes_openbsd_amd64_go,v 1.1 2013/08/25 11:57:27 jsing Exp $
--- src/pkg/syscall/ztypes_openbsd_amd64.go.orig Sun Aug 18 17:53:34 2013
+++ src/pkg/syscall/ztypes_openbsd_amd64.go Sun Aug 18 17:53:55 2013
@@ -19,9 +19,8 @@ type (
)
type Timespec struct {
- Sec int32
- Pad_cgo_0 [4]byte
- Nsec int64
+ Sec int64
+ Nsec int64
}
type Timeval struct {
@@ -73,14 +72,13 @@ const (
)
type Stat_t struct {
- Dev int32
- Ino uint32
Mode uint32
+ Dev int32
+ Ino uint64
Nlink uint32
Uid uint32
Gid uint32
Rdev int32
- Lspare0 int32
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -89,9 +87,8 @@ type Stat_t struct {
Blksize uint32
Flags uint32
Gen uint32
- Lspare1 int32
+ Pad_cgo_0 [4]byte
X__st_birthtim Timespec
- Qspare [2]int64
}
type Statfs_t struct {
@@ -112,12 +109,12 @@ type Statfs_t struct {
F_fsid Fsid
F_namemax uint32
F_owner uint32
- F_ctime uint32
- F_spare [3]uint32
+ F_ctime uint64
F_fstypename [16]int8
F_mntonname [90]int8
F_mntfromname [90]int8
- Pad_cgo_1 [4]byte
+ F_mntfromspec [90]int8
+ Pad_cgo_1 [2]byte
Mount_info [160]byte
}
@@ -130,11 +127,13 @@ type Flock_t struct {
}
type Dirent struct {
- Fileno uint32
- Reclen uint16
- Type uint8
- Namlen uint8
- Name [256]int8
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ X__d_padding [4]uint8
+ Name [256]int8
}
type Fsid struct {
@@ -231,6 +230,15 @@ type Inet6Pktinfo struct {
Ifindex uint32
}
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
const (
SizeofSockaddrInet4 = 0x10
SizeofSockaddrInet6 = 0x1c
@@ -243,6 +251,8 @@ const (
SizeofMsghdr = 0x30
SizeofCmsghdr = 0xc
SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
)
const (
@@ -252,11 +262,11 @@ const (
)
type Kevent_t struct {
- Ident uint32
+ Ident uint64
Filter int16
Flags uint16
Fflags uint32
- Data int32
+ Data int64
Udata *byte
}