On new Solaris (11.1), nfs/auth.h #defines areq and auid to access
some elements inside the nfsauth_arg structure more easily. We have a
lot of functions that use those names as parameters, so the compiler
throws an error (since we have a decl like "struct vrequest
*areq_u.areq").
We cannot avoid including that header, since we need some NFS-related
headers for the NFS xlator, and they pull in nfs/auth.h
unconditionally. So, work around this by undefining areq and auid
afterwards.
Change-Id: Ifd139917dfe7a1221941351f7873fe183c617159
Reviewed-on: http://gerrit.openafs.org/8873
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
#include "rpc/xdr.h"
#include "rpc/svc.h"
#include "nfs/nfs.h"
+
#include "nfs/export.h"
+/* Solaris 11.1 defines areq to areq_u.areq (and auid to areq_u.auid), for
+ * shortcut accessors to the nfsauth_arg structure. Since we dare to use the
+ * names areq and auid as parameter names in a lot of functions, work around
+ * this by undefining it. */
+#ifdef areq
+# undef areq
+#endif
+#ifdef auid
+# undef auid
+#endif
+
#include "nfs/nfs_clnt.h"
#include "nfs/nfs_acl.h"
#include "afs/afsincludes.h"