.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=780
This commit is contained in:
parent
5769d41f4c
commit
96085907eb
129
0001-sizeof-bool-used-by-gcc-depends-on-arch.patch
Normal file
129
0001-sizeof-bool-used-by-gcc-depends-on-arch.patch
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
This patch includes changes of the upstream commits
|
||||||
|
6017365a1d0c1c78fc34a7da63768ee5df5da511 and
|
||||||
|
4f4b92ba7ae9c56cb0f181d5f95d709e085b8bd5 as well as the fix for the size
|
||||||
|
of the gcc builtin type bool also known as _Bool from the include header
|
||||||
|
stdbool.h.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/libsystemd/sd-bus/bus-message.c | 19 +++++++++++++++----
|
||||||
|
src/libsystemd/sd-bus/bus-protocol.h | 1 +
|
||||||
|
src/shared/architecture.h | 22 ++++++++++++++++------
|
||||||
|
3 files changed, 32 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
--- src/libsystemd/sd-bus/bus-message.c
|
||||||
|
+++ src/libsystemd/sd-bus/bus-message.c 2014-09-17 15:55:49.830236907 +0000
|
||||||
|
@@ -2259,14 +2259,25 @@ int bus_message_append_ap(
|
||||||
|
r = sd_bus_message_append_basic(m, *t, &x);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ case SD_BUS_TYPE_BOOLEAN: {
|
||||||
|
+ if (sizeof(bool) == sizeof(uint32_t)) {
|
||||||
|
+ uint32_t x;
|
||||||
|
+
|
||||||
|
+ x = va_arg(ap, uint32_t);
|
||||||
|
+ r = sd_bus_message_append_basic(m, *t, &x);
|
||||||
|
+ } else {
|
||||||
|
+ uint8_t x;
|
||||||
|
|
||||||
|
- case SD_BUS_TYPE_BOOLEAN:
|
||||||
|
+ x = (uint8_t) va_arg(ap, int);
|
||||||
|
+ r = sd_bus_message_append_basic(m, *t, &x);
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
case SD_BUS_TYPE_INT32:
|
||||||
|
case SD_BUS_TYPE_UINT32:
|
||||||
|
case SD_BUS_TYPE_UNIX_FD: {
|
||||||
|
uint32_t x;
|
||||||
|
|
||||||
|
- /* We assume a boolean is the same as int32_t */
|
||||||
|
assert_cc(sizeof(int32_t) == sizeof(int));
|
||||||
|
|
||||||
|
x = va_arg(ap, uint32_t);
|
||||||
|
@@ -3229,7 +3240,7 @@ _public_ int sd_bus_message_read_basic(s
|
||||||
|
|
||||||
|
case SD_BUS_TYPE_BOOLEAN:
|
||||||
|
if (p)
|
||||||
|
- *(int*) p = !!*(uint8_t*) q;
|
||||||
|
+ *(bool*) p = !!*(uint8_t*) q;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SD_BUS_TYPE_INT16:
|
||||||
|
@@ -3339,7 +3350,7 @@ _public_ int sd_bus_message_read_basic(s
|
||||||
|
|
||||||
|
case SD_BUS_TYPE_BOOLEAN:
|
||||||
|
if (p)
|
||||||
|
- *(int*) p = !!*(uint32_t*) q;
|
||||||
|
+ *(bool*) p = !!*(uint32_t*) q;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SD_BUS_TYPE_INT16:
|
||||||
|
--- src/libsystemd/sd-bus/bus-protocol.h
|
||||||
|
+++ src/libsystemd/sd-bus/bus-protocol.h 2014-09-17 13:28:12.582235580 +0000
|
||||||
|
@@ -21,6 +21,7 @@
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
+#include <endian.h>
|
||||||
|
|
||||||
|
/* Endianness */
|
||||||
|
|
||||||
|
--- src/shared/architecture.h
|
||||||
|
+++ src/shared/architecture.h 2014-09-17 13:31:46.710735633 +0000
|
||||||
|
@@ -21,6 +21,8 @@
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
+#include <endian.h>
|
||||||
|
+
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
/* A cleaned up architecture definition */
|
||||||
|
@@ -64,13 +66,13 @@ Architecture uname_architecture(void);
|
||||||
|
#elif defined(__i386__)
|
||||||
|
# define native_architecture() ARCHITECTURE_X86
|
||||||
|
#elif defined(__powerpc64__)
|
||||||
|
-# if defined(WORDS_BIGENDIAN)
|
||||||
|
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
# define native_architecture() ARCHITECTURE_PPC64
|
||||||
|
# else
|
||||||
|
# define native_architecture() ARCHITECTURE_PPC64_LE
|
||||||
|
# endif
|
||||||
|
#elif defined(__powerpc__)
|
||||||
|
-# if defined(WORDS_BIGENDIAN)
|
||||||
|
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
# define native_architecture() ARCHITECTURE_PPC
|
||||||
|
# else
|
||||||
|
# define native_architecture() ARCHITECTURE_PPC_LE
|
||||||
|
@@ -90,19 +92,27 @@ Architecture uname_architecture(void);
|
||||||
|
#elif defined(__sparc__)
|
||||||
|
# define native_architecture() ARCHITECTURE_SPARC
|
||||||
|
#elif defined(__mips64__)
|
||||||
|
-# define native_architecture() ARCHITECTURE_MIPS64
|
||||||
|
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
+# define native_architecture() ARCHITECTURE_MIPS64
|
||||||
|
+# else
|
||||||
|
+# define native_architecture() ARCHITECTURE_MIPS64_LE
|
||||||
|
+# endif
|
||||||
|
#elif defined(__mips__)
|
||||||
|
-# define native_architecture() ARCHITECTURE_MIPS
|
||||||
|
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
+# define native_architecture() ARCHITECTURE_MIPS
|
||||||
|
+# else
|
||||||
|
+# define native_architecture() ARCHITECTURE_MIPS_LE
|
||||||
|
+#endif
|
||||||
|
#elif defined(__alpha__)
|
||||||
|
# define native_architecture() ARCHITECTURE_ALPHA
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
-# if defined(WORDS_BIGENDIAN)
|
||||||
|
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
# define native_architecture() ARCHITECTURE_ARM64_BE
|
||||||
|
# else
|
||||||
|
# define native_architecture() ARCHITECTURE_ARM64
|
||||||
|
# endif
|
||||||
|
#elif defined(__arm__)
|
||||||
|
-# if defined(WORDS_BIGENDIAN)
|
||||||
|
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
# define native_architecture() ARCHITECTURE_ARM_BE
|
||||||
|
# else
|
||||||
|
# define native_architecture() ARCHITECTURE_ARM
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 17 16:02:33 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch 0001-sizeof-bool-used-by-gcc-depends-on-arch.patch to
|
||||||
|
fix for the size of the gcc builtin type bool also known as _Bool
|
||||||
|
from the include header stdbool.h.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 16 10:45:33 UTC 2014 - werner@suse.de
|
Tue Sep 16 10:45:33 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
@ -856,6 +856,8 @@ Patch412: 0008-core-smack-setup-Actually-allow-for-succesfully-load.patch
|
|||||||
Patch413: 0009-journal-do-not-leak-mmaps-on-OOM.patch
|
Patch413: 0009-journal-do-not-leak-mmaps-on-OOM.patch
|
||||||
# PATCH-FIX-UPSTREAM added at 2014/09/16
|
# PATCH-FIX-UPSTREAM added at 2014/09/16
|
||||||
Patch414: 0010-manager-use-correct-cleanup-function.patch
|
Patch414: 0010-manager-use-correct-cleanup-function.patch
|
||||||
|
# PATCH-FIX-SUSE Be aware that the size of the type bool may vary
|
||||||
|
Patch415: 0001-sizeof-bool-used-by-gcc-depends-on-arch.patch
|
||||||
|
|
||||||
# UDEV PATCHES
|
# UDEV PATCHES
|
||||||
# ============
|
# ============
|
||||||
@ -1596,6 +1598,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch412 -p0
|
%patch412 -p0
|
||||||
%patch413 -p0
|
%patch413 -p0
|
||||||
%patch414 -p0
|
%patch414 -p0
|
||||||
|
%patch415 -p0
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 17 16:02:33 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch 0001-sizeof-bool-used-by-gcc-depends-on-arch.patch to
|
||||||
|
fix for the size of the gcc builtin type bool also known as _Bool
|
||||||
|
from the include header stdbool.h.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 16 10:45:33 UTC 2014 - werner@suse.de
|
Tue Sep 16 10:45:33 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
@ -851,6 +851,8 @@ Patch412: 0008-core-smack-setup-Actually-allow-for-succesfully-load.patch
|
|||||||
Patch413: 0009-journal-do-not-leak-mmaps-on-OOM.patch
|
Patch413: 0009-journal-do-not-leak-mmaps-on-OOM.patch
|
||||||
# PATCH-FIX-UPSTREAM added at 2014/09/16
|
# PATCH-FIX-UPSTREAM added at 2014/09/16
|
||||||
Patch414: 0010-manager-use-correct-cleanup-function.patch
|
Patch414: 0010-manager-use-correct-cleanup-function.patch
|
||||||
|
# PATCH-FIX-SUSE Be aware that the size of the type bool may vary
|
||||||
|
Patch415: 0001-sizeof-bool-used-by-gcc-depends-on-arch.patch
|
||||||
|
|
||||||
# UDEV PATCHES
|
# UDEV PATCHES
|
||||||
# ============
|
# ============
|
||||||
@ -1591,6 +1593,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch412 -p0
|
%patch412 -p0
|
||||||
%patch413 -p0
|
%patch413 -p0
|
||||||
%patch414 -p0
|
%patch414 -p0
|
||||||
|
%patch415 -p0
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user