Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Bug 678332-GIO: Fix build on Windows/non-GCC
Browse files Browse the repository at this point in the history
-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.
  • Loading branch information
fanc999-1 committed Jun 19, 2012
1 parent 08a6f8d commit 8758544
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gio/gconverterinputstream.c
Expand Up @@ -415,7 +415,7 @@ read_internal (GInputStream *stream,
buffer_read (&priv->converted_buffer, buffer, available);

total_bytes_read = available;
buffer += available;
(char *) buffer += available;
count -= available;

/* If there is no data to convert, and no pre-converted data,
Expand Down
4 changes: 3 additions & 1 deletion gio/gtestdbus.c
Expand Up @@ -26,7 +26,9 @@

#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <glib.h>

Expand Down Expand Up @@ -560,7 +562,7 @@ start_daemon (GTestDBus *self)
g_spawn_command_line_async (command, NULL);
g_free (command);

usleep (500 * 1000);
g_usleep (500 * 1000);
}

/* Cleanup */
Expand Down

0 comments on commit 8758544

Please sign in to comment.