pax: Fix build with musl

There are several BSD specific assumptions
and some GNU specific ones.

(From OE-Core rev: 49e8fc6c4511e026dee176422cf3a7b7558c7cfc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2016-01-06 12:37:45 -08:00 committed by Richard Purdie
parent 1076499cdf
commit b207868cdd
3 changed files with 1330 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
From b1f50320332c9c90fa33ab136ef0ec2d12cda461 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 6 Jan 2016 12:30:52 -0800
Subject: [PATCH] use strtoll instead of strtoq
Use LLONG_MAX instead of LONG_LONG_MAX
LONG_LONG_MAX is GNU specific
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
src/options.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/options.c b/src/options.c
index da8b4cf..c663b4e 100644
--- a/src/options.c
+++ b/src/options.c
@@ -1547,8 +1547,8 @@ str_offt (char *val)
#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
|| (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
- num = strtoq (val, &expr, 0);
- if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
+ num = strtoll (val, &expr, 0);
+ if ((num == LLONG_MAX) || (num <= 0) || (expr == val))
#else
num = strtol (val, &expr, 0);
if ((num == LONG_MAX) || (num <= 0) || (expr == val))
--
2.6.4

View File

@ -12,11 +12,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
SECTION = "base"
PR = "r2"
DEPENDS_append_libc-musl = " fts "
SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
file://fix_for_compile_with_gcc-4.6.0.patch \
file://pax-3.4_fix_for_x32.patch"
SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
file://0001-use-strtoll-instead-of-strtoq.patch \
"
SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
# see https://lists.yoctoproject.org/pipermail/poky/2013-December/009435.html
# We should ideally drop ac_cv_sizeof_off_t from site files but until then
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
inherit autotools