[dm-devel] [PATCH] libmultipath: fix compile error with glibc-2.34+

lixiaokeng lixiaokeng at huawei.com
Thu Aug 12 12:45:04 UTC 2021



On 2021/8/12 19:17, Martin Wilck wrote:
> Hello Lixiaokeng,
> 
> On Mi, 2021-08-11 at 21:11 +0800, lixiaokeng wrote:
>> There is an error when complie with glibc-2.34:
>> comparison of integer expressions of different signedness:
>> 'size_t' {aka 'long unsigned int'} and 'long int'
>> [-Werror=sign-compare]
>>
>> The reason is that PTHREAD_STACK_MIN may be defined
>> long int which is  signed in glibc-2.34+. Explicitly assign
>> it to the size_t variable to  fix it.
>>
>> Signed-off-by: Lixiaokeng <lixiaokeng at huawei.com>
>> Signed-off-by: Zhiqiang Liu <liuzhiqiang26 at huawei.com>
> 
> Thanks! Ben had already submitted a patch for this in
> https://listman.redhat.com/archives/dm-devel/2021-July/msg00159.html.
> 
> Ben's patch handles the error case (-1) more correctly.
> 
> Regards
> Martin
> 
> 

Thanks for reply, I will using Ben's patch to replace my patch.

Regards,
Lixiaokeng





More information about the dm-devel mailing list