[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: error: 'inet_addr' was not declared in this scope



On Tue, Mar 20, 2012 at 12:26:31PM +0100, Mathieu Malaterre wrote:
> gdcmULConnectionInfo.cxx:73:61: error: 'inet_addr' was not declared in
> this scope

Usually, conforming to POSIX is enough to fix these portability issues
(after all, that's what POSIX is there for). Here is what the standard
says [1] :

NAME

arpa/inet.h - definitions for internet operations

SYNOPSIS

#include <arpa/inet.h>

DESCRIPTION

The in_port_t and in_addr_t types shall be defined as described in <netinet/in.h>.

The in_addr structure shall be defined as described in <netinet/in.h>.

-- 
Richard Braun

[1] http://pubs.opengroup.org/onlinepubs/007904975/basedefs/arpa/inet.h.html


Reply to: