[Bug 74313] New: [patch] Fix build on Hurd without PATH_MAX
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Feb 1 03:02:24 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=74313
Priority: medium
Bug ID: 74313
Assignee: spice-bugs at lists.freedesktop.org
Summary: [patch] Fix build on Hurd without PATH_MAX
Severity: normal
Classification: Unclassified
OS: other
Reporter: pere at hungry.com
Hardware: x86 (IA32)
Status: NEW
Version: unspecified
Component: server
Product: Spice
The following patch fixes the server build on Hurd, where PATH_MAX is not
available. With the fix, all the server part of spice builds on Hurd.
I'm also looking at the client part, but it require thread features I do not
yet know on Hurd.
--- spice-0.12.4.orig/server/tests/test_display_base.c
+++ spice-0.12.4/server/tests/test_display_base.c
@@ -87,12 +87,13 @@ static void regression_test(void)
pid = fork();
if (pid == 0) {
- char buf[PATH_MAX];
+ char *buf = malloc(strlen(getenv("PATH"))+6);
char *argp[] = {NULL};
char *envp[] = {buf, NULL};
snprintf(buf, sizeof(buf), "PATH=%s", getenv("PATH"));
execve("regression_test.py", argp, envp);
+ free(buf); /* In case the exec fail */
} else if (pid > 0) {
return;
}
--
Happy hacking
Petter Reinholdtsen
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-bugs/attachments/20140201/32d66ff0/attachment.html>
More information about the spice-bugs
mailing list