Files
JaviandGitHub 2fa6167573 chore: upgrade prometheus to version 3.1.0 (#4805)
* upgrade prometheus to version 3.0.0

* upgrade to version 3.1.0

* linting

* more linting

* escape quotes for metrics labels

* fix last test

* changelog

* added source to the logger

* fix go.sum

* improve tests to cover prometheus changes in validation regex
2025-03-14 11:18:44 +01:00

24 lines
496 B
Go

//go:build !dragonfly && !freebsd && !illumos && !linux
// +build !dragonfly,!freebsd,!illumos,!linux
package socket
import (
"fmt"
"runtime"
"golang.org/x/sys/unix"
)
const sysAccept = "accept"
// accept wraps accept(2).
func accept(fd, flags int) (int, unix.Sockaddr, error) {
if flags != 0 {
// These operating systems have no support for flags to accept(2).
return 0, nil, fmt.Errorf("socket: Conn.Accept flags are ineffective on %s", runtime.GOOS)
}
return unix.Accept(fd)
}