1 // Copyright 2024 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. 4 5 //go:build unix && !dragonfly && !freebsd && !netbsd 6 7 package unix 8 9 import "syscall" 10 11 // POSIX.1-2008 says it's ELOOP. Most platforms follow: 12 // 13 // - aix: O_NOFOLLOW not documented (https://www.ibm.com/docs/ssw_aix_73/o_bostechref/open.html), assuming ELOOP 14 // - android: see linux 15 // - darwin: https://github.com/apple/darwin-xnu/blob/main/bsd/man/man2/open.2 16 // - hurd: who knows if it works at all (https://www.gnu.org/software/hurd/open_issues/open_symlink.html) 17 // - illumos: https://illumos.org/man/2/open 18 // - ios: see darwin 19 // - linux: https://man7.org/linux/man-pages/man2/openat.2.html 20 // - openbsd: https://man.openbsd.org/open.2 21 // - solaris: https://docs.oracle.com/cd/E23824_01/html/821-1463/open-2.html 22 const noFollowErrno = syscall.ELOOP 23