man: fix compilation of journal-iterate-poll.c
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 21 Mar 2018 15:35:02 +0000 (16:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 24 Mar 2018 13:15:48 +0000 (14:15 +0100)
Our examples should compile...

man/journal-iterate-poll.c

index 174f603..100d07e 100644 (file)
@@ -1,11 +1,13 @@
 #include <poll.h>
+#include <time.h>
 #include <systemd/sd-journal.h>
 
 int wait_for_changes(sd_journal *j) {
-  struct pollfd pollfd;
+  uint64_t t;
   int msec;
+  struct pollfd pollfd;
 
-  sd_journal_get_timeout(m, &t);
+  sd_journal_get_timeout(j, &t);
   if (t == (uint64_t) -1)
     msec = -1;
   else {