]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: Use POSIX-conformant strerror_r
authorA. Wilcox <AWilcox@Wilcox-Tech.com>
Sat, 6 Sep 2025 08:12:07 +0000 (03:12 -0500)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 18 Sep 2025 10:09:05 +0000 (12:09 +0200)
commit75faf2bc907584acc879accae60a59bd655b6b6a
tree13eed5a5aa56a194cf7c5eb45dc046063fb39de8
parent128ac4dadbd633a7c66a4983c94f4f7f379dfc89
xfs_scrub: Use POSIX-conformant strerror_r

When building xfsprogs with musl libc, strerror_r returns int as
specified in POSIX.  This differs from the glibc extension that returns
char*.  Successful calls will return 0, which will be dereferenced as a
NULL pointer by (v)fprintf.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
scrub/common.c