OSDN Git Service

security: Used macros from compiler.h instead of __attribute__((...))
authorGideon Israel Dsouza <gidisrael@gmail.com>
Wed, 11 Jun 2014 15:55:30 +0000 (21:25 +0530)
committerPaul Moore <pmoore@redhat.com>
Wed, 18 Jun 2014 20:59:34 +0000 (16:59 -0400)
To increase compiler portability there is <linux/compiler.h> which
provides convenience macros for various gcc constructs.  Eg: __packed
for __attribute__((packed)).

This patch is part of a large task I've taken to clean the gcc
specific attributes and use the the macros instead.

Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/include/security.h

index ce7852c..d1e0b23 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef _SELINUX_SECURITY_H_
 #define _SELINUX_SECURITY_H_
 
+#include <linux/compiler.h>
 #include <linux/dcache.h>
 #include <linux/magic.h>
 #include <linux/types.h>
@@ -220,7 +221,7 @@ struct selinux_kernel_status {
        /*
         * The version > 0 supports above members.
         */
-} __attribute__((packed));
+} __packed;
 
 extern void selinux_status_update_setenforce(int enforcing);
 extern void selinux_status_update_policyload(int seqno);