From 047473e5a4aadcee20aa260e7652046327179828 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sun, 28 Oct 2018 04:02:56 -0300 Subject: [PATCH] add missing include for strncpy, fixes musl I/usr/include/libdbusmenu-glib-0.4 -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -std=c++17 -DHAVE_SWAY -DHAVE_LIBPULSE -DHAVE_DBUSMENU -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -D_REENTRANT -pthread -MD -MQ 'waybar@exe/src_modules_sway_ipc_client.cpp.o' -MF 'waybar@exe/src_modules_sway_ipc_client.cpp.o.d' -o 'waybar@exe/src_modules_sway_ipc_client.cpp.o' -c ../src/modules/sway/ipc/client.cpp ../src/modules/sway/ipc/client.cpp: In member function 'int waybar::modules::sway::Ipc::open(const string&) const': ../src/modules/sway/ipc/client.cpp:47:3: error: 'strncpy' was not declared in this scope strncpy(addr.sun_path, socketPath.c_str(), sizeof(addr.sun_path) - 1); ^~~~~~~ ../src/modules/sway/ipc/client.cpp:47:3: note: 'strncpy' is defined in header ''; did you forget to '#include '? ../src/modules/sway/ipc/client.cpp:2:1: +#include ../src/modules/sway/ipc/client.cpp:47:3: strncpy(addr.sun_path, socketPath.c_str(), sizeof(addr.sun_path) - 1); ^~~~~~~ [36/44] Compiling C++ object 'waybar@exe/src_modules_custom.cpp.o'. [37/44] Compiling C++ object 'waybar@exe/src_client.cpp.o'. [38/44] Compiling C++ object 'waybar@exe/src_modules_cpu.cpp.o'. ninja: build stopped: subcommand failed. --- include/modules/sway/ipc/client.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/modules/sway/ipc/client.hpp b/include/modules/sway/ipc/client.hpp index 268ab01f..a621a927 100644 --- a/include/modules/sway/ipc/client.hpp +++ b/include/modules/sway/ipc/client.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include