diff --git a/CMakeLists.txt b/CMakeLists.txt
index efc6ba0..8f363ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101,7 +101,7 @@ file(GLOB PROJECT_SOURCES *.c)
 
 set(PROJECT_DEFINITIONS "_GNU_SOURCE")
 
-set(PROJECT_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -Wno-language-extension-token")
+set(PROJECT_FLAGS "-std=gnu99 -pedantic -Wextra")
 if(APPLE)
   set(PROJECT_FLAGS "${PROJECT_FLAGS} -Wno-deprecated-declarations")
 endif()
diff --git a/lpass.c b/lpass.c
index c50ffb8..7416942 100644
--- a/lpass.c
+++ b/lpass.c
@@ -46,7 +46,7 @@
 #include <getopt.h>
 #include <unistd.h>
 
-#if (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__linux__)
 #include <libgen.h>
 #endif
 
