summaryrefslogtreecommitdiff
path: root/sys-fs/mac-fdisk/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-21 19:10:49 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-21 19:10:49 +0100
commit9c0a2358763d5637ca11fe0d263ff4c9fca70a9e (patch)
tree04e08cca47b10c4c36569536eada5756eabfebf5 /sys-fs/mac-fdisk/files
parent963e79dcc85b2d1ff6167b5558b885d19cb0a6ad (diff)
gentoo resync : 21.07.2018
Diffstat (limited to 'sys-fs/mac-fdisk/files')
-rw-r--r--sys-fs/mac-fdisk/files/mac-fdisk-0.1_p16-ppc-inline.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys-fs/mac-fdisk/files/mac-fdisk-0.1_p16-ppc-inline.patch b/sys-fs/mac-fdisk/files/mac-fdisk-0.1_p16-ppc-inline.patch
new file mode 100644
index 000000000000..032c68d96378
--- /dev/null
+++ b/sys-fs/mac-fdisk/files/mac-fdisk-0.1_p16-ppc-inline.patch
@@ -0,0 +1,21 @@
+on gcc-7.3.0 build failed as:
+ # CFLAGS="-mcpu=powerpc -Os -pipe" emerge -v1 sys-fs/mac-fdisk
+ cc fdisk.o fdisklabel.o -o fdisk
+ fdisk.o: In function `check_consistency':
+ fdisk.c:(.text+0x64): undefined reference to `__swap32'
+ fdisk.c:(.text+0x70): undefined reference to `__swap32'
+
+Avoid exporting inline symbols and workaround build failure.
+--- a/fdisk.c
++++ b/fdisk.c
+@@ -247,8 +247,8 @@ char read_char(char *mesg);
+ jmp_buf listingbuf;
+
+-inline unsigned short __swap16(unsigned short x) {
++static inline unsigned short __swap16(unsigned short x) {
+ return (((__u16)(x) & 0xFF) << 8) | (((__u16)(x) & 0xFF00) >> 8);
+ }
+-inline __u32 __swap32(__u32 x) {
++static inline __u32 __swap32(__u32 x) {
+ return (((__u32)(x) & 0xFF) << 24) | (((__u32)(x) & 0xFF00) << 8) | (((__u32)(x) & 0xFF0000) >> 8) | (((__u32)(x) & 0xFF000000) >> 24);
+ }