aboutsummaryrefslogtreecommitdiffstats
path: root/testing/polybar/fix-wstringop-truncation.patch
diff options
context:
space:
mode:
authorMike Sullivan <mksully22@gmail.com>2019-03-21 14:13:53 +0000
committerprspkt <prspkt@protonmail.com>2019-03-21 18:22:27 +0200
commit52d89da440aae5dd1dacc6fb87a068d4d0e00138 (patch)
treeba254e757120e7e071811153648e3f44977f49f1 /testing/polybar/fix-wstringop-truncation.patch
parent3d81103b909d72982eeb1cffe19cdbf32c2c4063 (diff)
downloadaports-52d89da440aae5dd1dacc6fb87a068d4d0e00138.tar.bz2
aports-52d89da440aae5dd1dacc6fb87a068d4d0e00138.tar.xz
testing/polybar: fix -Wstringop-truncation
This would otherwise fail building on ppc64le
Diffstat (limited to 'testing/polybar/fix-wstringop-truncation.patch')
-rw-r--r--testing/polybar/fix-wstringop-truncation.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/polybar/fix-wstringop-truncation.patch b/testing/polybar/fix-wstringop-truncation.patch
new file mode 100644
index 0000000000..cdf1eac808
--- /dev/null
+++ b/testing/polybar/fix-wstringop-truncation.patch
@@ -0,0 +1,11 @@
+--- a/lib/i3ipcpp/src/ipc-util.cpp
++++ b/lib/i3ipcpp/src/ipc-util.cpp
+@@ -34,7 +34,7 @@
+ data = new uint8_t[size];
+ header = (header_t*)data;
+ payload = (char*)(data + sizeof(header_t));
+- strncpy(header->magic, g_i3_ipc_magic.c_str(), sizeof(header->magic));
++ memcpy(header->magic, g_i3_ipc_magic.c_str(), sizeof(header->magic));
+ header->size = payload_size;
+ header->type = 0x0;
+ }