Make chrony compile with Solaris Studio compiler
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 24 Jul 2016 11:19:08 +0000 (13:19 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 24 Jul 2016 11:20:21 +0000 (13:20 +0200)
Ideally we'll have autoconf checks for supported attributes,
will look into that later.

src/chrony.c

index 23ad992..012fd9a 100644 (file)
@@ -105,8 +105,8 @@ typedef enum
 } eDaemonReplies;
 
 
-#if defined(__GNUC__)
-#  /* GNU gcc extension to enforce struct packing. */
+#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(lint)
+#  /* extension to enforce struct packing. */
 #  define ATTRIB_PACKED __attribute__((packed))
 #else
 #  error Not defining packed attribute (unknown compiler)