From: nikita Date: Thu, 18 May 2006 20:57:51 +0000 (+0000) Subject: liblustre: define ARRAY_SIZE() if not already defined. X-Git-Tag: v1_8_0_110~486^2~1798 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3db7671b9dc32dbedbd29416301c0f46daa143e1;p=fs%2Flustre-release.git liblustre: define ARRAY_SIZE() if not already defined. --- diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index 9b8d4aa..b0f21cb 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -85,6 +85,10 @@ typedef unsigned short umode_t; # define CURRENT_SECONDS time(0) #endif +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) ((sizeof (a))/(sizeof ((a)[0]))) +#endif + /* This is because lprocfs_status.h gets included here indirectly. It would * be much better to just avoid lprocfs being included into liblustre entirely * but that requires more header surgery than I can handle right now. @@ -799,7 +803,7 @@ struct file_lock { unsigned long fl_break_time; /* for nonblocking lease breaks */ union { - struct nfs_lock_info nfs_fl; + struct nfs_lock_info nfs_fl; } fl_u; };