Fix "PR c++/92804 ICE trying to use concept as a nested-name-specifier"
[official-gcc.git] / libgo / go / net / main_cloexec_test.go
blob28974e832ee283b139643d43dd05ae3331f53b35
1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build dragonfly freebsd hurd linux netbsd openbsd
7 package net
9 import "internal/poll"
11 func init() {
12 extraTestHookInstallers = append(extraTestHookInstallers, installAccept4TestHook)
13 extraTestHookUninstallers = append(extraTestHookUninstallers, uninstallAccept4TestHook)
16 var (
17 // Placeholders for saving original socket system calls.
18 origAccept4 = poll.Accept4Func
21 func installAccept4TestHook() {
22 poll.Accept4Func = sw.Accept4
25 func uninstallAccept4TestHook() {
26 poll.Accept4Func = origAccept4