Daniel,
On Thu, Aug 21, 2008 at 1:06 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Wed, 20 Aug 2008, George Neill wrote:
>
>> "acountry.c", line 141: undefined symbol: INADDR_NONE
>> "acountry.c", line 228: undefined symbol: INADDR_NONE
>>
>> It was simple enough to get around, but broken out of the box. If a patch
>> needs to be provided please let me know!
>
> Ouch. Yes please send us the patch!
I haven't gotten real intimate with the code base, but this seems the
best way to fix it.
Index: setup_once.h
===================================================================
--- setup_once.h (revision 3730)
+++ setup_once.h (working copy)
@@ -66,7 +66,12 @@
#include <stdbool.h>
#endif
+/* Definition of INADDR_NONE for those wihch don't already have it */
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
/*
* Definition of timeval struct for platforms that don't have it.
*/
Index: ares_private.h
===================================================================
--- ares_private.h (revision 3730)
+++ ares_private.h (working copy)
@@ -51,9 +51,6 @@
#define DEFAULT_TIMEOUT 5000 /* milliseconds */
#define DEFAULT_TRIES 4
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
#if defined(WIN32) && !defined(WATT32)
I am not sure of the exact purpose of the ares_private.h header, but
it seems including this definition in the setup_once.h header and
removing it from the ares_private.h header is more appropriate.
TIA,
George.
Received on 2008-08-21