diff options
Diffstat (limited to 'net-firewall/ipsec-tools/files/ipsec-tools-0.4-gcc34.diff')
-rw-r--r-- | net-firewall/ipsec-tools/files/ipsec-tools-0.4-gcc34.diff | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net-firewall/ipsec-tools/files/ipsec-tools-0.4-gcc34.diff b/net-firewall/ipsec-tools/files/ipsec-tools-0.4-gcc34.diff new file mode 100644 index 000000000000..7f6caec6b2f0 --- /dev/null +++ b/net-firewall/ipsec-tools/files/ipsec-tools-0.4-gcc34.diff @@ -0,0 +1,31 @@ +diff -aur ipsec-tools-0.4-orig/src/racoon/sockmisc.c ipsec-tools-0.4/src/racoon/sockmisc.c +--- ipsec-tools-0.4-orig/src/racoon/sockmisc.c 2004-11-16 11:15:42.000000000 -0500 ++++ ipsec-tools-0.4/src/racoon/sockmisc.c 2004-12-16 14:42:25.543888328 -0500 +@@ -834,7 +834,7 @@ + if (saddr == NULL) + return NULL; + +- GETNAMEINFO(saddr, addr, NULL); ++ GETNAMEINFO_NULL(saddr, addr); + snprintf(buf, sizeof(buf), "%s", addr); + + return buf; +diff -aur ipsec-tools-0.4-orig/src/racoon/var.h ipsec-tools-0.4/src/racoon/var.h +--- ipsec-tools-0.4-orig/src/racoon/var.h 2004-06-11 12:00:17.000000000 -0400 ++++ ipsec-tools-0.4/src/racoon/var.h 2004-12-16 14:42:14.983493752 -0500 +@@ -82,6 +82,15 @@ + } \ + } while (0); + ++#define GETNAMEINFO_NULL(x, y) \ ++do { \ ++ if (getnameinfo((x), sysdep_sa_len(x), (y), sizeof(y), NULL, 0, \ ++ NIFLAGS) != 0) { \ ++ if (y) \ ++ strncpy((y), "(invalid)", sizeof(y)); \ ++ } \ ++} while (0); ++ + #include <sys/queue.h> + #ifndef LIST_FOREACH + #define LIST_FOREACH(elm, head, field) \ |