afsd: roken.h includes dirent.h; get valid dirent defines on osx
authorDerrick Brashear <shadow@your-file-system.com>
Tue, 18 Sep 2012 03:26:12 +0000 (23:26 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 18 Sep 2012 12:08:14 +0000 (05:08 -0700)
our workaround for #define KERNEL didn't work on OSX because
roken.h included dirent.h before we got the chance. cope with
it.

Change-Id: I5e580aa934cec4e99d62ba105873f71b11326e2f
Reviewed-on: http://gerrit.openafs.org/8132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

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