]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make inline ABD predicates compatible with C++
authorRyan Moeller <freqlabs@FreeBSD.org>
Mon, 15 Feb 2021 18:15:50 +0000 (13:15 -0500)
committerGitHub <noreply@github.com>
Mon, 15 Feb 2021 18:15:50 +0000 (10:15 -0800)
commit436ab35a53bad83c3dc4b8f1dc2b6ad00bd5e9ec
treea38ec2f4bf741b06a7505a9f1fceaf82726a1d5c
parentc1c31a835a7c57dac7d9a6026f075c0bd7f43fa6
Make inline ABD predicates compatible with C++

FreeBSD's zfsd fails to build after e2af2acce3 due to strict type
checking errors from the implicit conversion between bool and boolean_t
in the inline predicate definitions in abd.h.

Use conditionals to return the correct value type from these functions.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #11592
include/sys/abd.h