OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Jochen Schäfer on June 17, 2017, 11:11:09 am
-
Hi.
Does some know whether we have a implementation of getaddrinfo?
It seems to me that it should belong to the C standard library, but I can't find any declaration in /usr/include.
-
Hi Jochen,
There are a few implementations around - for eg from Samba https://trac.netlabs.org/samba/browser/trunk/server/lib/replace/getaddrinfo.c & https://trac.netlabs.org/samba/browser/trunk/server/lib/replace/getaddrinfo.h
I've also opened a ticket for libcx to get this added.
Cheers,
Paul
-
Thank you, I will try the files.
-
Ok, the implementation has a lot depencies.
Then I have to wait until it gets into libcx.
-
Hey Jochen,
Ok, the implementation has a lot depencies.
Then I have to wait until it gets into libcx.
An alternative is from lwres from bind.
I've bundled up (hopefully) the necessary files in http://smedley.id.au/tmp/lwres.zip
#include <lwres/lwres.h> & maybe
#include <lwres/netdb.h>
and add -llwres to the linking line
Cheers,
Paul
-
The Bind implementation compiles (I couldn't test linking yet, since I'm running into other problems.
For that I installed the bind-devel package via yum and refenced their files.
Thanks again, Paul.