]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Include endian.h for byte/host order functions
authorNatanael Copa <ncopa@alpinelinux.org>
Mon, 26 Dec 2016 22:12:58 +0000 (23:12 +0100)
committerNatanael Copa <ncopa@alpinelinux.org>
Mon, 26 Dec 2016 22:14:40 +0000 (23:14 +0100)
Fix the following error when building with musl libc:

nvme.h:136:2: error: implicit declaration of function 'le16toh'
[-Werror=implicit-function-declaration]
  le16toh((__force __u16)(x))
  ^

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
nvme.h

diff --git a/nvme.h b/nvme.h
index 66235054647103b34091aa951eace097f84232c0..5481916f87a826dc9ffab52561ee065aca981b37 100644 (file)
--- a/nvme.h
+++ b/nvme.h
@@ -16,6 +16,7 @@
 #define _NVME_H
 
 #include <stdbool.h>
+#include <endian.h>
 #include "plugin.h"
 
 #define unlikely(x) x