diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 0d57a3f..42a1584 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,6 @@
 project(tests C)
 
-set(TESTSUITE_LIBRARIES ${NWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY})
+set(TESTSUITE_LIBRARIES ${NWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY} cmocka)
 string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
 
 add_library(nss_nwrap SHARED nss_nwrap.c)
diff --git a/tests/test_getaddrinfo.c b/tests/test_getaddrinfo.c
index 6de0323..0714e46 100644
--- a/tests/test_getaddrinfo.c
+++ b/tests/test_getaddrinfo.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <errno.h>
diff --git a/tests/test_gethostby_name_addr.c b/tests/test_gethostby_name_addr.c
index e8939f6..3ca0b68 100644
--- a/tests/test_gethostby_name_addr.c
+++ b/tests/test_gethostby_name_addr.c
@@ -5,6 +5,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <errno.h>
diff --git a/tests/test_gethostent.c b/tests/test_gethostent.c
index aa61696..ea837ec 100644
--- a/tests/test_gethostent.c
+++ b/tests/test_gethostent.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <stdio.h>
diff --git a/tests/test_getnameinfo.c b/tests/test_getnameinfo.c
index bfafa98..504798a 100644
--- a/tests/test_getnameinfo.c
+++ b/tests/test_getnameinfo.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <stdio.h>
diff --git a/tests/test_getpwuid_module.c b/tests/test_getpwuid_module.c
index a06a49d..32acad5 100644
--- a/tests/test_getpwuid_module.c
+++ b/tests/test_getpwuid_module.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 #include <unistd.h>
 
diff --git a/tests/test_nwrap_disabled.c b/tests/test_nwrap_disabled.c
index f00294b..3ef729a 100644
--- a/tests/test_nwrap_disabled.c
+++ b/tests/test_nwrap_disabled.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <sys/types.h>
diff --git a/tests/test_nwrap_vector.c b/tests/test_nwrap_vector.c
index 26baf01..cea2bfa 100644
--- a/tests/test_nwrap_vector.c
+++ b/tests/test_nwrap_vector.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include "../src/nss_wrapper.c"
diff --git a/tests/test_shadow.c b/tests/test_shadow.c
index 7af120b..c6768ff 100644
--- a/tests/test_shadow.c
+++ b/tests/test_shadow.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <shadow.h>
diff --git a/tests/testsuite.c b/tests/testsuite.c
index bf678fd..c69685c 100644
--- a/tests/testsuite.c
+++ b/tests/testsuite.c
@@ -3,6 +3,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <stdint.h>
 #include <cmocka.h>
 
 #include <errno.h>
