Re: systemd-189: missing headers?

Allin Cottrell <[email protected]>
Newsgroups gmane.linux.hotplug.devel
Message-ID <[email protected]>
On Thu, 23 Aug 2012, Kay Sievers wrote:

> On Thu, Aug 23, 2012 at 5:35 PM, Allin Cottrell <[email protected]> wrote:
>> The systemd-189 release doesn't compile out of the box on my system (gcc
>> 4.7.1, glibc-2.16.0, Linux 3.5.2). It seems that some required headers are
>> not being included in several source files under src/journal/. Specifically,
>>
>> * journald-kmsg.c, journald-console.c and journald-gperf.c all need
>> <sys/socket.h> for struct ucred.
>>
>> * journald-syslog.c, journald-stream.c and journald-native.c
>> all need <stddef.h> for offsetof().
>
> Mind just sending a patch that makes it work for you?

No problem; patch now attached.

--
Allin Cottrell
Department of Economics
Wake Forest University, NC
systemd-189-headers.patch (text/plain, 2.4 KB)
diff -ur a/systemd-189/src/journal/journald-console.c b/systemd-189/src/journal/journald-console.c
--- a/systemd-189/src/journal/journald-console.c	2012-08-21 21:35:30.037234329 -0400
+++ b/systemd-189/src/journal/journald-console.c	2012-08-23 12:12:42.098121723 -0400
@@ -21,6 +21,7 @@
 
 #include <fcntl.h>
 #include <unistd.h>
+#include <sys/socket.h>
 
 #include "journald.h"
 #include "journald-console.h"
diff -ur a/systemd-189/src/journal/journald-gperf.gperf b/systemd-189/src/journal/journald-gperf.gperf
--- a/systemd-189/src/journal/journald-gperf.gperf	2012-08-20 13:22:51.793235967 -0400
+++ b/systemd-189/src/journal/journald-gperf.gperf	2012-08-23 12:12:42.098121723 -0400
@@ -1,5 +1,6 @@
 %{
 #include <stddef.h>
+#include <sys/socket.h>
 #include "conf-parser.h"
 #include "journald.h"
 %}
diff -ur a/systemd-189/src/journal/journald-kmsg.c b/systemd-189/src/journal/journald-kmsg.c
--- a/systemd-189/src/journal/journald-kmsg.c	2012-08-21 21:28:48.703214905 -0400
+++ b/systemd-189/src/journal/journald-kmsg.c	2012-08-23 12:12:42.098121723 -0400
@@ -23,6 +23,7 @@
 #include <sys/epoll.h>
 #include <fcntl.h>
 #include <sys/mman.h>
+#include <sys/socket.h>
 
 #include <systemd/sd-messages.h>
 #include <libudev.h>
diff -ur a/systemd-189/src/journal/journald-native.c b/systemd-189/src/journal/journald-native.c
--- a/systemd-189/src/journal/journald-native.c	2012-08-21 21:41:47.571252600 -0400
+++ b/systemd-189/src/journal/journald-native.c	2012-08-23 12:12:42.098121723 -0400
@@ -20,6 +20,7 @@
 ***/
 
 #include <unistd.h>
+#include <stddef.h>
 #include <sys/epoll.h>
 
 #include "socket-util.h"
diff -ur a/systemd-189/src/journal/journald-stream.c b/systemd-189/src/journal/journald-stream.c
--- a/systemd-189/src/journal/journald-stream.c	2012-08-21 21:38:28.815242981 -0400
+++ b/systemd-189/src/journal/journald-stream.c	2012-08-23 12:12:42.098121723 -0400
@@ -21,6 +21,7 @@
 
 #include <fcntl.h>
 #include <unistd.h>
+#include <stddef.h>
 #include <sys/epoll.h>
 
 #ifdef HAVE_SELINUX
diff -ur a/systemd-189/src/journal/journald-syslog.c b/systemd-189/src/journal/journald-syslog.c
--- a/systemd-189/src/journal/journald-syslog.c	2012-08-21 21:35:55.155235545 -0400
+++ b/systemd-189/src/journal/journald-syslog.c	2012-08-23 12:12:42.098121723 -0400
@@ -20,6 +20,7 @@
 ***/
 
 #include <unistd.h>
+#include <stddef.h>
 #include <sys/epoll.h>
 
 #include "socket-util.h"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.