aboutsummaryrefslogtreecommitdiffstats
path: root/community/go-bootstrap/default-sc-getpw-r-size-max.patch
diff options
context:
space:
mode:
authorEivind Uggedal <eivind@uggedal.com>2015-09-30 08:31:12 +0000
committerEivind Uggedal <eivind@uggedal.com>2015-09-30 08:31:12 +0000
commitd241a682bb4bff9b2247c8003e3f086ffb92cd6e (patch)
tree652696333c77c864936204de3dd32505f9d26b83 /community/go-bootstrap/default-sc-getpw-r-size-max.patch
parent394aeb733e12eef9fc309fb8753c28d6095f4551 (diff)
downloadaports-d241a682bb4bff9b2247c8003e3f086ffb92cd6e.tar.bz2
aports-d241a682bb4bff9b2247c8003e3f086ffb92cd6e.tar.xz
community/go-bootstrap: moved from main
Diffstat (limited to 'community/go-bootstrap/default-sc-getpw-r-size-max.patch')
-rw-r--r--community/go-bootstrap/default-sc-getpw-r-size-max.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/community/go-bootstrap/default-sc-getpw-r-size-max.patch b/community/go-bootstrap/default-sc-getpw-r-size-max.patch
new file mode 100644
index 0000000000..f242b5a3cc
--- /dev/null
+++ b/community/go-bootstrap/default-sc-getpw-r-size-max.patch
@@ -0,0 +1,15 @@
+--- a/src/os/user/lookup_unix.go
++++ b/src/os/user/lookup_unix.go
+@@ -57,6 +57,12 @@
+ bufSize = 1024
+ } else {
+ bufSize = C.sysconf(C._SC_GETPW_R_SIZE_MAX)
++ // The musl alternative standard library on Linux
++ // return -1 as specified by POSIX if there are no
++ // hard limit on _SC_GETPW_R_SIZE_MAX.
++ if bufSize == -1 {
++ bufSize = 1024
++ }
+ if bufSize <= 0 || bufSize > 1<<20 {
+ return nil, fmt.Errorf("user: unreasonable _SC_GETPW_R_SIZE_MAX of %d", bufSize)
+ }