summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <alan@eth0.org.uk>2012-06-21 14:50:40 +0100
committerGravatar Alan Fitton <alan@eth0.org.uk>2012-06-21 14:50:40 +0100
commit0ec76e53cdb0b15da1dd14bb1c53134dc1f3a55b (patch)
treefc26cf0d4eaaf70d5c89988634c809869d208b67 /src/util.c
parentccd86becdc2c9311e4faac65aff76f7aa0e68a78 (diff)
some changes and hacks to get GeoIP on Windows
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 3309fb1..6aa1d43 100644
--- a/src/util.c
+++ b/src/util.c
@@ -19,6 +19,10 @@
/* Many of these functions are taken from the Transmission Project. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <limits.h>
#include <stdlib.h>
#include <math.h>
@@ -608,3 +612,13 @@ GtkWidget *trg_vbox_new(gboolean homogeneous, gint spacing)
#endif
return box;
}
+
+#ifdef WIN32
+gchar *trg_win32_support_path(gchar *file) {
+ gchar *moddir =
+ g_win32_get_package_installation_directory_of_module(NULL);
+ gchar *path = g_build_filename(moddir, file, NULL);
+ g_free(moddir);
+ return path;
+}
+#endif \ No newline at end of file