aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/socket.c2
-rw-r--r--libsylph/utils.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/libsylph/socket.c b/libsylph/socket.c
index 431d95f1..5e6df275 100644
--- a/libsylph/socket.c
+++ b/libsylph/socket.c
@@ -1325,7 +1325,7 @@ static gint sock_get_address_info_async_cancel(SockLookupData *lookup_data)
}
#else /* G_OS_UNIX */
-gpointer sock_connect_async_func(gpointer data)
+static gpointer sock_connect_async_func(gpointer data)
{
SockConnectData *conn_data = (SockConnectData *)data;
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 0139302e..2898ef76 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -3862,10 +3862,11 @@ gint execute_command_line(const gchar *cmdline, gboolean async)
return ret;
}
+#if USE_THREADS
typedef struct _CmdData
{
const gchar *cmdline;
- gint flag;
+ volatile gint flag;
gint status;
} CmdData;
@@ -3888,7 +3889,7 @@ static gpointer execute_command_line_async_func(gpointer data)
gint execute_command_line_async_wait(const gchar *cmdline)
{
- volatile CmdData data = {NULL, 0, 0};
+ CmdData data = {NULL, 0, 0};
GThread *thread;
if (debug_mode) {
@@ -3917,6 +3918,12 @@ gint execute_command_line_async_wait(const gchar *cmdline)
return data.status;
}
+#else /* USE_THREADS */
+gint execute_command_line_async_wait(const gchar *cmdline)
+{
+ return execute_command_line(cmdline, FALSE);
+}
+#endif /* USE_THREADS */
gint execute_open_file(const gchar *file, const gchar *content_type)
{