* [PATCH v2] nvme-cli: Fix build on aarch64-linux-android-4.9
@ 2017-04-24 7:44 Rakesh Pandit
2017-04-24 7:47 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Rakesh Pandit @ 2017-04-24 7:44 UTC (permalink / raw)
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.
V2: Instead of using ifndef remove the offsetof definition and include
stddef.h
Signed-off-by: Rakesh Pandit <rakesh at tuxera.com>
---
common.h | 2 --
fabrics.c | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common.h b/common.h
index f0a94de..8338a3d 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 a2e8f60..6648bae 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -32,6 +32,8 @@
#include <inttypes.h>
#include <linux/types.h>
#include <libgen.h>
+#include <sys/stat.h>
+#include <stddef.h>
#include "parser.h"
#include "nvme-ioctl.h"
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] nvme-cli: Fix build on aarch64-linux-android-4.9
2017-04-24 7:44 [PATCH v2] nvme-cli: Fix build on aarch64-linux-android-4.9 Rakesh Pandit
@ 2017-04-24 7:47 ` Christoph Hellwig
2017-04-24 15:07 ` Keith Busch
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2017-04-24 7:47 UTC (permalink / raw)
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] nvme-cli: Fix build on aarch64-linux-android-4.9
2017-04-24 7:47 ` Christoph Hellwig
@ 2017-04-24 15:07 ` Keith Busch
0 siblings, 0 replies; 3+ messages in thread
From: Keith Busch @ 2017-04-24 15:07 UTC (permalink / raw)
Thanks, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-24 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-24 7:44 [PATCH v2] nvme-cli: Fix build on aarch64-linux-android-4.9 Rakesh Pandit
2017-04-24 7:47 ` Christoph Hellwig
2017-04-24 15:07 ` Keith Busch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.