chiark / gitweb /
man: fix compilation of example
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 6 Mar 2013 22:07:42 +0000 (17:07 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 Mar 2013 05:45:56 +0000 (00:45 -0500)
man/sd_journal_get_fd.xml
sysctl.d/coredump.conf.in

index 189d21352bd81a99d94af59496c65b2d0a4d1d57..3fc9c5f5b5cde594cd21d81465a49bfe07592b5a 100644 (file)
@@ -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 &lt; 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(&amp;pollfd, 1, sd_journal_reliable_fd() &gt; 0 ? -1 : 2000);
+        poll(&amp;pollfd, 1, sd_journal_reliable_fd(j) &gt; 0 ? -1 : 2000);
         return sd_journal_process(j);
 }
                 </programlisting>
index 5c791b791b386fe165766b5863b08983dd549485..d5795a37d51ce128bed35dfa37106e65787fd189 100644 (file)
@@ -5,6 +5,6 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 
-# See sysctl.d(5) for details
+# See sysctl.d(5) and core(5) for for details.
 
 kernel.core_pattern=|@rootlibexecdir@/systemd-coredump %p %u %g %s %t %e