diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-06 17:07:42 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-07 00:45:56 -0500 |
commit | 1d98d9a62c16c8282d02942d80e025ceec962c9b (patch) | |
tree | dd52b137bca15fa23bd49a8dbd4e5ae8806e42e6 /man/sd_journal_get_fd.xml | |
parent | 11dac832c75cbdd0015fb0417b9877396ea57f6f (diff) |
man: fix compilation of example
Diffstat (limited to 'man/sd_journal_get_fd.xml')
-rw-r--r-- | man/sd_journal_get_fd.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml index 189d21352b..3fc9c5f5b5 100644 --- a/man/sd_journal_get_fd.xml +++ b/man/sd_journal_get_fd.xml @@ -212,7 +212,7 @@ int main(int argc, char *argv[]) { return 1; } for (;;) { - const char *d; + const void *d; size_t l; r = sd_journal_next(j); if (r < 0) { @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Failed to read message field: %s\n", strerror(-r)); continue; } - printf("%.*s\n", (int) l, d); + printf("%.*s\n", (int) l, (const char*) d); } sd_journal_close(j); return 0; @@ -248,9 +248,9 @@ int main(int argc, char *argv[]) { int wait_for_changes(sd_journal *j) { struct pollfd pollfd; - pollfd.fd = sd_journal_get_fd(); + pollfd.fd = sd_journal_get_fd(j); pollfd.events = POLLIN; - poll(&pollfd, 1, sd_journal_reliable_fd() > 0 ? -1 : 2000); + poll(&pollfd, 1, sd_journal_reliable_fd(j) > 0 ? -1 : 2000); return sd_journal_process(j); } </programlisting> |