Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 2017 23:40:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 217884] libprocstat(3): Synopsis is missing an #include
Message-ID:  <bug-217884-9@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 217884
           Summary: libprocstat(3): Synopsis is missing an #include
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Documentation
          Assignee: freebsd-doc@FreeBSD.org
          Reporter: tobik@freebsd.org

Created attachment 180918
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D180918&action=
=3Dedit
libprocstat.3.diff

libprocstat(3) says to include these three headers, but this simple
program fails to compile:

#include <sys/param.h>
#include <sys/queue.h>
#include <libprocstat.h>
int main(int argc, char *argv[]) {}

/usr/include/libprocstat.h:154:26: error: field has incomplete type
      'struct sockaddr_storage'
        struct sockaddr_storage sa_local;       /* Socket address. */
                                ^
/usr/include/libprocstat.h:154:9: note: forward declaration of
      'struct sockaddr_storage'
        struct sockaddr_storage sa_local;       /* Socket address. */
               ^
/usr/include/libprocstat.h:155:26: error: field has incomplete type
      'struct sockaddr_storage'
        struct sockaddr_storage sa_peer;        /* Peer address. */
                                ^
/usr/include/libprocstat.h:154:9: note: forward declaration of
      'struct sockaddr_storage'
        struct sockaddr_storage sa_local;       /* Socket address. */
               ^
2 errors generated.

Clearly more headers are needed and the documentation is incomplete.
Since adding sys/_sockaddr_storage.h is probably wrong, we could
add sys/user.h, netinet/in.h, or sys/socket.h.

procstat(1)'s sources all include sys/user.h, so I suspect that it is
the header that is missing.  sys/user.h already includes sys/queue.h,
so it is maybe not needed?

--=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-217884-9>