compat: Define AI_NUMERICSERV as `0' if necessary
authorMichael Witten <mfwitten@gmail.com>
Sat, 19 May 2012 11:00:00 +0000 (11:00 +0000)
committerWouter Verhelst <w@uter.be>
Sun, 20 May 2012 10:34:16 +0000 (12:34 +0200)
commit97f1ce3b95f49ea3629fc574d836694a77d0478d
tree8c5979f5e0b4561499c4ae09520a7c9e764d6e90
parentf54062604849fea4fa1d0245504e0e3da69b691e
compat: Define AI_NUMERICSERV as `0' if necessary

AI_NUMERICSERV as a value for the `ai_flags' member
of `struct addrinfo' of header <netdb.h> has only
been available since:

  POSIX 1003.1-2008, Issue 7
  glibc 2.3.4
  Mac OS X 10.6
  etc.

Fortunately, its main purpose seems to be only
to optimize calls of `getaddrinfo', and because it
is meant to be a bit flag, it can therefore be
[relatively] safely ignored by defining it to have
the value zero.

Signed-off-by: Michael Witten <mfwitten@gmail.com>
nbd-client.c
nbd-server.c
netdb-compat.h [new file with mode: 0644]