This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 343
Build fails from AUR "wlroots-git" #2273
Comments
Hi @emersion @any1 it looks like commit:
However it's only happening when building straight for AUR. If I try the same build parameters as the See #2133 |
Does this patch fix the issue? diff --git a/examples/screencopy-dmabuf.c b/examples/screencopy-dmabuf.c
index ea6b9f50a73f..ebc6ea759bae 100644
--- a/examples/screencopy-dmabuf.c
+++ b/examples/screencopy-dmabuf.c
@@ -87,7 +87,7 @@ static bool find_render_node(char *node, size_t maxlen) {
continue;
}
- strncpy(node, dev->nodes[DRM_NODE_RENDER], maxlen);
+ strncpy(node, dev->nodes[DRM_NODE_RENDER], maxlen - 1);
node[maxlen - 1] = '\0';
r = true;
break; |
Yeah, that warning is rather annoying, and quite pointless in this case. Would people be opposed to adding |
We can't use |
Many projects include an implementation of |
Meh. Looks like gcc covers our ass anyway. |
@emersion your patch fixes the issue. Thanks. |
emersion
added a commit
to emersion/wlroots
that referenced
this issue
Jun 11, 2020
The original code wasn't wrong since we were manually writing a null byte anyway, but this makes GCC happy. Closes: swaywm#2273
ddevault
pushed a commit
that referenced
this issue
Jun 11, 2020
The original code wasn't wrong since we were manually writing a null byte anyway, but this makes GCC happy. Closes: #2273
Great, thanks! :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When trying to install "wlroots-git" from AUR, the build fails with:
The text was updated successfully, but these errors were encountered: