Skip to content

Commit

Permalink
Fix clang build, using REINPLACE_CMD to change gcc to ${CC}.
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mandree committed Jul 1, 2011
1 parent 1cb0274 commit 76e61bf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dns/checkdns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MASTER_SITES= http://www.enderunix.org/checkdns/ \
MAINTAINER= [email protected]
COMMENT= A domain name server analysis and reporting tool

MAKE_JOBS_SAFE= yes
MAKE_JOBS_SAFE= yes

SUB_FILES= pkg-message

Expand All @@ -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 \
Expand Down
10 changes: 10 additions & 0 deletions dns/checkdns/files/patch-dns.c
Original file line number Diff line number Diff line change
@@ -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"
11 changes: 11 additions & 0 deletions dns/checkdns/files/patch-html.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 76e61bf

Please sign in to comment.