Skip to content

Commit

Permalink
unarr: Fix build on s390x
Browse files Browse the repository at this point in the history
On some big-endian arches (where MY_CPU_NAME doesn't get set),
there is a preprocessor syntax error. It results in build failures
like this:

In file included from rar/../lzmasdk/Ppmd.h:8:0,
                 from rar/../lzmasdk/Ppmd7.h:12,
                 from rar/rar.h:10,
                 from rar/rar.c:4:
rar/../lzmasdk/CpuArch.h:177:18: error: #elif with no expression
   #elif MY_CPU_BE
                  ^
In file included from rar/../lzmasdk/Ppmd.h:8:0,
                 from rar/../lzmasdk/Ppmd7.h:12,
                 from rar/rar.h:10,
                 from rar/uncompress-rar.c:7:
rar/../lzmasdk/CpuArch.h:177:18: error: #elif with no expression
   #elif MY_CPU_BE
                  ^

With help from Iain Lane <[email protected]>

See https://sourceforge.net/p/sevenzip/patches/317/

https://bugzilla.gnome.org/show_bug.cgi?id=787248
  • Loading branch information
fweimer-rh authored and hadess committed Sep 4, 2017
1 parent 833708a commit 0e70019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cut-n-paste/unarr/lzmasdk/CpuArch.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned mem
#ifndef MY_CPU_NAME
#ifdef MY_CPU_LE
#define MY_CPU_NAME "LE"
#elif MY_CPU_BE
#elif defined (MY_CPU_BE)
#define MY_CPU_NAME "BE"
#else
/*
Expand Down

0 comments on commit 0e70019

Please sign in to comment.