Accepting request 286598 from network:telephony

1

OBS-URL: https://build.opensuse.org/request/show/286598
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libosmocore?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2015-02-18 19:36:41 +00:00 committed by Git OBS Bridge
commit 160cfc7dab
3 changed files with 99 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 18 09:05:16 UTC 2015 - normand@linux.vnet.ibm.com
- avoid smscb test failure on ppc/ppc64 architectures
with libosmocore_0_7_0_avoid_smscb_test_failure.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 2 20:05:34 UTC 2014 - jengelh@inai.de Thu Oct 2 20:05:34 UTC 2014 - jengelh@inai.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package libosmocore # spec file for package libosmocore
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -33,6 +33,7 @@ Patch2: 0001-utils-resolve-compiler-warnings-on-implicit-declarat.patch
Patch3: osmo-talloc.diff Patch3: osmo-talloc.diff
Patch4: osmo-talloc2.diff Patch4: osmo-talloc2.diff
Patch5: osmo-kasumi.diff Patch5: osmo-kasumi.diff
Patch6: libosmocore_0_7_0_avoid_smscb_test_failure.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake >= 1.6 BuildRequires: automake >= 1.6
@ -240,6 +241,7 @@ applications that want to make use of libosmovty.
%prep %prep
%setup -qn %name %setup -qn %name
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1 %patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
%patch6 -p1
%build %build
%if 0%{?use_system_talloc} %if 0%{?use_system_talloc}

View File

@ -0,0 +1,90 @@
From: Michel Normand <normand@linux.vnet.ibm.com>
Subject: libosmocore 0 7 0 avoid smscb test failure
Date: Wed, 18 Feb 2015 09:10:04 +0100
libosmocore 0.7.0 avoid smscb test failure for ppc/ppc64 that is big-endian
# ===
# 7. testsuite.at:45: testing smscb ...
# ./testsuite.at:48: $abs_top_builddir/tests/smscb/smscb_test
# --- expout 2015-02-17 16:19:24.010024039 +0000
# +++ /home/abuild/rpmbuild/BUILD/libosmocore/tests/testsuite.dir/at-groups/7/stdout
# @@ -1,4 +1,4 @@
# -(srl) GS: 1 MSG_CODE: 1 UPDATE: 0
# +(srl) GS: 0 MSG_CODE: 256 UPDATE: 1
# (msg) msg_id: 1293
# -(dcs) group: 1 language: 0
# +(dcs) group: 0 language: 1
# (pge) page total: 1 current: 1
# 7. testsuite.at:45: 7. smscb (testsuite.at:45): FAILED (testsuite.at:48)
# ===
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
---
include/osmocom/gsm/protocol/gsm_03_41.h | 37 +++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
Index: libosmocore/include/osmocom/gsm/protocol/gsm_03_41.h
===================================================================
--- libosmocore.orig/include/osmocom/gsm/protocol/gsm_03_41.h
+++ libosmocore/include/osmocom/gsm/protocol/gsm_03_41.h
@@ -5,6 +5,26 @@
/* GSM TS 03.41 definitions also TS 23.041*/
/* Chapter 9.3.2 */
+#if defined(__powerpc__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+struct gsm341_ms_message {
+ struct {
+ uint8_t gs:2;
+ uint8_t code_hi:6;
+ uint8_t code_lo:4;
+ uint8_t update:4;
+ } serial;
+ uint16_t msg_id;
+ struct {
+ uint8_t group:4;
+ uint8_t language:4;
+ } dcs;
+ struct {
+ uint8_t current:4;
+ uint8_t total:4;
+ } page;
+ uint8_t data[0];
+} __attribute__((packed));
+#else
struct gsm341_ms_message {
struct {
uint8_t code_hi:6;
@@ -23,8 +43,24 @@ struct gsm341_ms_message {
} page;
uint8_t data[0];
} __attribute__((packed));
+#endif
/* Chapter 9.4.1.3 */
+#if defined(__powerpc__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+struct gsm341_etws_message {
+ struct {
+ uint8_t gs:2;
+ uint8_t alert:1;
+ uint8_t popup:1;
+ uint8_t code_hi:4;
+ uint8_t code_lo:4;
+ uint8_t update:4;
+ } serial;
+ uint16_t msg_id;
+ uint16_t warning_type;
+ uint8_t data[0];
+} __attribute__((packed));
+#else
struct gsm341_etws_message {
struct {
uint8_t code_hi:4;
@@ -38,6 +74,7 @@ struct gsm341_etws_message {
uint16_t warning_type;
uint8_t data[0];
} __attribute__((packed));
+#endif
#define GSM341_MSG_CODE(ms) ((ms)->serial.code_lo | ((ms)->serial.code_hi << 4))