compiler: Provide LIBPLDM_CC_UNUSED

Ensure that we have __has_attribute available, and then further
ensure that the unused attribute is provided. Once satisfied, define
LIBPDLM_CC_UNUSED and replace raw use of __attribute__((unused)).

Change-Id: I2433039297d5fdedb8b8d99b30e73e4542d9069f
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/transport/mctp-demux.c b/src/transport/mctp-demux.c
index 0ea1cf6..a4f7cbe 100644
--- a/src/transport/mctp-demux.c
+++ b/src/transport/mctp-demux.c
@@ -1,4 +1,5 @@
 /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#include "compiler.h"
 #include "container-of.h"
 #include "mctp-defines.h"
 #include "socket.h"
@@ -116,7 +117,7 @@
 
 LIBPLDM_ABI_STABLE
 int pldm_transport_mctp_demux_unmap_tid(struct pldm_transport_mctp_demux *ctx,
-					__attribute__((unused)) pldm_tid_t tid,
+					LIBPLDM_CC_UNUSED pldm_tid_t tid,
 					mctp_eid_t eid)
 {
 	ctx->tid_eid_map[eid] = 0;