mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Bug 678332-GIO: Fix build on Windows/non-GCC
-gconverterinputstream.c: Avoid GCCism by not using non-standard pointer arithmetic on void*, but do a cast to char * as that seems to be what the variable was used for. -gtestdbus.c: Don't include unistd.h unconditionally, and use g_usleep() instead of usleep(), as usleep() is not universally available.
This commit is contained in:
@@ -415,7 +415,7 @@ read_internal (GInputStream *stream,
|
|||||||
buffer_read (&priv->converted_buffer, buffer, available);
|
buffer_read (&priv->converted_buffer, buffer, available);
|
||||||
|
|
||||||
total_bytes_read = available;
|
total_bytes_read = available;
|
||||||
buffer += available;
|
(char *) buffer += available;
|
||||||
count -= available;
|
count -= available;
|
||||||
|
|
||||||
/* If there is no data to convert, and no pre-converted data,
|
/* If there is no data to convert, and no pre-converted data,
|
||||||
|
@@ -26,7 +26,9 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@@ -560,7 +562,7 @@ start_daemon (GTestDBus *self)
|
|||||||
g_spawn_command_line_async (command, NULL);
|
g_spawn_command_line_async (command, NULL);
|
||||||
g_free (command);
|
g_free (command);
|
||||||
|
|
||||||
usleep (500 * 1000);
|
g_usleep (500 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cleanup */
|
/* Cleanup */
|
||||||
|
Reference in New Issue
Block a user