NetBSD-Bugs archive

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

lib/53123: incomplete type kinfo_proc.

>Number:         53123
>Category:       lib
>Synopsis:       incomplete type kinfo_proc.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 24 07:15:00 +0000 2018
>Originator:     Utkarsh Anand
>Release:        8.0_BETA
NetBSD  8.0_BETA NetBSD 8.0_BETA (GENERIC) #1: Mon Mar 12 19:41:15 IST 2018  root@Microknoppix:/extra/netbsd-8/sys/arch/amd64/compile/GENERIC amd64
I am not able to work with struct kinfo_proc which is defined in sys/sysctl.h:
1. Create a file temp.c with these contents:
#include <stdio.h>
#include <sys/sysctl.h>

int main() {
    printf(%d,sizeof(struct kinfo_proc));
    return 0;
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));
       ^     ~~~~~~~~~~~~~~~~~~~

Home | Main Index | Thread Index | Old Index