aboutsummaryrefslogtreecommitdiffstats
path: root/dns/totd
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-09-15 07:34:28 +0800
committerpav <pav@FreeBSD.org>2005-09-15 07:34:28 +0800
commit6c99bcaf6e9f99f7034a8ef60be5190b7a1ac2b7 (patch)
tree0343aab474f09f9973eeaf03696f7c8b07563e05 /dns/totd
parent057bf8ffef055e511ea2c3d1cabf010b51b0804a (diff)
downloadfreebsd-ports-gnome-6c99bcaf6e9f99f7034a8ef60be5190b7a1ac2b7.tar.gz
freebsd-ports-gnome-6c99bcaf6e9f99f7034a8ef60be5190b7a1ac2b7.tar.zst
freebsd-ports-gnome-6c99bcaf6e9f99f7034a8ef60be5190b7a1ac2b7.zip
- Unbreak on !i386
PR: ports/86091 Submitted by: Johan van Selst <johans@stack.nl>
Diffstat (limited to 'dns/totd')
-rw-r--r--dns/totd/Makefile9
-rw-r--r--dns/totd/files/extra-patch-ne_mesg.c36
-rw-r--r--dns/totd/files/extra-patch-tcp_response.c11
3 files changed, 52 insertions, 4 deletions
diff --git a/dns/totd/Makefile b/dns/totd/Makefile
index 19231ac1a006..754a8b3fcdc3 100644
--- a/dns/totd/Makefile
+++ b/dns/totd/Makefile
@@ -22,12 +22,13 @@ RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
.include <bsd.port.pre.mk>
-.if ${ARCH} != "i386"
-BROKEN= "Does not compile on !i386"
-.endif
-
+.if ${OSVERSION} >= 500000
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-ne_mesg.c \
+ ${FILESDIR}/extra-patch-tcp_response.c
+.else
post-patch:
@${REINPLACE_CMD} -e 's/%zd/%d/g' ${WRKSRC}/*.c
+.endif
post-install:
${INSTALL_DATA} ${FILESDIR}/totd.conf.sample ${PREFIX}/etc
diff --git a/dns/totd/files/extra-patch-ne_mesg.c b/dns/totd/files/extra-patch-ne_mesg.c
new file mode 100644
index 000000000000..405a791ff81e
--- /dev/null
+++ b/dns/totd/files/extra-patch-ne_mesg.c
@@ -0,0 +1,36 @@
+--- ne_mesg.c.orig Mon Jul 4 11:09:22 2005
++++ ne_mesg.c Tue Sep 13 21:02:57 2005
+@@ -59,7 +59,7 @@
+
+ /* write qname */
+ if (T.debug > 4)
+- syslog (LOG_DEBUG, "%s: qname offset = %zd", fn, ucp - buf);
++ syslog (LOG_DEBUG, "%s: qname offset = %td", fn, ucp - buf);
+
+ i = dname_copy (qname, ucp, buflen - written_len);
+ if (i < 0)
+@@ -70,7 +70,7 @@
+
+ /* write qtype / qclass */
+ if (T.debug > 4)
+- syslog (LOG_DEBUG, "%s: qtype/qclass offset = %zd",
++ syslog (LOG_DEBUG, "%s: qtype/qclass offset = %td",
+ fn, ucp - buf);
+
+ written_len += sizeof (uint16_t) * 2;
+@@ -226,13 +226,13 @@
+ *cnt = htons (us);
+
+ if (T.debug > 4)
+- syslog (LOG_DEBUG, "%s: now counter = %zd",
++ syslog (LOG_DEBUG, "%s: now counter = %u",
+ fn, us);
+ }
+ }
+
+ if (T.debug > 4)
+- syslog (LOG_DEBUG, "%s: return %d", fn, *wp - wp_start);
++ syslog (LOG_DEBUG, "%s: return %td", fn, *wp - wp_start);
+
+ return (*wp - wp_start);
+ }
diff --git a/dns/totd/files/extra-patch-tcp_response.c b/dns/totd/files/extra-patch-tcp_response.c
new file mode 100644
index 000000000000..63e894775a27
--- /dev/null
+++ b/dns/totd/files/extra-patch-tcp_response.c
@@ -0,0 +1,11 @@
+--- tcp_response.c.orig Mon Jul 4 11:09:22 2005
++++ tcp_response.c Tue Sep 13 21:00:53 2005
+@@ -110,7 +110,7 @@
+
+ cont->wp += len;
+ if (cont->wp < (cont->mesg.p + cont->mesg_len)) {
+- syslog (LOG_DEBUG, "%s: left %zd bytes -- continue.", fn,
++ syslog (LOG_DEBUG, "%s: left %td bytes -- continue.", fn,
+ (cont->mesg.p + cont->mesg_len) - cont->wp);
+
+ /* SUCCESS */