nick at dsvr.net
Thu Jan 31 07:20:51 PST 2002
Christian Ludlam <chris at recoil.org> writes:
> How do I get ptr_t defined from inside UnixLib? I have an implementation of
> scandir to go into dirent.c which wants ptr_t to be defined but it isn't.
> >From the rest of dirent.c it looks like I should be defining __need_ptr_t or
> something, but stddef.h doesn't check for it.
> What should I do?
Fix the prototype in dirent.h. It should be:
int scandir(const char *dir, struct dirent ***namelist,
int (*select)(const struct dirent *),
int (*compar)(const struct dirent **, const struct dirent **));
The problem happens because of this line:
which stops ptr_t being defined.
More information about the gcc