RTEMS does not support IPV6 and so does not define ENABLE_IPV6 for Python. RTEMS contains an aging port of the FreeBSD stack and the port contains some IPV6 things such as inet_ntop and inet_pton. This causes HAVE_INET_PTON to be defined to 1 causing the current socketmodule.c to compile the socket_inet_ntop code. The assumption being these functions are only present with IPV6 stacks. This assumption is valid, how-ever RTEMS breaks this assuption and fixing this in RTEMS is not pratical. Removing the HAVE_INET_PTON definition causes socketmodule.c to compile in a private version. The private versions have a slightly different prototype to RTEMS and so the compiler stops with an error. This patch seems the simplest solutions given it does not effect other platforms.
Logged In: YES user_id=21627 I believe this patch is now superceded by #734231. It appears that the problem of inet_pton is shared on many platforms, so the code now wraps the buffer declaration with ENABLE_IPV6. Can you please retry the current CVS, and indicate whether further changes are needed?
Logged In: YES user_id=197074 I have tested socketmodule.c version 1.268 with RTEMS and it compiles and works. No further changes are needed. I added to RTEMS the INET_ADDRSTRLEN define as it was not in netinet/in.h and the addition took a little longer than expected. An RTEMS maintainer raised the point the SUS standard that defines INET_ADDRSTRLEN is new(ish!) and so Python may not be as robust on older systems that do not have INET_ADDRSTRLEN defined. Thanks for the prompt resolution.