[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Avoid new segfault in getaddrinfo test
From: |
Eric Blake |
Subject: |
Re: [PATCH] Avoid new segfault in getaddrinfo test |
Date: |
Tue, 29 Apr 2008 11:03:03 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 4/29/2008 10:51 AM:
| FAIL: test-getaddrinfo
| with a segfault that comes from using inet_ntop with no declaration.
More importantly, getaddrinfo.c fails to compile on cygwin 1.5.x without
this change, also pushed:
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgXVMYACgkQ84KuGfSFAYC4AACgsNLwAshZ46TqgEwH/I5He1R9
0RMAn3jPhG2rJFRaRPA84ESV9pNE206Z
=rBgk
-----END PGP SIGNATURE-----
>From 1533cc032e52a858b354d01f349f7fbece7acc45 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 29 Apr 2008 11:00:46 -0600
Subject: [PATCH] Use new header.
* lib/getaddrinfo.c (includes): s/"inet_ntop.h"/<arpa/inet.h>/.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 5 +++++
lib/getaddrinfo.c | 7 ++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1ea1736..450e0d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-29 Eric Blake <address@hidden>
+
+ Use new header.
+ * lib/getaddrinfo.c (includes): s/"inet_ntop.h"/<arpa/inet.h>/.
+
2008-04-29 Jim Meyering <address@hidden>
* m4/arpa_inet_h.m4: Remove trailing blanks.
diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c
index c7a1ea9..06501f2 100644
--- a/lib/getaddrinfo.c
+++ b/lib/getaddrinfo.c
@@ -1,5 +1,5 @@
/* Get address information (partial implementation).
- Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007 Free Software
+ Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
Foundation, Inc.
Contributed by Simon Josefsson <address@hidden>.
@@ -25,6 +25,9 @@
# include <netinet/in.h>
#endif
+/* Get inet_ntop. */
+#include <arpa/inet.h>
+
/* Get calloc. */
#include <stdlib.h>
@@ -40,8 +43,6 @@
#define _(String) gettext (String)
#define N_(String) String
-#include "inet_ntop.h"
-
/* BeOS has AF_INET, but not PF_INET. */
#ifndef PF_INET
# define PF_INET AF_INET
--
1.5.5.1