Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2019 06:50:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 241386] resolv.h has missing headers, and can't be included alone error: field has incomplete type 'struct sockaddr_in'
Message-ID:  <bug-241386-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241386

            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@FreeBSD.org
          Reporter: yuri@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_a=
ddr'
                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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241386-227>