[Bug 241386] resolv.h has missing headers, and can't be included alone error: field has incomplete type 'struct sockaddr_in'

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Oct 21 06:50:17 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241386

            Bug ID: 241386
           Summary: resolv.h has missing headers, and can't be included
                    alone error: field has incomplete type 'struct
                    sockaddr_in'
           Product: Base System
           Version: 12.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs at FreeBSD.org
          Reporter: yuri at freebsd.org

When the header resolv.h is included alone it fails to compile:





$ c++ -c x.cpp
In file included from x.cpp:1:
/usr/include/resolv.h:159:3: error: field has incomplete type 'struct
sockaddr_in'
                nsaddr_list[MAXNS];     /*%< address of name server */
                ^
/usr/include/resolv.h:158:9: note: forward declaration of 'sockaddr_in'
        struct sockaddr_in
               ^
/usr/include/resolv.h:173:18: error: field has incomplete type 'struct in_addr'
                struct in_addr  addr;
                                ^
/usr/include/resolv.h:173:10: note: forward declaration of 'in_addr'
                struct in_addr  addr;
                       ^
/usr/include/resolv.h:198:21: error: field has incomplete type 'struct
sockaddr_in'
        struct sockaddr_in      sin;
                                ^
/usr/include/resolv.h:158:9: note: forward declaration of 'sockaddr_in'
        struct sockaddr_in
               ^
x.cpp:4:1: error: unterminated /* comment
/*
^
4 errors generated.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list