File fixppc.patch of Package systemd

From 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 21 Mar 2012 23:47:44 +0100
Subject: [PATCH] journal: PAGE_SIZE is not known on ppc and other archs

Let's use NAME_MAX, as suggested by Dan Walsh
---
 src/journal/journald.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/journal/journald.c b/src/journal/journald.c
index d27cb60..87390bd 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -29,7 +29,6 @@
 #include <sys/ioctl.h>
 #include <linux/sockios.h>
 #include <sys/statvfs.h>
-#include <sys/user.h>
 
 #include <systemd/sd-journal.h>
 #include <systemd/sd-login.h>
@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) {
                         size_t label_len = 0;
                         union {
                                 struct cmsghdr cmsghdr;
+
+                                /* We use NAME_MAX space for the
+                                 * SELinux label here. The kernel
+                                 * currently enforces no limit, but
+                                 * according to suggestions from the
+                                 * SELinux people this will change and
+                                 * it will probably be identical to
+                                 * NAME_MAX. For now we use that, but
+                                 * this should be updated one day when
+                                 * the final limit is known.*/
                                 uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
                                             CMSG_SPACE(sizeof(struct timeval)) +
-                                            CMSG_SPACE(sizeof(int)) +
-                                            CMSG_SPACE(PAGE_SIZE)]; /* selinux label */
+                                            CMSG_SPACE(sizeof(int)) + /* fd */
+                                            CMSG_SPACE(NAME_MAX)]; /* selinux label */
                         } control;
                         ssize_t n;
                         int v;
-- 
1.7.7

From dd1e3d5a396284d1afdb2828991a543eb80c8040 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 22 Mar 2012 09:39:54 +0100
Subject: [PATCH] journal: char is unsigned on ppc, use int8_t instead.

---
 src/journal/cat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/journal/cat.c b/src/journal/cat.c
index 31d76f3..8a51fb7 100644
--- a/src/journal/cat.c
+++ b/src/journal/cat.c
@@ -33,7 +33,7 @@
 #include "build.h"
 
 static char *arg_identifier = NULL;
-static char arg_priority = LOG_INFO;
+static int8_t arg_priority = LOG_INFO;
 static bool arg_level_prefix = true;
 
 static int help(void) {
-- 
1.7.7

openSUSE Build Service is sponsored by