[Python-Dev] Problems with socketmodule (getnameinfo & getaddrinfo)

Mark Favas m.favas@per.dem.csiro.au
Sun, 24 Jun 2001 12:25:27 +0800

Socketmodule at the moment has multiple problems after the changes to
handle IPv6:

socketmodule.c now #includes getnameinfo.c and getaddrinfo.c. These
functions both use offsetof(), which is defined (on my system, at least)
in stddef.h. The #include for this file is inside a #if 0 block.

#including this file allow the compile to complete without error.
However, there is no Makefile dependency on these two files, once
socketmodule.o has been built. Changes to either of the
get{name,addr}info.c files will not cause socketmodule to be rebuilt.

The socket module still does not work, however, since it refers to an
unresolved symbol inet_pton
>>> import socket
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
line 41, in ?
    from _socket import *
ImportError: Unresolved symbol in

inet_pton is called in two places in getaddrinfo.c... there's likely to
be other platforms besides Tru64 Unix that do not have this function.
Mark Favas  -   m.favas@per.dem.csiro.au
CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA