mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-01-08 21:36:55 +00:00
mingw: Fix compilation breakage because of memmem use
mingw does not provide memmem. Since the qmp data is JSON, it won't contain embedded nul characters, we can use strstr instead of memmem. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Marc-André Lureau <marcandre.lureau@gmail.com>
This commit is contained in:
parent
a2ffc3e9ba
commit
d1e9df19f5
@ -160,7 +160,7 @@ spice_qmp_handle_port_data(SpiceQmpPort *self, gpointer data,
|
||||
}
|
||||
|
||||
str = qmp->str;
|
||||
while ((crlf = memmem(str, qmp->len - (str - qmp->str), "\r\n", 2))) {
|
||||
while ((crlf = strstr(str, "\r\n")) != NULL) {
|
||||
GError *err = NULL;
|
||||
|
||||
*crlf = '\0';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user