mtd: expand configure check
authorJens Axboe <axboe@fb.com>
Mon, 17 Aug 2015 21:47:42 +0000 (15:47 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 17 Aug 2015 21:47:42 +0000 (15:47 -0600)
SLES 11.4 has enough of mtd to pass the configure checks, but not
to compile it. Expand the checks to hopefully be enough.

Signed-off-by: Jens Axboe <axboe@fb.com>
configure

index 4fb65e66a5bcef26dbcec9477b809a60620463fe..1a41fe58024ea40a0d892c9d9e44ff7eb0e819bb 100755 (executable)
--- a/configure
+++ b/configure
@@ -1409,11 +1409,14 @@ echo "HDFS engine                   $libhdfs"
 # Check whether we have MTD
 mtd="no"
 cat > $TMPC << EOF
+#include <string.h>
 #include <mtd/mtd-user.h>
 #include <sys/ioctl.h>
 int main(int argc, char **argv)
 {
+  struct mtd_write_req ops;
   struct mtd_info_user info;
+  memset(&ops, 0, sizeof(ops));
   info.type = MTD_MLCNANDFLASH;
   return ioctl(0, MEMGETINFO, &info);
 }