나는 리눅스 커널의 /usr/src/linux-3.2/include/linux/unistd.h
에 정의 된 구조를 가지고 리눅스 커널에 정의 된 사용 :오류는 구조체
test.c: In function 'main':
test.c:4:78: error: invalid application of 'sizeof' to incomplete type 'struct threadinfo_struct'
,369 : 나는 시도하고이 작업을 수행 할 때
#include <stdio.h>
#include <linux/unistd.h>
int main(void) {
struct threadinfo_struct *ti = (struct threadinfo_struct*) malloc(sizeof(struct threadinfo_struct));
// ...
return 0;
}
그러나, 나는이 프로그램의 컴파일에 오류가
이 오류가 발생하는 이유는 무엇이며 어떻게 해결할 수 있습니까? 필자는 Linux 커널을 처음 접했을 때 많은 정보를 찾기가 어렵습니다.
감사합니다. :디 – Darthfett