]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
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 9050ef535fb3767dba748175da5f8f9c27d7642d..4fb0758521e99c0b21734f0545c32df9c9ea9834 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