nixpkgs/pkgs/applications/networking/cluster/temporal-cli/darwin-sandbox-fix.patch
Andrew Marshall 77f010e75f temporal-cli: Fix Darwin builds with sandbox enabled
Unfortunately one of the issues is within a dependency, so have to do
some awkward patching of the go-modules. This patch is pending merge to
the upstream dep and will hopefully eventually trickle down. We do *not*
optionally apply the patch for Darwin only because then we would have a
different hash per system, which seems even more awkward.
2023-07-11 17:47:52 -04:00

21 lines
557 B
Diff

--- 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)
}