From: Rakesh Pandit Date: Mon, 24 Apr 2017 07:44:17 +0000 (+0300) Subject: nvme-cli: Fix build on aarch64-linux-android-4.9 X-Git-Tag: v1.3~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=59585dcaaf1b22044db65129f1ae734a86cd4367;p=users%2Fsagi%2Fnvme-cli.git nvme-cli: Fix build on aarch64-linux-android-4.9 Need to include sys/stat.h to fix: fabrics.c:414:45: error: 'S_IRUSR' undeclared (first use in this function) fabrics.c:414:53: error: 'S_IWUSR' undeclared (first use in this function) Also fix warning: common.h:4:0: warning: "offsetof" redefined #define offsetof(x, y) __builtin_offsetof(x, y) ^ Fix this trivial warning by including stddef.h and removing this definition. Signed-off-by: Rakesh Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch --- diff --git a/common.h b/common.h index f0a94de5..8338a3d0 100644 --- a/common.h +++ b/common.h @@ -1,8 +1,6 @@ #ifndef _COMMON_H #define _COMMON_H -#define offsetof(x, y) __builtin_offsetof(x, y) - #define __round_mask(x, y) ((__typeof__(x))((y)-1)) #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) diff --git a/fabrics.c b/fabrics.c index a2e8f602..6648bae4 100644 --- a/fabrics.c +++ b/fabrics.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include "parser.h" #include "nvme-ioctl.h"