libselinux: Change annotation on include/selinux/avc.h to avoid upsetting SWIG

The earlier patch to avc.c put the struct member annotation at
the end of the line, which works fine for GCC, but upsets SWIG.
Equivalent code in selinux.h demonstrates how to place the
annotation without upsetting SWIG.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel P. Berrange 2012-01-23 18:13:53 +00:00 committed by Eric Paris
parent a1044d4c84
commit bcdf92aac4
1 changed files with 5 additions and 1 deletions

View File

@ -130,7 +130,11 @@ struct avc_memory_callback {
struct avc_log_callback { struct avc_log_callback {
/* log the printf-style format and arguments. */ /* log the printf-style format and arguments. */
void (*func_log) (const char *fmt, ...) __attribute__((__format__(printf, 1, 2))); void
#ifdef __GNUC__
__attribute__ ((format(printf, 1, 2)))
#endif
(*func_log) (const char *fmt, ...);
/* store a string representation of auditdata (corresponding /* store a string representation of auditdata (corresponding
to the given security class) into msgbuf. */ to the given security class) into msgbuf. */
void (*func_audit) (void *auditdata, security_class_t cls, void (*func_audit) (void *auditdata, security_class_t cls,