J. Alexander Jacocks
2002-Aug-25  08:42 UTC
[Samba] Trouble building Samba 2.2.5 of Solaris 9
Looks like inet_aton has cropped up again, in libsmbclient.c:
 
if (!inet_aton(server, &rem_ip)) {
  DEBUG(4, ("Could not convert IP address %s to struct in_addr\n",
server));
  errno = ENOENT;
  return NULL;
}
 
This function doesn't exist in Solaris, and causes this shared library
to fail to link, when called by other programs (notably KDE 3):
 
Undefined                       first referenced
 symbol                             in file
inet_aton                           /usr/local/samba/lib/libsmbclient.so
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
 
Any ideas for a fix?
 
Thanks!
-------------- next part --------------
HTML attachment scrubbed and removed
If my memory doesn't fail me, then you need to specify -linet with
Solaris. Try man inet_aton, there should be a usage there that shows how
to compile with. Unfortunately I don't have access to a Solaris machine
right now to verify this.
Nir.
--
Nir Soffer -=- Software Engineer, Exanet Inc. -=-
"Father, why are all the children weeping? / They are merely crying son
 O, are they merely crying, father? / Yes, true weeping is yet to come"
        -- Nick Cave and the Bad Seeds, The Weeping Song
  
-----Original Message-----
From: J. Alexander Jacocks [mailto:jjacocks@mac.com]
Sent: Sunday, August 25, 2002 7:41 PM
To: samba@lists.samba.org
Subject: [Samba] Trouble building Samba 2.2.5 of Solaris 9
Looks like inet_aton has cropped up again, in libsmbclient.c:
 
if (!inet_aton(server, &rem_ip)) {
  DEBUG(4, ("Could not convert IP address %s to struct in_addr\n",
server));
  errno = ENOENT;
  return NULL;
}
 
This function doesn't exist in Solaris, and causes this shared library
to fail to link, when called by other programs (notably KDE 3):
 
Undefined                       first referenced
 symbol                             in file
inet_aton                           /usr/local/samba/lib/libsmbclient.so
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
 
Any ideas for a fix?
 
Thanks!
Gerald (Jerry) Carter
2002-Aug-27  08:26 UTC
[Samba] Trouble building Samba 2.2.5 of Solaris 9
On Sun, 25 Aug 2002, J. Alexander Jacocks wrote:> Looks like inet_aton has cropped up again, in libsmbclient.c: > > if (!inet_aton(server, &rem_ip)) { > DEBUG(4, ("Could not convert IP address %s to struct in_addr\n", > server)); > errno = ENOENT; > return NULL; > }Here's a patch ..... cheers, jerry --------------------------------------------------------------------- Hewlett-Packard http://www.hp.com SAMBA Team http://www.samba.org -- http://www.plainjoe.org "Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2 --"I never saved anything for the swim back." Ethan Hawk in Gattaca-- -------------- next part -------------- Index: libsmb/libsmbclient.c ==================================================================RCS file: /data/cvs/samba/source/libsmb/libsmbclient.c,v retrieving revision 1.27.2.22 diff -u -r1.27.2.22 libsmbclient.c --- libsmb/libsmbclient.c 10 Jul 2002 22:31:06 -0000 1.27.2.22 +++ libsmb/libsmbclient.c 27 Aug 2002 12:23:30 -0000 @@ -328,7 +328,7 @@ fstring remote_name; struct in_addr rem_ip; - if (!inet_aton(server, &rem_ip)) { + if ((rem_ip.s_addr=inet_addr(server)) == INADDR_NONE) { DEBUG(4, ("Could not convert IP address %s to struct in_addr\n", server)); errno = ENOENT; return NULL;