aports/testing/hyprland/strncpy-include-cstring.patch
2024-08-11 22:34:07 +00:00

57 lines
1.5 KiB
Diff

commit 2c93331ca20469582c57c8bcf834e2b0022cb598
Author: Zach DeCook <zachdecook@librem.one>
Date: Fri Aug 9 08:53:44 2024 -0400
Include cstring whenever strncpy is used
Fixes ppc64le build in alpine
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp
index c86406fc..5d5113b8 100644
--- a/hyprctl/main.cpp
+++ b/hyprctl/main.cpp
@@ -26,6 +26,7 @@
#include <regex>
#include <sys/socket.h>
#include <hyprutils/string/String.hpp>
+#include <cstring>
using namespace Hyprutils::String;
#include "Strings.hpp"
diff --git a/src/helpers/SdDaemon.cpp b/src/helpers/SdDaemon.cpp
index 25e0ca3b..48c23e6b 100644
--- a/src/helpers/SdDaemon.cpp
+++ b/src/helpers/SdDaemon.cpp
@@ -8,6 +8,7 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <string.h>
+#include <cstring>
namespace Systemd {
int SdBooted(void) {
diff --git a/src/managers/EventManager.cpp b/src/managers/EventManager.cpp
index 75c98e2a..079a6b68 100644
--- a/src/managers/EventManager.cpp
+++ b/src/managers/EventManager.cpp
@@ -8,6 +8,7 @@
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
+#include <cstring>
CEventManager::CEventManager() {
m_iSocketFD = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
diff --git a/src/xwayland/Server.cpp b/src/xwayland/Server.cpp
index cec582f6..200bec70 100644
--- a/src/xwayland/Server.cpp
+++ b/src/xwayland/Server.cpp
@@ -19,6 +19,7 @@
#include <sys/un.h>
#include <unistd.h>
#include <filesystem>
+#include <cstring>
// TODO: cleanup
static bool set_cloexec(int fd, bool cloexec) {