aboutsummaryrefslogtreecommitdiffstats
path: root/mail/popd/files/patch-popd.c
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2005-06-15 21:56:51 +0800
committerarved <arved@FreeBSD.org>2005-06-15 21:56:51 +0800
commit7a4edc39c141e598f0c12a91879df937faecc6ce (patch)
tree8666b9fef477ae60a2d6fd0b52e3763c910df2fb /mail/popd/files/patch-popd.c
parente577156d54b022125d387ae7f42feda045fea5f6 (diff)
downloadfreebsd-ports-graphics-7a4edc39c141e598f0c12a91879df937faecc6ce.tar.gz
freebsd-ports-graphics-7a4edc39c141e598f0c12a91879df937faecc6ce.tar.zst
freebsd-ports-graphics-7a4edc39c141e598f0c12a91879df937faecc6ce.zip
Fix build after NI_WITHSCOPEID removal
Reported by: pointyhat
Diffstat (limited to 'mail/popd/files/patch-popd.c')
-rw-r--r--mail/popd/files/patch-popd.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/mail/popd/files/patch-popd.c b/mail/popd/files/patch-popd.c
new file mode 100644
index 00000000000..83d2fd805e4
--- /dev/null
+++ b/mail/popd/files/patch-popd.c
@@ -0,0 +1,40 @@
+--- src/popd.c.orig Wed Jun 15 15:28:13 2005
++++ src/popd.c Wed Jun 15 15:49:05 2005
+@@ -46,6 +46,7 @@
+ #include <unistd.h>
+
+ #include <poputil.h>
++#include <osreldate.h>
+ #include "config.h"
+ #include "popd.h"
+ #include "paths.h"
+@@ -280,9 +281,15 @@
+ }
+ #endif
+ if (bind(serverfd, r->ai_addr, r->ai_addrlen) < 0) {
++#if __FreeBSD_version >= 502000
++ getnameinfo(r->ai_addr, r->ai_addrlen,
++ ip, sizeof(ip), NULL, 0,
++ NI_NUMERICHOST);
++#else
+ getnameinfo(r->ai_addr, r->ai_addrlen,
+ ip, sizeof(ip), NULL, 0,
+ NI_NUMERICHOST | NI_WITHSCOPEID);
++#endif
+ syslog(facility, "Can't bind port %s on %s",
+ config.port, ip);
+ close(serverfd);
+@@ -434,8 +441,13 @@
+ facility = LOG_INFO;
+ if (config.daemonise || config.debug)
+ #ifdef USE_IPV6
++#if __FreeBSD_version >= 502000
++ getnameinfo((struct sockaddr *)&addr, addr.ss_len,
++ ip, sizeof(ip), NULL, 0, NI_NUMERICHOST);
++#else
+ getnameinfo((struct sockaddr *)&addr, addr.ss_len,
+ ip, sizeof(ip), NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#endif
+ if (config.daemonise || config.debug)
+ syslog(facility, "Connection from %s", ip);
+ #else