From 466b5cb08d5385f54dda07b4eead668b39685a83 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 15 Oct 2021 09:40:27 +0200 Subject: [PATCH] neighbor/smbclient: FmtError() instead of FormatErrno() Fixes part 2 of https://github.com/MusicPlayerDaemon/MPD/issues/1279 --- src/neighbor/plugins/SmbclientNeighborPlugin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx index 97e40e941..144059f50 100644 --- a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx +++ b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx @@ -33,6 +33,8 @@ #include +#include +#include #include class SmbclientNeighborExplorer final : public NeighborExplorer { @@ -165,8 +167,8 @@ ReadServers(SmbclientContext &ctx, const char *uri, ReadServers(ctx, handle, list); ctx.CloseDirectory(handle); } else - FormatErrno(smbclient_domain, "smbc_opendir('%s') failed", - uri); + FmtError(smbclient_domain, "smbc_opendir('{}') failed: {}", + uri, strerror(errno)); } [[gnu::pure]]