CNetDB unit on macOS lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- mayevski · 2016-12-13 19:20 Hello, is it just me, or FPC 3.0.1 is missing cnetdb unit in macOS installation? I clearly can find cnetdb on Linux, but not on macOS. Is there a reason for it, or it just has been overlooked? Sincerely yours Eugene Mayevski ---------------------------------------------------------------------- Phil · 2016-12-13 23:52 Quote from: mayevski on December 13, 2016, 08:20:18 pmI clearly can find cnetdb on Linux, but not on macOS. Correct, there are no compiled units for cnetdb.pp on OS X. Probably because the external library it references doesn't exist on OS X. ---------------------------------------------------------------------- mayevski · 2016-12-14 03:14 Thank you. The unit contains declarations and the references to getnameinfo() and similar functions, which do exist on macOS X (as these are posix-defined functions). Their declarations can be found in /usr/include/netdb.h ---------------------------------------------------------------------- marcov · 2016-12-14 10:30 Yes. That unit does POSIX interfacing of the name resolving (e.g. DNS) system (aka libresolv in old BSDs, but now commonly in libc). I added in 2.2/2.4 times for use in case the native FPC implementation of libresolv (netdb unit) had problems. So probably OS X socket suites either use netdb, or (more) native APIs. ---------------------------------------------------------------------- mayevski · 2016-12-14 13:07 marcov, thank you for the valuable comments. Yet netdb.pas/ppu doesn't have the decalarations, included in cnetdb, and on macos and ios the valid code cannot be compiled at all without rewriting or copying much of the cnetdb.