--- a/nscd.c
+++ b/nscd.c
@@ -99,6 +99,8 @@
 /* For inet_ntoa (for debug build only) */
 #include <arpa/inet.h>
 
+/* Use systemd socket activation code */
+#include <systemd/sd-daemon.h>
 /*
  * 0.21 add SEGV reporting to worker
  * 0.22 don't do freeaddrinfo() in GETAI worker, it's crashy
@@ -2647,7 +2649,7 @@
 	}
 
 	for (n = 0; n < 3; n++) {
-		log(L_DEBUG, "%s cache enabled:%u pttl:%ul nttl:%ul",
+		log(L_DEBUG, "%s cache enabled:%u pttl:%u nttl:%u",
 				srv_name[n],
 				config.srv_enable[n],
 				config.pttl[n],
