Code

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 23ad992c84bcb271ba29f04c3730836256495831..012fd9a9bcb28bb02a37ff9845a5aabb712b5342 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)