aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2018-07-24 22:50:33 +0800
committerkrion <krion@FreeBSD.org>2018-07-24 22:50:33 +0800
commitf2b3843314bfa95a1c5e59b56b020d01f28cd615 (patch)
tree84830c6282f2cbc003efa886d9f1236c99e94c17
parentc8d4ee734c568fca4bc6e38f2a3dda35c41108a7 (diff)
downloadfreebsd-ports-gnome-f2b3843314bfa95a1c5e59b56b020d01f28cd615.tar.gz
freebsd-ports-gnome-f2b3843314bfa95a1c5e59b56b020d01f28cd615.tar.zst
freebsd-ports-gnome-f2b3843314bfa95a1c5e59b56b020d01f28cd615.zip
Utilize SOCK_NONBLOCK instead of O_NONBLOCK
Fix startup script PR: 230001 Submitted by: david@dcrosstech.com
-rw-r--r--net/sniproxy/Makefile1
-rw-r--r--net/sniproxy/files/patch-src_connection.c11
-rw-r--r--net/sniproxy/files/sniproxy.in2
3 files changed, 13 insertions, 1 deletions
diff --git a/net/sniproxy/Makefile b/net/sniproxy/Makefile
index 804229b8a6e5..f7cf172e063f 100644
--- a/net/sniproxy/Makefile
+++ b/net/sniproxy/Makefile
@@ -2,6 +2,7 @@
PORTNAME= sniproxy
DISTVERSION= 0.5.0
+PORTREVISION= 1
CATEGORIES= net
MAINTAINER= krion@FreeBSD.org
diff --git a/net/sniproxy/files/patch-src_connection.c b/net/sniproxy/files/patch-src_connection.c
new file mode 100644
index 000000000000..75da4024dac9
--- /dev/null
+++ b/net/sniproxy/files/patch-src_connection.c
@@ -0,0 +1,11 @@
+--- src/connection.c.orig 2018-07-24 14:47:02 UTC
++++ src/connection.c
+@@ -111,7 +111,7 @@ accept_connection(struct Listener *listener, struct ev
+ int sockfd = accept4(listener->watcher.fd,
+ (struct sockaddr *)&con->client.addr,
+ &con->client.addr_len,
+- O_NONBLOCK);
++ SOCK_NONBLOCK);
+ #else
+ int sockfd = accept(listener->watcher.fd,
+ (struct sockaddr *)&con->client.addr,
diff --git a/net/sniproxy/files/sniproxy.in b/net/sniproxy/files/sniproxy.in
index 52f4ba5f0a8e..601a9d93dd47 100644
--- a/net/sniproxy/files/sniproxy.in
+++ b/net/sniproxy/files/sniproxy.in
@@ -22,7 +22,7 @@ rcvar=sniproxy_enable
command=%%PREFIX%%/sbin/sniproxy
-pidfile=${sniproxy_pidfile:-"/var/run/sniproxy.pid
+pidfile=${sniproxy_pidfile:-"/var/run/sniproxy.pid"}
sniproxy_enable=${sniproxy_enable:-"NO"}
sniproxy_conf=${sniproxy_conf:-"%%PREFIX%%/etc/sniproxy.conf"}