From ede8813046a2979d2255385d6f03371215951283 Mon Sep 17 00:00:00 2001 From: Mike Lowis Date: Mon, 10 Oct 2016 08:41:27 -0400 Subject: [PATCH] fix getmillis on linux --- Makefile | 2 +- mouse.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 14e70f1..e3be92e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ LDFLAGS = -L/opt/X11/lib -lX11 -lXft -CFLAGS = --std=c99 -Wall -Wextra -I. -I/opt/X11/include -I/opt/local/include/freetype2 -I/usr/include/freetype2 +CFLAGS = --std=gnu99 -Wall -Wextra -I. -I/opt/X11/include -I/opt/local/include/freetype2 -I/usr/include/freetype2 OBJS = buf.o screen.o utf8.o keyboard.o mouse.o charset.o TESTOBJS = tests/tests.o tests/buf.o tests/utf8.o diff --git a/mouse.c b/mouse.c index e97a2e1..c848f6f 100644 --- a/mouse.c +++ b/mouse.c @@ -1,9 +1,10 @@ #include "edit.h" -#ifndef __MACH__ +#define _GNU_SOURCE #include -#else #include + +#ifdef __MACH__ #define CLOCK_MONOTONIC 0 // clock_gettime is not implemented on OSX int clock_gettime(int id, struct timespec* t) { -- 2.49.0