From 0efd46fd2e685790b49815007dac4484da73f136 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Wed, 27 Apr 2016 11:15:17 -0500 Subject: [PATCH] LU-8036 utils: remove ARRAY_SIZE() define from lustreapi.h Remove the definition of ARRAY_SIZE() from lustreapi.h. Signed-off-by: John L. Hammond Change-Id: I57b1893e7ecd57d841f5b9348a8d5285cbc02124 Reviewed-on: http://review.whamcloud.com/19818 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons --- lustre/include/lustre/lustreapi.h | 2 -- lustre/utils/lfs.c | 4 ++++ lustre/utils/req-layout.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lustre/include/lustre/lustreapi.h b/lustre/include/lustre/lustreapi.h index 3f0cf97..e67d859 100644 --- a/lustre/include/lustre/lustreapi.h +++ b/lustre/include/lustre/lustreapi.h @@ -46,8 +46,6 @@ #include #include -#define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0]))) - extern bool liblustreapi_initialized; diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index bcc1963..14a84a9 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -75,6 +75,10 @@ #include #include +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0]))) +#endif /* !ARRAY_SIZE */ + /* all functions */ static int lfs_setstripe(int argc, char **argv); static int lfs_find(int argc, char **argv); diff --git a/lustre/utils/req-layout.c b/lustre/utils/req-layout.c index 3a975e7..74997cb 100644 --- a/lustre/utils/req-layout.c +++ b/lustre/utils/req-layout.c @@ -56,6 +56,10 @@ #include #include +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0]))) +#endif /* !ARRAY_SIZE */ + #define lustre_swab_generic_32s NULL #define lustre_swab_lu_seq_range NULL #define lustre_swab_mdt_body NULL -- 1.8.3.1