Project

General

Profile

Bug #4409

INET_ADDRSTRLEN, INET6_ADDRSTRLEN, in6addr_any not visible with -std=c99 -D_XOPEN_SOURCE=600

Added by Lauri Tirkkonen over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2013-12-20
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Test case:

% cpp -std=c99 -D_XOPEN_SOURCE=600 -include netinet/in.h /dev/null | grep INET_ADDRSTRLEN

I believe POSIX-1.2001 does specify these. There are two #if blocks like this:

#if !defined(_XPG4_2) || defined(EXTENSIONS)

that prevent these from being visible with _XOPEN_SOURCE=600. sockaddr_in6 is instead wrapped in a check like:

#if !defined(_XPG4_2) || defined(_XPG6) || defined(EXTENSIONS)

Since the missing definitions are also IPv6 related (and in a macro block with lots of other v6 stuff) maybe the check needs to include defined(_XPG6) there as well.

History

#2

Updated by Dan McDonald over 5 years ago

  • Status changed from New to Resolved

Fixed in commit 6daf81a9e3654619cbf0e11725f71645f78039b2:

4409 INET_ADDRSTRLEN, INET6_ADDRSTRLEN, in6addr_any not visible with …

…-std=c99 -D_XOPEN_SOURCE=600

Reviewed by: Robert Mustacchi <>
Approved by: Dan McDonald <>

Also available in: Atom PDF