[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

APR-fix

From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2000-11-10 08:38:56 CET

Yeps

I don't seem to have INADDR_NONE defined anywhere. I've noticed this before
for other source codes as well...

% find /usr/include -name "*.h" | xargs grep INADDR_NONE
% uname -a
SunOS pm1 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-250
% cvs diff -u network_io/unix/sa_common.c
Index: network_io/unix/sa_common.c
===================================================================
RCS file:
/home/cvspublic/apache-2.0/src/lib/apr/network_io/unix/sa_common.c,v
retrieving revision 1.2
diff -u -r1.2 sa_common.c
--- network_io/unix/sa_common.c 2000/11/10 00:58:25 1.2
+++ network_io/unix/sa_common.c 2000/11/10 07:26:59
@@ -122,6 +122,10 @@
         addr->s_addr = htonl(INADDR_ANY);
         return APR_SUCCESS;
     }
+#ifndef INADDR_NONE
+#define INADDR_NONE (unsigned long) ~0
+#endif
+
     if ((addr->s_addr = apr_inet_addr(hostname)) != INADDR_NONE)
         return APR_SUCCESS;

... this should probably be fixed in a better place, but this patch at least
makes it compile on my box.

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on Sat Oct 21 14:36:14 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.