From 7618e4bab9539280aaa90c8c08002a1028a72a43 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Sat, 7 Oct 2023 10:07:45 +0800 Subject: [PATCH] Fix MacOS compile error --- remote_desk_client/remote_desk_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote_desk_client/remote_desk_client.cpp b/remote_desk_client/remote_desk_client.cpp index 2cf966a..6eb6285 100644 --- a/remote_desk_client/remote_desk_client.cpp +++ b/remote_desk_client/remote_desk_client.cpp @@ -231,7 +231,7 @@ std::string GetMac(char *mac_addr) { (const struct sockaddr_dl *)cursor->ifa_addr; if ((cursor->ifa_addr->sa_family == AF_LINK) && (socAddr->sdl_type == IFT_ETHER) && - strcmp(if_name, cursor->ifa_name) == 0) { + strcmp(if_name.c_str(), cursor->ifa_name) == 0) { dlAddr = (const struct sockaddr_dl *)cursor->ifa_addr; const unsigned char *base = (const unsigned char *)&dlAddr->sdl_data[dlAddr->sdl_nlen];