[PATCH 29/73] libselinux: Change annotation on include/selinux/avc.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


   This patch looks good to me. acked.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9x2H8ACgkQrlYvE4MpobPU4gCeJaQD5WUpSvTp09aMqAOl7MKd
mh0AoOXyBapdSSDqMax4tOgInhJehF4K
=MN+x
-----END PGP SIGNATURE-----
>From 81ddc1f01009ced31cd7ce7e56c09fb3e2643b0e Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Mon, 23 Jan 2012 18:13:53 +0000
Subject: [PATCH 29/73] 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@xxxxxxxxxx>
---
 libselinux/include/selinux/avc.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libselinux/include/selinux/avc.h b/libselinux/include/selinux/avc.h
index 9655957..87a2b12 100644
--- a/libselinux/include/selinux/avc.h
+++ b/libselinux/include/selinux/avc.h
@@ -130,7 +130,11 @@ struct avc_memory_callback {
 
 struct avc_log_callback {
 	/* 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
 	   to the given security class) into msgbuf. */
 	void (*func_audit) (void *auditdata, security_class_t cls,
-- 
1.7.9.3


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux