Compilation problem and solution on Solaris 2.7

Dave Dykstra dwd at bell-labs.com
Wed May 1 07:38:02 EST 2002


I compiled rsync 2.5.5 on Solaris 2.7 with both gcc and cc and did not get
any errors about missing functions.  Could you send me the output of
"configure"?

- Dave Dykstra

On Sat, Apr 06, 2002 at 10:59:53AM +0200, Jean-Francois Stenuit wrote:
> 
> To whoever it may help,
> 
> My flavor of Solaris 2.7 was not able to compile rsync 2.5.5 with the
> vanilla "./configure; make".
> 
> Three functions where missing : inet_ntop, inet_pton, inet_addr
> 
> There are replacement inet_ntop and inet_pton in the distribution tree, so
> it's easy to change the Makefile and have them compiled and included by a
> simple "make". However, the inet_addr is missing on the system, so I had
> to write a replacement.
> 
> Here is the (very simple) replacement code for inet_addr :
> 
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <arpa/inet.h>
> #include <netinet/in.h>
> 
> unsigned long int inet_addr(const char *cp)
> {
>         struct in_addr inp;
> 
>         if (inet_aton(cp,&inp) == 0) {
>                 return -1;
>         } else {
>                 return ntohl((unsigned long int)inp.s_addr);
>         }
> }
> 
> Copy this code in a new file named 'inet_addr.c' in the 'lib' directory,
> add 'lib/inet_ntop.o lib/inet_pton.o lib/inet_addr.o' in the 'LIBOBJ='
> line of the Makefile, and everything will be OK.
> 
> Hope this helps,
> 
> -- 
>  |--- Jean-Francois "Jef" Stenuit, Network Manager
>  |------ BELGACOM-Skynet NV/SA, Carlistraat 2, B-1140 Brussels
>  |--------- Phone : (32)(2) 706-1311, Fax : (32)(2) 706-1150
> 
> **** DISCLAIMER ****
> "This e-mail is not intended to create or affect any contractual
> arrangements between the parties. The content of this e-mail represent
> the opinion of its author and does not bind its employer in any way.
> Any use of the information contained herein by persons other than the
> designated recipient(s) is prohibited."
> 
> 
> -- 
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html




More information about the rsync mailing list