blob: 65f03146b9b39d6bfab12d1d8312d6e75bbd57f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|