Fix clang build, using REINPLACE_CMD to change gcc to ${CC}.

Add missing #include <string.h> in dns.c (adds files/patch-dns.c)
Fix obvious format string error in html.c (adds files/patch-html.c)
This commit is contained in:
Matthias Andree 2011-07-01 01:33:11 +00:00
parent 362459a8d2
commit 983a91c89d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=276759
3 changed files with 23 additions and 1 deletions

View file

@ -15,7 +15,7 @@ MASTER_SITES= http://www.enderunix.org/checkdns/ \
MAINTAINER= ports@FreeBSD.org
COMMENT= A domain name server analysis and reporting tool
MAKE_JOBS_SAFE= yes
MAKE_JOBS_SAFE= yes
SUB_FILES= pkg-message
@ -24,6 +24,7 @@ PORTDOCS= AUTHORS COPYING ChangeLog INSTALL README THANKS TODO
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/main.c \
${WRKSRC}/INSTALL ${WRKSRC}/README ${WRKSRC}/checkdns.conf-dist
@${REINPLACE_CMD} -e 's|CC = gcc|CC = ${CC} -include string.h|' ${WRKSRC}/Makefile
post-install:
@if [ ! -f ${PREFIX}/etc/checkdns.conf ]; then \

View file

@ -0,0 +1,10 @@
--- ./dns.c.orig 2011-07-01 03:28:55.000000000 +0200
+++ ./dns.c 2011-07-01 03:29:06.000000000 +0200
@@ -11,6 +11,7 @@
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <resolv.h>
+#include <string.h>
#include "defs.h"
#include "tools.h"

View file

@ -0,0 +1,11 @@
--- ./html.c.orig 2011-07-01 03:29:42.000000000 +0200
+++ ./html.c 2011-07-01 03:29:52.000000000 +0200
@@ -58,7 +58,7 @@
fprintf(fd, "<br>\n");
fprintf(fd, "<br>\n");
- fprintf(fd, "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" class=\"domains\">\n");
+ fprintf(fd, "<table width=\"100%%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" class=\"domains\">\n");
fprintf(fd, " <tr align=\"left\" valign=\"middle\">\n");
fprintf(fd, " <td class=\"table_header\">&nbsp;%s</td>\n", l_no);
fprintf(fd, " <td class=\"table_header\">&nbsp;%s</td>\n", l_domain);