Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-27-2005, 06:54 PM   #1
LQ Newbie
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
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.
Old 11-28-2005, 03:23 PM   #2
Senior Member
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
I think you need to include the code that defines the task_struct structure which is (I believe) in:
 #include <linux/types.h>


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tai64nlocal.c:55: error: dereferencing pointer to incomplete type ExCIA Linux - General 1 03-31-2009 09:49 AM
ereferencing pointer to incomplete type? ams Programming 5 03-03-2005 10:32 AM
arrays of elements with [gcc4]array type has incomplete element type lmmix Linux - Software 0 02-26-2005 08:07 AM
Incomplete type ChemicalBurn Programming 4 02-24-2005 08:44 AM
C error "dereferencing pointer to incomplete type" lucs Slackware 6 02-21-2005 09:33 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration