mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
DARWIN: Make crfree() an inline function
On Darwin 100, we have #define crfree(X) kauth_cred_unref(&X) which expands in one place to kauth_cred_unref(&(afs_ucred_t *)avc->linkData) clang warns about this in -Werror mode, because arguments to the address-of operator must be lvalues. To fix this make crfree an inline function, which will then let us do the indirection required. Reviewed-on: http://gerrit.openafs.org/7073 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Derrick Brashear <shadow@dementix.org> (cherry picked from commit1d8937b860
) Reviewed-on: http://gerrit.openafs.org/10548 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> (cherry picked from commit931d1a8bea
) Change-Id: Iba1def8ae4004e918185109767bd8a0f0a263813 Reviewed-on: http://gerrit.openafs.org/10607 Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
parent
5f45d5b8eb
commit
59269b39b2
@ -33,6 +33,7 @@ typedef unsigned short etap_event_t;
|
||||
#include <sys/lock.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/kauth.h>
|
||||
#endif
|
||||
#include <kern/thread.h>
|
||||
|
||||
@ -104,7 +105,7 @@ enum vcexcl { EXCL, NONEXCL };
|
||||
#define crref kauth_cred_get_with_ref
|
||||
#define crhold kauth_cred_ref
|
||||
#ifdef AFS_DARWIN100_ENV
|
||||
#define crfree(X) kauth_cred_unref(&X)
|
||||
static inline void crfree(kauth_cred_t X) { kauth_cred_unref(&X); }
|
||||
#else
|
||||
#define crfree kauth_cred_rele
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user