Eliminate memset() usage from config check. It may introduces
its own compiler error on some systems.
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I1e6eae772782b3dbeab75230bfa41e781c4c4028
Reviewed-on: http://review.whamcloud.com/2336
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#include <linux/exportfs.h>
#endif
],[
#include <linux/exportfs.h>
#endif
],[
- struct export_operations exp;
- memset(exp.fh_to_dentry, 0, sizeof(exp.fh_to_dentry));
+ do{ }while(sizeof(((struct export_operations *)0)->fh_to_dentry));
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FH_TO_DENTRY, 1,
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FH_TO_DENTRY, 1,
#include <linux/spinlock.h>
#include <linux/fs_struct.h>
],[
#include <linux/spinlock.h>
#include <linux/fs_struct.h>
],[
- fs.pwd = path;
- memset(&fs, 0, sizeof(fs));
+ fs.pwd = *((struct path *)sizeof(fs));
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
LB_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
LB_LINUX_TRY_COMPILE([
#include <linux/blkdev.h>
],[
- struct request_queue rq;
- memset(rq.unplug_fn, 0, sizeof(rq.unplug_fn));
+ do{ }while(sizeof(((struct request_queue *)0)->unplug_fn));
],[
AC_DEFINE(HAVE_REQUEST_QUEUE_UNPLUG_FN, 1,
[request_queue has unplug_fn field])
],[
AC_DEFINE(HAVE_REQUEST_QUEUE_UNPLUG_FN, 1,
[request_queue has unplug_fn field])