diff --git a/COPYING b/COPYING
old mode 100644
new mode 100755
diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
old mode 100644
new mode 100755
index 66ac265..b36d2aa
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -9,8 +9,14 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-static")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Werror -O2")
+find_package(Threads REQUIRED)
+
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -Wall -Werror -O2")
set(EXECUTABLE_OUTPUT_PATH ../bin)
add_executable(broom ../src/main.cpp ../src/entry.cpp ../src/broom.cpp ../src/group.hpp)
+target_link_libraries(broom Threads::Threads)
diff --git a/src/broom.cpp b/src/broom.cpp
old mode 100644
new mode 100755
index 7c21157..3adfc37
--- a/src/broom.cpp
+++ b/src/broom.cpp
@@ -23,6 +23,7 @@ along with broom. If not, see .
#include