Advertisement

Problem with 'make' error.

Started by January 29, 2006 10:34 PM
2 comments, last by pulpfist 18 years, 9 months ago
Hi, I'm trying to compile a program under Solaris 10 called SING. Except I am getting an error that I don't understand when I call make. The error output is:
Quote: In file included from parser.c:62: parser.h:94: error: conflicting types for 'inet_aton' /usr/include/arpa/inet.h:63: error: previous declaration of 'inet_aton' was here parser.h:94: error: conflicting types for 'inet_aton' /usr/include/arpa/inet.h:63: error: previous declaration of 'inet_aton' was here In file included from parser.c:62: parser.h:108:7: warning: no newline at end of file parser.c:892:2: warning: no newline at end of file *** Error code 1 make: Fatal error: Command failed for target `parser.o'
The steps I have taken were:
Quote: gunzip -c SING-1.1.gz | tar xvf - cd SING-1.1 ./configure make
I'm wondering if anyone knows what is causing this error, and any suggestions on what I should do to resolve it. Thankyou.
It sounds like the inet_aton is defined twice.
The parser.c file includes arpa/inet.h wich in turn defines inet_aton.
Then the parser.h file tries to define inet_aton again, asuming you are on Solaris system.

The file parser.h contains this:
#if (defined(SOLARIS) && !defined(SOLARIS_27))extern int inet_aton( char *, struct in_addr * );#endif


This is realy a shot in the dark, but what happens if you change it to
#if (defined(SOLARIS) && !defined(SOLARIS_27))/* extern int inet_aton( char *, struct in_addr * ); */#endif

?

The warnings should disappear if you just toss in an extra blank line at the end of the files.

My best guess...

[Edited by - pulpfist on January 30, 2006 1:43:41 AM]
Advertisement
Thanks alot, it works like you said.
Heh, Im a bit supprised actually. The inet_aton in parser.h is not realy a re-defenition.
I guess the author thinks that arpa/inet.h on Solaris dont declare the inet_aton function in the header.
But hey... if it works it works :D

This topic is closed to new replies.

Advertisement