From afaeccc05a556f6aa25ba044a7e49d6aa634a59e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 20 Sep 2019 07:57:01 +0200 Subject: NVMECONTROL(8): Port to RTEMS Update #3821. --- freebsd/sbin/nvmecontrol/ns.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'freebsd/sbin/nvmecontrol/ns.c') diff --git a/freebsd/sbin/nvmecontrol/ns.c b/freebsd/sbin/nvmecontrol/ns.c index bb9b0011..841c1a87 100644 --- a/freebsd/sbin/nvmecontrol/ns.c +++ b/freebsd/sbin/nvmecontrol/ns.c @@ -28,6 +28,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef __rtems__ +#include +#endif /* __rtems__ */ #include __FBSDID("$FreeBSD$"); @@ -368,7 +371,7 @@ struct ns_result_str { const char * str; }; -static struct ns_result_str ns_result[] = { +static const struct ns_result_str ns_result[] = { { 0x2, "Invalid Field"}, { 0xa, "Invalid Format"}, { 0xb, "Invalid Namespace or format"}, @@ -387,7 +390,7 @@ static struct ns_result_str ns_result[] = { static const char * get_res_str(uint16_t res) { - struct ns_result_str *t = ns_result; + const struct ns_result_str *t = ns_result; while (t->res != 0xFFFF) { if (t->res == res) -- cgit v1.2.3