Whamcloud - gitweb
land portals part of b_hd_sec on HEAD.
[fs/lustre-release.git] / lnet / utils / wirecheck.c
index a73a521..986d081 100644 (file)
@@ -5,10 +5,13 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <portals/api-support.h>
-#include <portals/list.h>
 #include <portals/lib-types.h>
 
-extern size_t strnlen(const char *, size_t);
+#include <string.h>
+
+#ifndef HAVE_STRNLEN
+#define strnlen(s, i) strlen(s)
+#endif
 
 #define BLANK_LINE()                            \
 do {                                            \
@@ -34,7 +37,7 @@ do {                                                    \
 
 #define CHECK_MEMBER_OFFSET(s,m)                \
 do {                                            \
-        CHECK_VALUE(offsetof(s, m));            \
+        CHECK_VALUE((int)offsetof(s, m));       \
 } while (0)
 
 #define CHECK_MEMBER_SIZEOF(s,m)                \