LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   redeferenced pointer to incomplete type (https://www.linuxquestions.org/questions/programming-9/redeferenced-pointer-to-incomplete-type-387103/)

Aldair1808 11-27-2005 06:54 PM

redeferenced pointer to incomplete type
 
Hi to all! I'm trying to write a new system_call fir Linux kernel; in order to do that the next code wst wroten:

#include <stdio.h>
#include <sched.h>
#include <errno.h>

int sys_getpath(int pid, int *array, int size) {

struct task_struct *p;

*************

if(******************) {
p = find_task_by_pid(pid);

/*no such process*/
**********
for(************ p = p->p_pptr)
a[i++] = p->pid;
if(i < size)
a[i] = p->pid;


and so on.

Now, in all places that were used the 'p' pointer, the gcc compiler give us this error message: redeferenced pointer to incomplete type.

what is going on???!! any suggestions....?? thanks.

graemef 11-28-2005 03:23 PM

I think you need to include the code that defines the task_struct structure which is (I believe) in:
Code:

#include <linux/types.h>
graeme


All times are GMT -5. The time now is 12:16 AM.