astlpc: Make sure fileio capability builds if we've requested it
Not including config.h left MCTP_HAVE_FILEIO undefined, which lead to
unexpected behaviour.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I433870ae4b0d54aedfec8adbaedc2915297ead21
diff --git a/astlpc.c b/astlpc.c
index e701a6d..bf35046 100644
--- a/astlpc.c
+++ b/astlpc.c
@@ -2,12 +2,17 @@
#include <assert.h>
#include <endian.h>
+#include <err.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#define pr_fmt(x) "astlpc: " x
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "libmctp.h"
#include "libmctp-alloc.h"
#include "libmctp-log.h"
@@ -498,12 +503,14 @@
struct mctp_binding_astlpc * __attribute__((const))
mctp_astlpc_init_fileio(void)
{
+ warnx("Missing support for file IO");
return NULL;
}
int __attribute__((const)) mctp_astlpc_get_fd(
struct mctp_binding_astlpc *astlpc __attribute__((unused)))
{
+ warnx("Missing support for file IO");
return -1;
}
#endif