Commit 0e14bcc4 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] selinux build fix

With gcc-3.5 from CVS:

security/selinux/avc.c:76: error: static declaration of 'avc_cache_stats' follows non-static declaration
security/selinux/include/avc.h:107: error: previous declaration of 'avc_cache_stats' was here
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b6d1145f
......@@ -81,6 +81,24 @@ static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass)
return (ssid ^ (tsid<<2) ^ (tclass<<4)) & (AVC_CACHE_SLOTS - 1);
}
#ifdef AVC_CACHE_STATS
static inline void avc_cache_stats_incr(int type)
{
avc_cache_stats[type]++;
}
static inline void avc_cache_stats_add(int type, unsigned val)
{
avc_cache_stats[type] += val;
}
#else
static inline void avc_cache_stats_incr(int type)
{ }
static inline void avc_cache_stats_add(int type, unsigned val)
{ }
#endif
/**
* avc_dump_av - Display an access vector in human-readable form.
* @tclass: target security class
......
......@@ -104,25 +104,6 @@ struct avc_audit_data {
#define AVC_CAV_PROBES 6
#define AVC_CAV_MISSES 7
#define AVC_NSTATS 8
extern unsigned avc_cache_stats[AVC_NSTATS];
#ifdef AVC_CACHE_STATS
static inline void avc_cache_stats_incr(int type)
{
avc_cache_stats[type]++;
}
static inline void avc_cache_stats_add(int type, unsigned val)
{
avc_cache_stats[type] += val;
}
#else
static inline void avc_cache_stats_incr(int type)
{ }
static inline void avc_cache_stats_add(int type, unsigned val)
{ }
#endif
/*
* AVC display support
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment