[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] help compiling with gcc 4.0.1 on Mac OS 10.4.4



At 8:24 PM -0500 2/1/06, Andrew Arensburger wrote:

	Which version of MacOS are you running?

10.4.4.

Though I suppose a better question might be, where did the files in /usr/include come from?

Beats me. Either they came pre-installed with my Mac (a pretty fresh one, just bought a few weeks ago), or they were installed by the XCode 2.2 installer I downloaded from Apple yesterday.

 Also, which version of ColdSync are you trying to build?

Oops, sorry I forgot to mention that -- it's 2.2.5, listed as the most recent stable release if I understood the ColdSync pages correctly.

	For what it's worth, ColdSync 2.2.5 compiles for me (not
cleanly, but still) under MacOS 10.2.

Hmm, good to know. You probably don't have gcc 4, though; I wonder if that might be the critical difference?

	Looking at the code, it looks as though <arpa/nameser.h> is
included to make inet_ntop() work under Solaris. Under MacOS 10.2, the
man page fore inet_ntop() says to use:

	#include <sys/types.h>
	#include <sys/socket.h>
	#include <netinet/in.h>
	#include <arpa/inet.h>

The man page in 10.4 agrees.

All four of those files are already included. So you may want to
comment out the #if HAVE_INET_NTOP...#endif block, and see whether
that fixes things.

Yes, that does do it!  I had to give coldsync.c the same treatment.

	If it does, then future releases of ColdSync should probably
use something like
	#if HAVE_INET_NTOP && defined(sun)
or some such.

Makes sense to me.

Now, I'm just getting errors in config.c (plus a zillion warnings elsewhere):

config.c: In function 'get_hostaddrs':
config.c:1013: error: storage size of 'ifconf' isn't known
config.c:1061: error: invalid application of 'sizeof' to incomplete type 'struct ifconf' config.c:1093: error: invalid application of 'sizeof' to incomplete type 'struct ifreq'
config.c:1093: warning: division by zero
config.c:1122: error: dereferencing pointer to incomplete type
config.c:1123: error: dereferencing pointer to incomplete type
config.c:1145: error: dereferencing pointer to incomplete type
config.c:1165: error: dereferencing pointer to incomplete type

Best,
- Joe

--

Joseph J. Strout
joe@strout.net