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
#include "edit.h"
-#ifndef __MACH__
+#define _GNU_SOURCE
#include <time.h>
-#else
#include <sys/time.h>
+
+#ifdef __MACH__
#define CLOCK_MONOTONIC 0
// clock_gettime is not implemented on OSX
int clock_gettime(int id, struct timespec* t) {