X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=libcfs%2Fautoconf%2Flustre-libcfs.m4;h=2df490adc643c1937ef03a677bc5587058c4a4a4;hp=21c8208480cf22302dc6b96bbd834cdda9b978c6;hb=457e36a2993fcefe18c571ff5b798e3ab4aec81a;hpb=04c4b9c2a121e76881f8b387a4721069418c92f0 diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 21c8208..2df490a 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -316,7 +316,7 @@ ktime_get_ts64, [ # # Linux kernel 3.12 introduced struct kernel_param_ops # This has been backported to all lustre supported -# clients expect RHEL6. We have to handle the differences. +# clients except RHEL6. We have to handle the differences. # AC_DEFUN([LIBCFS_KERNEL_PARAM_OPS],[ LB_CHECK_COMPILE([does 'struct kernel_param_ops' exist], @@ -324,6 +324,8 @@ kernel_param_ops, [ #include ],[ struct kernel_param_ops ops; + + ops.set = NULL; ],[ AC_DEFINE(HAVE_KERNEL_PARAM_OPS, 1, ['struct kernel_param_ops' is available]) @@ -417,7 +419,9 @@ shrinker_count_objects, [ #include #include ],[ - ((struct shrinker*)0)->count_objects(NULL, NULL); + struct shrinker shrinker; + + shrinker.count_objects = NULL; ],[ AC_DEFINE(HAVE_SHRINKER_COUNT, 1, [shrinker has count_objects member]) @@ -539,7 +543,7 @@ ktime_to_timespec64, [ #include ],[ struct timespec64 ts; - ktime_t now; + ktime_t now = { }; ts = ktime_to_timespec64(now); ],[ @@ -556,7 +560,7 @@ LB_CHECK_COMPILE([does function 'timespec64_sub' exist], timespec64_sub, [ #include ],[ - struct timespec64 later,earlier,diff; + struct timespec64 later = { }, earlier = { }, diff; diff = timespec64_sub(later, earlier); ],[ @@ -845,6 +849,8 @@ wait_queue_entry, [ #include ],[ wait_queue_entry_t e; + + e.flags = 0; ],[ AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY, 1, ['wait_queue_entry_t' is available])