diff options
Diffstat (limited to 'socket')
-rw-r--r-- | socket/sys/socket.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/socket/sys/socket.h b/socket/sys/socket.h index 3124de0..f445b4c 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -45,9 +45,11 @@ struct osockaddr /* This is the type we use for generic socket address arguments. - With GCC 2.7 and later, the funky union causes redeclarations or uses with - any of the listed types to be allowed without complaint. */ -#if (!defined (__GNUC__) || __GNUC__ < 2 || \ + With GCC 2.7 and later, the funky union causes redeclarations or + uses with any of the listed types to be allowed without complaint. + G++ 2.7 does not support transparent unions so there we want the + old-style declaration, too. */ +#if (!defined (__GNUC__) || __GNUC__ < 2 || defined(__cplusplus) || \ (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) #define __SOCKADDR_ARG struct sockaddr * #define __CONST_SOCKADDR_ARG __const struct sockaddr * |