Strange error(dereferencing pointer to incomplete type)
Posted
by SMiX
on Stack Overflow
See other posts from Stack Overflow
or by SMiX
Published on 2010-04-22T18:25:35Z
Indexed on
2010/04/22
18:33 UTC
Read the original article
Hit count: 219
void get_cwd(char* buf)
{
char *result;
current->fs->pwd;
result = get_dentry_path(current->fs->pwd);
memcpy(buf, result, strlen(result)+1);
kfree(result);
}
error: dereferencing pointer to incomplete type
The error points to current->fs->pwd;
includes:
#include <asm/stat.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/dirent.h>
#include <linux/sched.h>
#include <asm/uaccess.h>
#include <asm/current.h>
#include <linux/path.h>
If I type current->fs; on 5th line gcc don't give error on this line. The problem is with pwd
field.
© Stack Overflow or respective owner