libmctp: Introduce compiler.h
Define __unused here and include compiler.h in all the places we can
make use of it. Clean up some header ordering and include styles while
we're at it.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I33ddbdacbddbbf557dc02e42d8dde71a16e1cabe
diff --git a/utils/mctp-demux-daemon.c b/utils/mctp-demux-daemon.c
index 968079f..d7ab9bc 100644
--- a/utils/mctp-demux-daemon.c
+++ b/utils/mctp-demux-daemon.c
@@ -3,6 +3,13 @@
#define _GNU_SOURCE
#include "config.h"
+
+#define SD_LISTEN_FDS_START 3
+
+#include "compiler.h"
+#include "libmctp.h"
+#include "libmctp-serial.h"
+#include "libmctp-astlpc.h"
#include "utils/mctp-capture.h"
#include <assert.h>
@@ -22,14 +29,7 @@
#include <sys/socket.h>
#include <sys/un.h>
-#define SD_LISTEN_FDS_START 3
-
-#include "libmctp.h"
-#include "libmctp-serial.h"
-#include "libmctp-astlpc.h"
-
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-#define __unused __attribute__((unused))
#if HAVE_SYSTEMD_SD_DAEMON_H
#include <systemd/sd-daemon.h>