Skip to content

Fix build on OpenBSD: setsockopt(2) has no SO_NOSIGPIPE#3

Closed
klemensn wants to merge 1 commit intozeek:masterfrom
klemensn:openbsd-setsockopt-nosigpipe
Closed

Fix build on OpenBSD: setsockopt(2) has no SO_NOSIGPIPE#3
klemensn wants to merge 1 commit intozeek:masterfrom
klemensn:openbsd-setsockopt-nosigpipe

Conversation

@klemensn
Copy link

@klemensn klemensn commented Sep 22, 2025

.../zeek-8.0.1/zeek-8.0.1/auxil/broker/caf/libcaf_net/src/network_socket.cpp:72:48: error: use of undeclared identifier 'SO_NOSIGPIPE'
   72 |                   setsockopt(x.id, SOL_SOCKET, SO_NOSIGPIPE, &value,
      |                                                ^

This is the only tweak required for CAF to work on OpenBSD, at least
when built as part of Zeek.

ajacoutot@ (@ajacoutot) wrote this patch in 2022 as the previous port maintainer.

```
.../zeek-8.0.1/zeek-8.0.1/auxil/broker/caf/libcaf_net/src/network_socket.cpp:72:48: error: use of undeclared identifier 'SO_NOSIGPIPE'
   72 |                   setsockopt(x.id, SOL_SOCKET, SO_NOSIGPIPE, &value,
      |                                                ^
```

This is the only tweak required for CAF to work on OpenBSD, at least
when built as part of Zeek.

ajacoutot@ wrote this patch in 2022 as the previous port maintainer.
@timwoj
Copy link
Member

timwoj commented Nov 13, 2025

@Neverlord have you seen this yet?

@Neverlord
Copy link
Member

@timwoj I did not, thanks for the ping! We should probably disable issues and merge requests on this fork, though. Merging it wouldn't do anything, because Broker isn't using the main branch of this fork.

There has been a PR on the upstream CAF version for this recently (actor-framework#2135) that fixes handling of SO_NOSIGPIPE in two more places. So the upstream patch seems to be more complete to me.

I can pull in (or backport) the patch for this issue to the branch Broker is using and do another bump after zeek/broker#487.

Hopefully we can land the Broker update to follow the official CAF release cycle again soon.

In any case, thanks for the patch @klemensn! And sorry about the confusing setup. We'll sort things out on our end. 🙏

I've opened zeek/broker#488 to keep track of this.

@Neverlord Neverlord closed this Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants