diff --git a/src/core/utils.c b/src/core/utils.c
index b430d13..75aaaec 100644
--- a/src/core/utils.c
+++ b/src/core/utils.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <string.h> /*for SIGTERM */
#include <math.h>
+#include <ctype.h>
#include <fontconfig/fontconfig.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
@@ -34,6 +35,8 @@
#ifdef _MACH_O_
#include <mach-o/dyld.h>
#endif
+void gtk_widget_set_tooltip_text (GtkWidget *widget, const gchar *text) { }
+void gtk_widget_set_tooltip_markup (GtkWidget *widget, const gchar *text) { }
/**
* This checks to see if there's a .denemo/ directory in the user's
@@ -2683,7 +2686,13 @@ get_executable_dir ()
_NSGetExecutablePath (path, &size);
#else
- readlink("/proc/self/exe", path, sizeof(path));
+ int n;
+ if ((n = readlink("/proc/self/exe", path, sizeof(path))) < 0)
+ {
+ perror("/proc/self/exe");
+ exit (1);
+ }
+ path[n] = 0;
#endif
dir = g_path_get_dirname(path);