diff --git a/vhook/drawtext.c b/vhook/drawtext.c
index df871987576b968cf5c7d642030eefc44b31bd50..432541342b3a016a325dbd4e959ce516a46beb4e 100644
--- a/vhook/drawtext.c
+++ b/vhook/drawtext.c
@@ -43,17 +43,18 @@
 
 #define MAXSIZE_TEXT 1024
 
+#include "framehook.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <stdarg.h>
 #include <string.h>
 #include <unistd.h>
+#undef time
 #include <sys/time.h>
 #include <time.h>
 
-#include "framehook.h"
-
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
diff --git a/vhook/imlib2.c b/vhook/imlib2.c
index d569c808d67e5f7b0bbd366aa607f7d6bb125a2c..4e890e14e752041c9c661de8bbe4be14bfc312ca 100644
--- a/vhook/imlib2.c
+++ b/vhook/imlib2.c
@@ -42,18 +42,21 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+#include "framehook.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <stdarg.h>
 #include <string.h>
 #include <unistd.h>
+#undef time
 #include <sys/time.h>
+#include <time.h>
 #include <X11/Xlib.h>
 #include <Imlib2.h>                                                             
 
-#include "framehook.h"
-
 typedef struct {
     int dummy;
     Imlib_Font fn;