#include <sys/types.h>
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
main()
{
char buf[] = { 0xC2, 0x48, 0xA4, 0x47};
struct in_addr ipaddr;
char *rfc1006;
memcpy(&ipaddr, buf, sizeof(struct in_addr));
rfc1006 = inet_ntoa(ipaddr);
printf("Address is : %s\n", rfc1006);
}
--
Summary: inet_ntoa always outputs 0.0.0.0 when built with -maix64
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john dot hodgkinson at boldonjames dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-ibm-aix5.2.0.0
GCC host triplet: powerpc-ibm-aix5.2.0.0
GCC target triplet: powerpc-ibm-aix5.2.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19442
