IBM Support

IZ94252: GCC GIVES ERROR WHEN INCLUDING IN6_VAR.H APPLIES TO AIX 6100-06

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Recent versions of gcc (such as 4.2 for AIX 6.1 from the
    AIX Linux Toolbox) will give an error when compiling a
     program that includes the
    /usr/include/netinet/in6_var.h file:
    
    test.c:
    -----------------
    #include <net/if.h>
    #include <netinet/in.h>
    #include <netinet/in6_var.h>
    
    int main () {
    
      return(1);
    }
    -----------------
    
    # gcc -c test.c
    In file included from test.c:3:
    /usr/include/netinet/in6_var.h:65: error: array type
     has incomplete element type
    

Local fix

  • Workaround:
    Add '#include <sys/protosw.h>' to your code first, if you
    are planning to include netinet/in6_var.h.
    

Problem summary

  • compilation failurewith gcc 4.2 when in6_var.h is included
    

Problem conclusion

  • include protosw.h before extern declaration of inet6sw
    

Temporary fix

Comments

  • 6100-04 - use AIX APAR IV05737
    6100-05 - use AIX APAR IV05474
    6100-06 - use AIX APAR IZ94252
    7100-00 - use AIX APAR IV26421
    

APAR Information

  • APAR number

    IZ94252

  • Reported component name

    AIX 610 STD EDI

  • Reported component ID

    5765G6200

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2011-02-02

  • Closed date

    2011-06-01

  • Last modified date

    2013-04-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IV01736 U848426

Fix information

  • Fixed component name

    AIX 610 STD EDI

  • Fixed component ID

    5765G6200

Applicable component levels

  • R610 PSY U848426

       UP11/10/26 I 1000



Document information

More support for: AIX Standard Edition

Software version: 610

Operating system(s): AIX

Reference #: IZ94252

Modified date: 16 April 2013