NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/53123: incomplete type kinfo_proc.

The following reply was made to PR lib/53123; it has been noted by GNATS.

From: (Michael van Elst)
Subject: Re: lib/53123: incomplete type kinfo_proc.
Date: Sat, 24 Mar 2018 07:43:22 -0000 (UTC) writes:
 >2. Compile it with clang (or gcc) to get the following error:
 >temp.c:5:8: error: invalid application of 'sizeof' to an incomplete type 'struct kinfo_proc'
 >printf(sizeof(struct kinfo_proc));
 The structure kinfo_proc is exposed only to kernel code and kmem users.
 % cat c.c
 #define _KMEMUSER
 #include <stdio.h>
 #include <sys/sysctl.h>
 int main() {
     printf("%d\n",sizeof(struct kinfo_proc));
     return 0;
 % cc c.c
 % ./a.out
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index