Project

General

Profile

Actions

Bug #1794

closed

libxnet is missing a filter on __xnet_getaddrinfo

Added by Rich Lowe over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2011-11-18
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Our headers do magic with getaddrinfo() as compared to __xnet_getaddrinfo() for standards reasons.

With GCC 4.6 (but not 4.4, 3.4), this causes link failures in previously working code which linked to libxnet but not libsocket (where __xnet_getaddrinfo actually resides).

See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51204

We need a filter entry in libxnet pointing __xnet_getaddrinfo to libsocket, as with the other entries.

Versioning of this is complicated by the desire for compatibility. It probably should be in 1.3 --> [add: 1.3.1 with libxnet] --> 1.4, which would be strictly compatible for all concerned.

Actions #1

Updated by Rich Lowe over 11 years ago

Workaround, of course, is to explicitly link to libsocket.

Fix might be to link libxnet to libsocket explicitly

Actions #2

Updated by Rich Lowe over 11 years ago

  • Assignee set to Rich Lowe
Actions #3

Updated by Rich Lowe over 11 years ago

This is a missing filter in libxnet on libsocket (which in retrospect, should have been obvious).

Actions #4

Updated by Rich Lowe over 11 years ago

  • Subject changed from something about our netdb header angers GCC4.6 to libxnet is missing a filter on __xnet_getaddrinfo
Actions #5

Updated by Rich Lowe over 11 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
  • Tags deleted (needs-triage)
Actions #6

Updated by Rich Lowe over 11 years ago

  • % Done changed from 50 to 70

While the bug as-filed requires a very recent GCC and C++ to test, the actual change involved appears to be that the compilation is happening in an XPG6 environment. This can be reproduced using the normal 3.4 version of GCC, using the user-provided test case:

       #include <sys/socket.h>
       #include <netdb.h>

       // Compile with:
       //   g++ SolarisG++4.6.2-lxnet.c++  -lxnet
       // where g++ is 4.6.2 on OpenIndiana

       int main( int argc, char *argv[] )
       {
         // This is meant to compile, not run.
         getaddrinfo( 0, 0, 0, 0 );
         return 0;
       }

Instead of as there, compile with

gcc -std=c99 -lxnet -D_XOPEN_SOURCE=600 test.c

This will fail on an un-fixed system

Actions #7

Updated by Rich Lowe over 11 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 100

Resolved in r13526 commit:5a529e25e724

Actions

Also available in: Atom PDF