diff --git a/SConstruct b/SConstruct
index 4cf48a3a5eeaf91ae6ded46762f5cf7b8e48d595..98a2e22b2b02a23b43ec49a806a75855046ce045 100644
--- a/SConstruct
+++ b/SConstruct
@@ -45,7 +45,7 @@ env['backendsincpath'] = calcInstallPath("$prefix", "include", "hammer", "backen
 env['pkgconfigpath'] = calcInstallPath("$prefix", "lib", "pkgconfig")
 env.ScanReplace('libhammer.pc.in')
 
-env.MergeFlags("-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable")
+env.MergeFlags("-std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable")
 
 if env['PLATFORM'] == 'darwin':
     env.Append(SHLINKFLAGS = '-install_name ' + env["libpath"] + '/${TARGET.file}')
diff --git a/src/benchmark.c b/src/benchmark.c
index 408bfdb22716a31afb16a2dc75c72cf0fa34da7d..585b9a5a6034c99c685c52cc11f86468544ffa80 100644
--- a/src/benchmark.c
+++ b/src/benchmark.c
@@ -1,3 +1,4 @@
+#define _POSIX_C_SOURCE 200809L
 #include <stdint.h>
 #include <stdio.h>
 #include <time.h>
diff --git a/src/registry.c b/src/registry.c
index 60aa8863e53b5c4c32175adb430fc87df069e901..97d22ab62c23ccacb6e21fe5f9d436e769a53e71 100644
--- a/src/registry.c
+++ b/src/registry.c
@@ -15,6 +15,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
+#define _POSIX_C_SOURCE 200809L
 #include <search.h>
 #include <stdlib.h>
 #include "hammer.h"