aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nvme-cli/musl-fix.patch
blob: 873233bfc84eb0f9f68d7daadc21a6530dba0324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 329df07e86c27308a3c3fee9054390bc0271e8b8 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 26 Dec 2016 23:12:58 +0100
Subject: [PATCH] Include endian.h for byte/host order functions

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nvme.h b/nvme.h
index 6623505..5481916 100644
--- 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