Open
Description
On FreeBSD, mod_notionflux fails on start (xmessage opens mentioning an invalid argument error) because of an invalid arg related to the listening socket. start_listening
tries to fchmod the newly created socket but on FreeBSD this always fails. The manpage for fchmod says:
[EINVAL] The fd argument refers to a socket, not to a file.
The following (hacky) patch fixes the issue and mod_notionflux seems to start up fine.
diff --git a/mod_notionflux/mod_notionflux.c b/mod_notionflux/mod_notionflux.c
index 51949e07..e9176c7c 100644
--- a/mod_notionflux/mod_notionflux.c
+++ b/mod_notionflux/mod_notionflux.c
@@ -328,8 +328,10 @@ static bool start_listening()
if(listenfd<0)
goto errwarn;
+#ifndef __FreeBSD__
if(fchmod(listenfd, S_IRUSR|S_IWUSR)<0)
goto errwarn;
+#endif
addr.sun_family=AF_UNIX;
Metadata
Metadata
Assignees
Labels
No labels