--- libxfs/xfs_attr_remote.c.orig
+++ libxfs/xfs_attr_remote.c
@@ -35,6 +35,7 @@
 #include "xfs_trans_space.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
+#include <linux/limits.h>
 
 #define ATTR_RMTVALUE_MAPSIZE	1	/* # of map entries at once */
 
