From: Andrew Deason Date: Fri, 4 Jan 2013 18:47:35 +0000 (-0500) Subject: SOLARIS: Avoid areq and auid conflict X-Git-Tag: upstream/1.6.2_pre3^2~4 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5be413b079dfceae7b6881913c14a67561907db7;p=packages%2Fo%2Fopenafs.git SOLARIS: Avoid areq and auid conflict 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. Reviewed-on: http://gerrit.openafs.org/8873 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 936c2b02bf6fbeb3844c539665392ae89eb652fe) Change-Id: I54da96a48d163b6aa57bb8525ff4c80f10d70fa1 Reviewed-on: http://gerrit.openafs.org/8889 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand --- diff --git a/src/afs/afs_nfsdisp.c b/src/afs/afs_nfsdisp.c index 39b92c97b..02f494d18 100644 --- a/src/afs/afs_nfsdisp.c +++ b/src/afs/afs_nfsdisp.c @@ -27,7 +27,19 @@ #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"