context BUGFIX add missing includes
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5fc715..f218e21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@
     set(CMAKE_BUILD_TYPE debug)
 endif()
 
-set(CMAKE_C_FLAGS         "${CMAKE_C_FLAGS} -Wall -Wextra")
+set(CMAKE_C_FLAGS         "${CMAKE_C_FLAGS} -Wall -Wextra -std=c89")
 set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
 set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG   "-g -O0")
diff --git a/src/context.c b/src/context.c
index 31f6e3e..2fe6148 100644
--- a/src/context.c
+++ b/src/context.c
@@ -12,7 +12,12 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _DEFAULT_SOURCE
+#define _BSD_SOURCE
 #include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 #include "context.h"