pmtiles: fix sandbox build on darwin

This commit is contained in:
Nikolay Korotkiy
2025-10-20 21:04:36 +04:00
parent 7e0958e5b5
commit 5f3c43df70
2 changed files with 28 additions and 1 deletions
@@ -0,0 +1,20 @@
--- vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go
+++ vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go
@@ -696,7 +696,7 @@ func init() {
// Load protocols
data, err := ioutil.ReadFile("/etc/protocols")
if err != nil {
- if !os.IsNotExist(err) {
+ if !os.IsNotExist(err) && !os.IsPermission(err) {
panic(err)
}
@@ -732,7 +732,7 @@ func init() {
// Load services
data, err = ioutil.ReadFile("/etc/services")
if err != nil {
- if !os.IsNotExist(err) {
+ if !os.IsNotExist(err) && !os.IsPermission(err) {
panic(err)
}
+8 -1
View File
@@ -14,7 +14,14 @@ buildGoModule rec {
hash = "sha256-JGsbgBB2T+4SWKQmiSmuMqQ8gw0qhM5c5eFDF/+sndA=";
};
vendorHash = "sha256-XRx9Qe7tTQAPJJdj9yEU0YAFjvl+4jW/XQy2MYFApds=";
vendorHash = "sha256-6zsX7rU+D+RUHwXfFZzLQftQ6nSYJhvKIDdsO2vow4A=";
overrideModAttrs = old: {
# https://gitlab.com/cznic/libc/-/merge_requests/10
postBuild = ''
patch -p0 < ${./darwin-sandbox-fix.patch}
'';
};
ldflags = [
"-s"