afsd: roken.h includes dirent.h; get valid dirent defines on osx
[openafs.git] / src / afsd / afsd.c
index 9050ef5..4fb0758 100644 (file)
 
 #include <afsconfig.h>
 #include <afs/param.h>
-#include <roken.h>
+/* darwin dirent.h doesn't give us the prototypes we want if KERNEL is
+ * defined, and roken includes dirent */
+#if defined(UKERNEL) && defined(AFS_USR_DARWIN_ENV)
+# undef KERNEL
+# include <roken.h>
+# define KERNEL
+#else
+# include <roken.h>
+#endif
 
 #define VFS 1