From 5dafa4940f85a10a45967f2de767ce06e7e6ccf0 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 19 Feb 2016 12:41:12 -0700 Subject: [PATCH] nvme.h: include stdbool.h and stdint.h Explicitly include system headers for types that are used in public headers. These were being pulled in by example code, so SPDK itself would build, but other apps that did not include stdbool.h would fail to compile when including spdk/nvme.h. Also include nvme.h first in nvme_internal.h so this case gets tested during normal compilation. Change-Id: I8ed0fc4e0dcf71551738c461b4b825cc2ee1d233 Signed-off-by: Daniel Verkamp --- include/spdk/nvme.h | 2 ++ lib/nvme/nvme_internal.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/spdk/nvme.h b/include/spdk/nvme.h index d76220369..226fc032c 100644 --- a/include/spdk/nvme.h +++ b/include/spdk/nvme.h @@ -38,7 +38,9 @@ extern "C" { #endif +#include #include +#include #include "spdk/pci.h" #include "nvme_spec.h" diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index 2d9064cbd..58bcea42e 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -34,6 +34,8 @@ #ifndef __NVME_INTERNAL_H__ #define __NVME_INTERNAL_H__ +#include "spdk/nvme.h" + #include #include #include @@ -47,8 +49,6 @@ #include -#include "spdk/nvme.h" - #include "spdk/queue.h" #include "spdk/barrier.h" #include "spdk/mmio.h"