summaryrefslogtreecommitdiffstats
path: root/patches/totd-1.5
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-02-03 00:56:57 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2010-02-03 00:56:57 +0100
commit339396853ebac4db182eaf586abeb5d3ba8018fe (patch)
tree1f96fcfa2de38c428756d487b85c27dd50862b51 /patches/totd-1.5
parent1426e0e21f374772bc50cc246935607b69f80288 (diff)
downloadptxdist-339396853ebac4db182eaf586abeb5d3ba8018fe.tar.gz
ptxdist-339396853ebac4db182eaf586abeb5d3ba8018fe.tar.xz
[totd] unbreak totd
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'patches/totd-1.5')
-rw-r--r--patches/totd-1.5/series10
-rw-r--r--patches/totd-1.5/totd-1.5-destdir.diff28
-rw-r--r--patches/totd-1.5/totd-1.5-disable-werror.diff32
-rw-r--r--patches/totd-1.5/totd-1.5-dname_decompress.diff58
-rw-r--r--patches/totd-1.5/totd-1.5-install-group.diff25
-rw-r--r--patches/totd-1.5/totd-1.5-sprint_inet.diff24
-rw-r--r--patches/totd-1.5/totd-1.5-sprintf.diff39
-rw-r--r--patches/totd-1.5/totd-1.5-strlcpy.diff47
-rw-r--r--patches/totd-1.5/totd-1.5-strlen.diff24
-rw-r--r--patches/totd-1.5/totd-1.5-strncasecmp.diff24
-rw-r--r--patches/totd-1.5/totd-1.5-unused-tmp.diff29
11 files changed, 340 insertions, 0 deletions
diff --git a/patches/totd-1.5/series b/patches/totd-1.5/series
new file mode 100644
index 000000000..5df08088e
--- /dev/null
+++ b/patches/totd-1.5/series
@@ -0,0 +1,10 @@
+totd-1.5-strlen.diff
+totd-1.5-strncasecmp.diff
+totd-1.5-sprint_inet.diff
+totd-1.5-sprintf.diff
+totd-1.5-strlcpy.diff
+totd-1.5-dname_decompress.diff
+totd-1.5-unused-tmp.diff
+totd-1.5-disable-werror.diff
+totd-1.5-destdir.diff
+totd-1.5-install-group.diff
diff --git a/patches/totd-1.5/totd-1.5-destdir.diff b/patches/totd-1.5/totd-1.5-destdir.diff
new file mode 100644
index 000000000..455738be7
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-destdir.diff
@@ -0,0 +1,28 @@
+Subject: [patch] add DESTDIR support to Makefile.in
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+The Makefile.in does not support DESTDIR, which makes it impossible for
+distribution people to package totd properly. This patch adds DESTDIR
+support.
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ Makefile.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: totd-1.5/Makefile.in
+===================================================================
+--- totd-1.5.orig/Makefile.in
++++ totd-1.5/Makefile.in
+@@ -66,8 +66,8 @@ libswill.a:
+ -ranlib libswill.a
+
+ install: $(PROG)
+- $(INSTALL) -c -s -m 0555 -o bin -g bin $(PROG) $(INSTALLDIR)
+- $(INSTALL) -c -m 0444 -o root -g wheel $(MAN) $(INSTALLMAN)/man8
++ $(INSTALL) -c -s -m 0555 -o bin -g bin $(PROG) $(DESTDIR)$(INSTALLDIR)
++ $(INSTALL) -c -m 0444 -o root -g wheel $(MAN) $(DESTDIR)$(INSTALLMAN)/man8
+
+ lint:
+ lint ${SRCS}
diff --git a/patches/totd-1.5/totd-1.5-disable-werror.diff b/patches/totd-1.5/totd-1.5-disable-werror.diff
new file mode 100644
index 000000000..254096b5e
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-disable-werror.diff
@@ -0,0 +1,32 @@
+Subject: [patch] disable -Werror
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+I couldn't get rid of these warnings yet, so let's disable -Werror now:
+
+ne_io.c: In function 'net_ifc_cmp':
+ne_io.c:72: warning: pointer targets in assignment differ in signedness
+ne_io.c:73: warning: pointer targets in assignment differ in signedness
+ne_io.c: In function 'nia_set_wildsock':
+ne_io.c:275: warning: unused variable 'ni'
+ne_io.c: In function 'net_get_ifaddrs':
+ne_io.c:433: warning: pointer targets in assignment differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ Makefile.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: totd-1.5/Makefile.in
+===================================================================
+--- totd-1.5.orig/Makefile.in
++++ totd-1.5/Makefile.in
+@@ -19,7 +19,7 @@ TOT_CONFIG_FILE=@sysconfdir@/totd.conf
+
+ INSTALL = /usr/bin/install
+
+-CFLAGS = @CFLAGS@ @DEFS@ -Werror -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH)
++CFLAGS = @CFLAGS@ @DEFS@ -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH)
+
+ # When debugging is enabled by --enable-malloc-debug flag to the configure
+ # script, the @DBMALLOC@ substitution will contain the empty string, thus
diff --git a/patches/totd-1.5/totd-1.5-dname_decompress.diff b/patches/totd-1.5/totd-1.5-dname_decompress.diff
new file mode 100644
index 000000000..89412d458
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-dname_decompress.diff
@@ -0,0 +1,58 @@
+Subject: [patch] fix data types in dname_decompress
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+request.c:245: error: pointer targets in passing argument 1 of 'dname_decompress' differ in signedness
+conv_trick.c:123: error: pointer targets in passing argument 3 of 'dname_decompress' differ in signedness
+conv_trick.c:134: error: pointer targets in passing argument 3 of 'dname_decompress' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ conv_trick.c | 6 +++---
+ request.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: totd-1.5/request.c
+===================================================================
+--- totd-1.5.orig/request.c
++++ totd-1.5/request.c
+@@ -242,7 +242,7 @@ int request_retry (Context *cont) {
+ else
+ cont->current_ns = cont->current_ns->next;
+
+- dname_decompress (astr, MAX_DNAME, cont->qname, 0, 0, 0);
++ dname_decompress ((u_char*)astr, MAX_DNAME, cont->qname, 0, 0, 0);
+ syslog (LOG_INFO, "Retrying query for %s to nameserver: %s", astr,
+ sprint_inet((struct sockaddr *) (cont->current_ns->list_data),
+ bstr));
+Index: totd-1.5/conv_trick.c
+===================================================================
+--- totd-1.5.orig/conv_trick.c
++++ totd-1.5/conv_trick.c
+@@ -111,7 +111,7 @@ void conv_trick_list (G_List *rrsl, int
+ dup = search_name(rrsl, name, len, target_rtype);
+ if (dup) {
+ if (T.debug > 3) {
+- dname_decompress (str, MAX_DNAME, name, 0,0,0);
++ dname_decompress (str, MAX_DNAME, (u_char*)name, 0,0,0);
+ syslog (LOG_DEBUG, "%s: duplicate %s", fn, str);
+ }
+ rrset_free(dup);
+@@ -120,7 +120,7 @@ void conv_trick_list (G_List *rrsl, int
+
+ /* convert A record into faked target_rtype record */
+ if (T.debug > 3) {
+- dname_decompress (str, MAX_DNAME, name, 0,0,0);
++ dname_decompress (str, MAX_DNAME, (u_char*)name, 0,0,0);
+ syslog (LOG_DEBUG, "%s: converting: %s", fn, str);
+ }
+ rrsp_aaaa = conv_trick_rrset(rrsp, target_rtype,
+@@ -131,7 +131,7 @@ void conv_trick_list (G_List *rrsl, int
+ }
+
+ if (T.debug) {
+- dname_decompress (str, MAX_DNAME, name, 0,0,0);
++ dname_decompress (str, MAX_DNAME, (u_char*)name, 0,0,0);
+ syslog (LOG_DEBUG, "%s: %s %s", fn,
+ add ? "add" : "replace by", str);
+ }
diff --git a/patches/totd-1.5/totd-1.5-install-group.diff b/patches/totd-1.5/totd-1.5-install-group.diff
new file mode 100644
index 000000000..9242a0683
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-install-group.diff
@@ -0,0 +1,25 @@
+Subject: [patch] install man pages with group root, not wheel
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+/usr/bin/install -c -m 0444 -o root -g wheel totd.8 /home/rsc/svn/oselas/bsp/pengutronix/OSELAS.BSP-Pengutronix-AllYes-trunk/platform-ARM-reference/packages/totd-1.5/usr/man/man8
+/usr/bin/install: invalid group `wheel'
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: totd-1.5/Makefile.in
+===================================================================
+--- totd-1.5.orig/Makefile.in
++++ totd-1.5/Makefile.in
+@@ -67,7 +67,7 @@ libswill.a:
+
+ install: $(PROG)
+ $(INSTALL) -c -s -m 0555 -o bin -g bin $(PROG) $(DESTDIR)$(INSTALLDIR)
+- $(INSTALL) -c -m 0444 -o root -g wheel $(MAN) $(DESTDIR)$(INSTALLMAN)/man8
++ $(INSTALL) -c -m 0444 -o root -g root $(MAN) $(DESTDIR)$(INSTALLMAN)/man8
+
+ lint:
+ lint ${SRCS}
diff --git a/patches/totd-1.5/totd-1.5-sprint_inet.diff b/patches/totd-1.5/totd-1.5-sprint_inet.diff
new file mode 100644
index 000000000..a952557ed
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-sprint_inet.diff
@@ -0,0 +1,24 @@
+Subject: [patch] fix data types in sprint_inet
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+request.c:148: error: pointer targets in passing argument 2 of 'sprint_inet' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ request.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: totd-1.5/request.c
+===================================================================
+--- totd-1.5.orig/request.c
++++ totd-1.5/request.c
+@@ -145,7 +145,7 @@ int request_start (Context *cont, int tc
+
+ syslog (LOG_INFO, "Selected forwarder: %s",
+ sprint_inet((struct sockaddr *)
+- (cont->current_ns->list_data), str));
++ (cont->current_ns->list_data), (char*)str));
+
+ /* forward the actual (modified) query ww want to make */
+ return (do_forward (cont, qname, qclass, qtype, tcp));
diff --git a/patches/totd-1.5/totd-1.5-sprintf.diff b/patches/totd-1.5/totd-1.5-sprintf.diff
new file mode 100644
index 000000000..ed12ceb14
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-sprintf.diff
@@ -0,0 +1,39 @@
+Subject: [patch] fix data types in sprintf calls
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+ne_mesg.c:532: error: pointer targets in passing argument 1 of 'sprintf' differ in signedness
+ne_mesg.c:540: error: pointer targets in passing argument 1 of 'sprintf' differ in signedness
+ne_mesg.c:543: error: pointer targets in passing argument 1 of 'sprintf' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ ne_mesg.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: totd-1.5/ne_mesg.c
+===================================================================
+--- totd-1.5.orig/ne_mesg.c
++++ totd-1.5/ne_mesg.c
+@@ -529,7 +529,7 @@ u_char *dname_decompress (u_char *buf, i
+ return NULL; /* buffer overrun */
+
+ wp = buf;
+- wp += sprintf(wp, "\\[x");
++ wp += sprintf((char*)wp, "\\[x");
+ for (i = 1; i < token_len-1; i++) {
+ u_char d1, d2;
+ uint b;
+@@ -537,10 +537,10 @@ u_char *dname_decompress (u_char *buf, i
+ b = (int) *(cp + 1 + i);
+ d1 = hex[(b >> 4) & 0x0f];
+ d2 = hex[b & 0x0f];
+- wp += sprintf(wp, "%c%c", d1, d2);
++ wp += sprintf((char*)wp, "%c%c", d1, d2);
+ }
+ bitlength = *(cp + 1) ? *(cp + 1) : 256;
+- wp += sprintf(wp, "/%u].", bitlength);
++ wp += sprintf((char*)wp, "/%u].", bitlength);
+
+ written_len += (wp - buf);
+ buf += written_len;
diff --git a/patches/totd-1.5/totd-1.5-strlcpy.diff b/patches/totd-1.5/totd-1.5-strlcpy.diff
new file mode 100644
index 000000000..a3d8556fe
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-strlcpy.diff
@@ -0,0 +1,47 @@
+Subject: [patch] fix data types in strlcpy calls
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+request.c:175: error: pointer targets in passing argument 1 of 'strlcpy' differ in signedness
+request.c:175: error: pointer targets in passing argument 2 of 'strlcpy' differ in signedness
+request.c:318: error: pointer targets in passing argument 1 of 'strlcpy' differ in signedness
+request.c:318: error: pointer targets in passing argument 2 of 'strlcpy' differ in signedness
+request.c:413: error: pointer targets in passing argument 1 of 'strlcpy' differ in signedness
+request.c:413: error: pointer targets in passing argument 2 of 'strlcpy' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ request.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: totd-1.5/request.c
+===================================================================
+--- totd-1.5.orig/request.c
++++ totd-1.5/request.c
+@@ -172,7 +172,7 @@ int do_forward(struct context *parent, u
+ cont->timeout = SEARCH_REMOTE_TIMEOUT;
+ cont->current_ns = cont->parent->current_ns;
+
+- strlcpy (cont->qname, qname, MAX_DNAME);
++ strlcpy ((char*)cont->qname, (char*)qname, MAX_DNAME);
+ cont->q_class = qclass;
+ cont->q_type = qtype;
+ cont->q_id = mesg_id ();
+@@ -315,7 +315,7 @@ int recursive_process (Context *cont) {
+ /* initialize vars for additional request we may make */
+ qclass = cont->q_class;
+ qtype = cont->q_type;
+- strlcpy(qname, cont->qname, MAX_DNAME);
++ strlcpy((char*)qname, (char*)cont->qname, MAX_DNAME);
+
+ syslog (LOG_DEBUG, "%s: work state: %d", fn, cont->work_state);
+
+@@ -410,7 +410,7 @@ int recursive_process (Context *cont) {
+ syslog (LOG_DEBUG, "Changed target to A");
+
+ /* same query, but IPv4 address type */
+- strlcpy(qname, cont->qname, MAX_DNAME);
++ strlcpy((char*)qname, (char*)cont->qname, MAX_DNAME);
+ qtype = RT_A;
+
+ cont->work_state = TRICK_REQUEST;
diff --git a/patches/totd-1.5/totd-1.5-strlen.diff b/patches/totd-1.5/totd-1.5-strlen.diff
new file mode 100644
index 000000000..902e49a17
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-strlen.diff
@@ -0,0 +1,24 @@
+Subject: [patch] fix data types in strlen calls
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+request.c:73: error: pointer targets in passing argument 1 of 'strlen' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ request.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: totd-1.5/request.c
+===================================================================
+--- totd-1.5.orig/request.c
++++ totd-1.5/request.c
+@@ -70,7 +70,7 @@ int request_start (Context *cont, int tc
+ if (*qname == EDNS0_ELT_BITLABEL) {
+ /* We will and may not use qname as string further */
+ qname[0] = '\0';
+- } else if (len != strlen(qname) + 1) {
++ } else if (len != strlen((const char*)qname) + 1) {
+ /* We will and may not use qname as string further */
+ qname[0] = '\0';
+ }
diff --git a/patches/totd-1.5/totd-1.5-strncasecmp.diff b/patches/totd-1.5/totd-1.5-strncasecmp.diff
new file mode 100644
index 000000000..7727f6f6b
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-strncasecmp.diff
@@ -0,0 +1,24 @@
+Subject: [patch] fix data types in stncasecmp calls
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+ne_mesg.c:150: error: pointer targets in passing argument 1 of 'strncasecmp' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ ne_mesg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: totd-1.5/ne_mesg.c
+===================================================================
+--- totd-1.5.orig/ne_mesg.c
++++ totd-1.5/ne_mesg.c
+@@ -147,7 +147,7 @@ int mesg_dname_cmp (u_char *msg, u_char
+ if (*dname == EDNS0_ELT_BITLABEL) {
+ if (memcmp (dname_mesg + 1, dname + 1, len))
+ return -1;
+- } else if (strncasecmp (dname_mesg + 1, dname + 1, len))
++ } else if (strncasecmp ((const char*)dname_mesg + 1, (const char*)dname + 1, len))
+ return -1;
+
+ dname += len + 1;
diff --git a/patches/totd-1.5/totd-1.5-unused-tmp.diff b/patches/totd-1.5/totd-1.5-unused-tmp.diff
new file mode 100644
index 000000000..65f03146b
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-unused-tmp.diff
@@ -0,0 +1,29 @@
+Subject: [patch] tmp variable is only used when ip4 or ip6 are selected
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+If none of --enable-ip4 and --enable-ip6 are selected, we get this
+error:
+
+forward.c:17: error: unused variable 'tmp'
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ forward.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+Index: totd-1.5/forward.c
+===================================================================
+--- totd-1.5.orig/forward.c
++++ totd-1.5/forward.c
+@@ -14,7 +14,9 @@
+ #include "totd.h"
+
+ char *sprint_inet(struct sockaddr *sa, char *address_str) {
+- char tmp[MAX_DNAME];
++#if defined(USE_INET4) || defined(USE_INET6)
++ char tmp[MAX_DNAME];
++#endif
+
+ address_str[0] = '\0';
+ #ifdef USE_INET4