Bug 19442 - inet_ntoa always outputs 0.0.0.0 when built with -maix64
Summary: inet_ntoa always outputs 0.0.0.0 when built with -maix64
Status: RESOLVED DUPLICATE of bug 19428
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-14 12:16 UTC by john.hodgkinson
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: powerpc-ibm-aix5.2.0.0
Target: powerpc-ibm-aix5.2.0.0
Build: powerpc-ibm-aix5.2.0.0
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john.hodgkinson 2005-01-14 12:16:37 UTC
#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);                                   
}
Comment 1 Andrew Pinski 2005-01-14 13:00:41 UTC

*** This bug has been marked as a duplicate of 19428 ***