Accepting request 32184 from Base:System
Copy from Base:System/lzo based on submit request 32184 from user rguenther OBS-URL: https://build.opensuse.org/request/show/32184 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lzo?expand=0&rev=9
This commit is contained in:
parent
d47fd06cc8
commit
3238dda1ae
78
lzo-2.03-alias.patch
Normal file
78
lzo-2.03-alias.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
Index: src/lzo_init.c
|
||||||
|
===================================================================
|
||||||
|
--- src/lzo_init.c.orig 2008-04-30 14:51:49.000000000 +0200
|
||||||
|
+++ src/lzo_init.c 2010-02-11 12:25:02.000000000 +0100
|
||||||
|
@@ -90,8 +90,13 @@ LZO_PUBLIC(int)
|
||||||
|
_lzo_config_check(void)
|
||||||
|
{
|
||||||
|
lzo_bool r = 1;
|
||||||
|
- union { unsigned char c[2*sizeof(lzo_xint)]; lzo_xint l[2]; } u;
|
||||||
|
- lzo_uintptr_t p;
|
||||||
|
+ volatile union {
|
||||||
|
+ unsigned char c[2*sizeof(lzo_xint)];
|
||||||
|
+ lzo_xint l[2];
|
||||||
|
+ unsigned short s[2*sizeof(lzo_xint)/sizeof(unsigned short)];
|
||||||
|
+ lzo_uint32 i[2*sizeof(lzo_xint)/sizeof(lzo_uint32)];
|
||||||
|
+ } u;
|
||||||
|
+ const volatile unsigned char *p;
|
||||||
|
|
||||||
|
#if !defined(LZO_CFG_NO_CONFIG_CHECK)
|
||||||
|
#if defined(LZO_ABI_BIG_ENDIAN)
|
||||||
|
@@ -103,14 +108,14 @@ _lzo_config_check(void)
|
||||||
|
r &= (u.l[0] == 128);
|
||||||
|
#endif
|
||||||
|
#if defined(LZO_UNALIGNED_OK_2)
|
||||||
|
- p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0];
|
||||||
|
+ p = &u.c[0];
|
||||||
|
u.l[0] = u.l[1] = 0;
|
||||||
|
- r &= ((* (const lzo_ushortp) (p+1)) == 0);
|
||||||
|
+ r &= ((* (const volatile unsigned short *) (p+1)) == 0);
|
||||||
|
#endif
|
||||||
|
#if defined(LZO_UNALIGNED_OK_4)
|
||||||
|
- p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0];
|
||||||
|
+ p = &u.c[0];
|
||||||
|
u.l[0] = u.l[1] = 0;
|
||||||
|
- r &= ((* (const lzo_uint32p) (p+1)) == 0);
|
||||||
|
+ r &= ((* (const volatile lzo_uint32 *) (p+1)) == 0);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Index: minilzo/minilzo.c
|
||||||
|
===================================================================
|
||||||
|
--- minilzo/minilzo.c.orig 2008-04-30 14:51:49.000000000 +0200
|
||||||
|
+++ minilzo/minilzo.c 2010-02-11 12:25:08.000000000 +0100
|
||||||
|
@@ -2444,8 +2444,13 @@ LZO_PUBLIC(int)
|
||||||
|
_lzo_config_check(void)
|
||||||
|
{
|
||||||
|
lzo_bool r = 1;
|
||||||
|
- union { unsigned char c[2*sizeof(lzo_xint)]; lzo_xint l[2]; } u;
|
||||||
|
- lzo_uintptr_t p;
|
||||||
|
+ volatile union {
|
||||||
|
+ unsigned char c[2*sizeof(lzo_xint)];
|
||||||
|
+ lzo_xint l[2];
|
||||||
|
+ unsigned short s[2*sizeof(lzo_xint)/sizeof(unsigned short)];
|
||||||
|
+ lzo_uint32 i[2*sizeof(lzo_xint)/sizeof(lzo_uint32)];
|
||||||
|
+ } u;
|
||||||
|
+ const volatile unsigned char *p;
|
||||||
|
|
||||||
|
#if !defined(LZO_CFG_NO_CONFIG_CHECK)
|
||||||
|
#if defined(LZO_ABI_BIG_ENDIAN)
|
||||||
|
@@ -2457,14 +2462,14 @@ _lzo_config_check(void)
|
||||||
|
r &= (u.l[0] == 128);
|
||||||
|
#endif
|
||||||
|
#if defined(LZO_UNALIGNED_OK_2)
|
||||||
|
- p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0];
|
||||||
|
+ p = &u.c[0];
|
||||||
|
u.l[0] = u.l[1] = 0;
|
||||||
|
- r &= ((* (const lzo_ushortp) (p+1)) == 0);
|
||||||
|
+ r &= ((* (const volatile unsigned short *) (p+1)) == 0);
|
||||||
|
#endif
|
||||||
|
#if defined(LZO_UNALIGNED_OK_4)
|
||||||
|
- p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0];
|
||||||
|
+ p = &u.c[0];
|
||||||
|
u.l[0] = u.l[1] = 0;
|
||||||
|
- r &= ((* (const lzo_uint32p) (p+1)) == 0);
|
||||||
|
+ r &= ((* (const volatile lzo_uint32 *) (p+1)) == 0);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 11 12:30:25 CET 2010 - rguenther@suse.de
|
||||||
|
|
||||||
|
- fix aliasing problems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Dec 19 16:48:18 CET 2009 - jengelh@medozas.de
|
Sat Dec 19 16:48:18 CET 2009 - jengelh@medozas.de
|
||||||
|
|
||||||
|
4
lzo.spec
4
lzo.spec
@ -21,10 +21,11 @@
|
|||||||
Name: lzo
|
Name: lzo
|
||||||
Url: http://www.oberhumer.com/opensource/lzo/
|
Url: http://www.oberhumer.com/opensource/lzo/
|
||||||
Version: 2.03
|
Version: 2.03
|
||||||
Release: 5
|
Release: 6
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Source: lzo-%{version}.tar.bz2
|
Source: lzo-%{version}.tar.bz2
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
|
Patch1: lzo-2.03-alias.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# bug437293
|
# bug437293
|
||||||
@ -102,6 +103,7 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-shared --disable-static --libdir=/%{_lib}
|
%configure --enable-shared --disable-static --libdir=/%{_lib}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user