Use a forward definition of an opaque structure rather than a void

to avoid a strict alias type check failure in gcc 4.2.
This commit is contained in:
John Birrell 2007-11-20 01:49:00 +00:00
parent 844b78330c
commit 6276af0ff1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173762

View File

@ -60,6 +60,7 @@
#define DIRBLKSIZ 1024
struct _telldir; /* see telldir.h */
struct pthread_mutex;
/* structure describing an open directory. */
typedef struct _dirdesc {
@ -71,7 +72,7 @@ typedef struct _dirdesc {
long dd_seek; /* magic cookie returned by getdirentries */
long dd_rewind; /* magic cookie for rewinding */
int dd_flags; /* flags for readdir */
void *dd_lock; /* hack to avoid including <pthread.h> */
struct pthread_mutex *dd_lock; /* lock */
struct _telldir *dd_td; /* telldir position recording */
} DIR;