<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [patch] Fix build on Hurd without PATH_MAX"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74313">74313</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>spice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>[patch] Fix build on Hurd without PATH_MAX
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>other
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pere@hungry.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86 (IA32)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>server
</td>
</tr>
<tr>
<th>Product</th>
<td>Spice
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>