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

[LCP]directory test



Hi,

I have some questions regarding opendir.
After calling it I would like to check if the directory is a symbolic 
name or not. However compiling this gives me the following error:

dereferencing pointer to incomplete type


int
islink(int fd)
{
    struct stat st;
    if ((fstat(fd,&st))<0) return -1;
    if (S_ISLNK(st.st_mode)) return 1;
    else return 0;
}


void
otherfunc(void)
{
 DIR *d;
  ....
  d = opendir (abs_outdir);
  ...
  if (islink(d->dd_fd)!=0)  return 1;
  ....
}

Somebody know how to check for something like this?

Thanks & Best regards,
Joachim Bauernberger
-- 
http://mXscan.org/pgp/joachim.html