Missing libsocket function(s)

I tried compiling a program with inet_ntoa() – it appears to be missing
from libsocket.a. Other functions (perhaps not all!) are there, for
example, inet_aton().

I’m using the latest RTP (for ppc). btw, the prototype is in the header
file.

Issam

Issam Haddad <ihaddad@asurent.com> wrote:

I tried compiling a program with inet_ntoa() – it appears to be missing
from libsocket.a. Other functions (perhaps not all!) are there, for
example, inet_aton().

I’m using the latest RTP (for ppc). btw, the prototype is in the header
file.

Are you sure you are looking at the right library?

$ cat foo.c
#include <sys/socket.h>
#include <netinet/in.h>

int main()
{
struct in_addr in;

in.s_addr = 0x0100007f;
printf(“string is: %s\n”, inet_ntoa(in));
}

$ qcc -Vgcc_ntoppcbe -o foo foo.c -Bstatic -l socket
$ file foo
foo: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1, statically link
d, not stripped

— Information from /dev/pkginfo11 —
Localpath: [/ppcbe/lib/libsocket.a]
Fullpath: [/pkgs/repository/qnx/os/dev_ppcbe-2.1.2/ppcbe/lib/libsocket.a]
Repository: [/pkgs/repository]
Vendor: [qnx/os/dev_ppcbe-2.1.2]
Tree: [ppcbe/lib/libsocket.a]

-xtang