Upgrade musl, fix more packages on musl
cover Upgrade musl, fix more packages on musl
This patchset upgrades musl to support out of tree builds Fixes few more recipes to build with musl
Drops pth
The following changes since commit fc4209baa098caebf9c4cb75f9a6f2e85f43333c:
Revert "xz: Allow to work with ASSUME_PROVIDED xz-native" (2016-01-25 10:08:25 +0000)
are available in the git repository at:
git://github.com/kraj/openembedded-core kraj/pu
https://github.com/kraj/openembedded-core/tree/kraj/pu
Khem Raj (11):
btrfs-tools: Disable backtrace on musl
grub: Backport fix for largefile detection/use
elfutils: Fix build with uclibc/musl
pth: Delete
argp-standalone: Fix build when S != B
gdb: Fix build failures on musl
ltp: Add rdep on ldd
bsd-headers: Fix LICENCE and dev package RDEPENDS
fts: Correct LIC_FILES_CHKSUM
musl: Upgrade to tip of tree
libdrm: Refresh patch to match upstream submission
...ct-_llseek-code-and-require-long-filesyst.patch | 81 ++ meta/recipes-bsp/grub/grub-efi_2.00.bb | 2 + ...-mfpmath-sse-as-well-when-SSE-is-disabled.patch | 46 + ...1-grub.d-10_linux.in-add-oe-s-kernel-name.patch | 56 + meta/recipes-bsp/grub/grub2.inc | 1 + meta/recipes-bsp/grub/grub_2.00.bb | 2 + meta/recipes-bsp/grub/grub_git.bb | 13 +- meta/recipes-core/bsd-headers/bsd-headers.bb | 6 +- meta/recipes-core/fts/fts.bb | 2 +- meta/recipes-core/musl/musl_git.bb | 4 +- .../btrfs-tools/btrfs-tools_4.4.bb | 2 + ...de-alternatives-for-glibc-assumptions-hel.patch | 1163 ++++++++++++++++++++ .../elfutils/elfutils-0.164/aarch64_uio.patch | 47 + .../elfutils/elfutils-0.164/shadow.patch | 23 + .../elfutils/elfutils-0.164/uclibc-support.patch | 129 +++ .../elfutils/elfutils/mempcpy.patch | 24 - meta/recipes-devtools/elfutils/elfutils_0.148.bb | 1 - meta/recipes-devtools/elfutils/elfutils_0.164.bb | 13 +- meta/recipes-devtools/gdb/gdb.inc | 1 + .../gdb/0001-include-sys-types.h-for-mode_t.patch | 30 + meta/recipes-extended/ltp/ltp_20150903.bb | 2 +- ...tests-kms-steal-crtc-Include-sys-select.h.patch | 83 +- .../argp-standalone/argp-standalone_1.3.bb | 1 + .../argp-standalone/files/out_of_tree_build.patch | 19 + meta/recipes-support/pth/pth_2.0.7.bb | 31 - 25 files changed, 1701 insertions(+), 81 deletions(-) create mode 100644 meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch create mode 100644 meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch create mode 100644 meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils/mempcpy.patch create mode 100644 meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch create mode 100644 meta/recipes-support/argp-standalone/files/out_of_tree_build.patch delete mode 100644 meta/recipes-support/pth/pth_2.0.7.bb
Signature · 1 line
2.7.0
PATCH 1/11 btrfs-tools: Disable backtrace on musl
musl does not support backtrace APIs
--- meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ inherit autotools-brokensep pkgconfig EXTRA_OECONF += "--disable-documentation" +EXTRA_OECONF_append_libc-musl = " --disable-backtrace " + do_configure_prepend() { sh autogen.sh
Signature · 1 line
2.7.0
PATCH 2/11 grub: Backport fix for largefile detection/use
This is inspired by musl porting, where grub's configure is enabling largefile support based on glibc versions, instead an upstream patch turns it into autoconf check
Update git version recipe
arm platforms use this recipe to provide grub and it needed fixes from upstream so upgrade to latest tip of git and forward port patches as well as drop the ones already applied upstream
--- ...ct-_llseek-code-and-require-long-filesyst.patch | 81 ++++++++++++++++++++++ meta/recipes-bsp/grub/grub-efi_2.00.bb | 2 + ...-mfpmath-sse-as-well-when-SSE-is-disabled.patch | 46 ++++++++++++ ...1-grub.d-10_linux.in-add-oe-s-kernel-name.patch | 56 +++++++++++++++ meta/recipes-bsp/grub/grub2.inc | 1 + meta/recipes-bsp/grub/grub_2.00.bb | 2 + meta/recipes-bsp/grub/grub_git.bb | 13 ++-- 7 files changed, 196 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch create mode 100644 meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch create mode 100644 meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch new file +81 -0
@@ -0,0 +1,81 @@ +From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001 +From: Felix Janda <[email protected]> +Date: Thu, 22 Jan 2015 19:54:36 +0100 +Subject: [PATCH] Remove direct _llseek code and require long filesystem libc. + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Backport + configure.ac | 8 ++++++++ + grub-core/osdep/unix/hostdisk.c | 24 ------------------------ + 4 files changed, 13 insertions(+), 24 deletions(-) + +Index: grub-2.00/configure.ac +=================================================================== +--- grub-2.00.orig/configure.ac ++++ grub-2.00/configure.ac +@@ -306,6 +306,14 @@ if test x$grub_cv_apple_cc = xyes ; then + HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute" + fi + ++case "$host_os" in ++ cygwin | windows* | mingw32* | aros*) ++ ;; ++ *) ++ AC_CHECK_SIZEOF(off_t) ++ test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);; ++esac ++ + if test x$USE_NLS = xno; then + HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext" + fi +Index: grub-2.00/grub-core/kern/emu/hostdisk.c +=================================================================== +--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c ++++ grub-2.00/grub-core/kern/emu/hostdisk.c +@@ -44,11 +44,6 @@ + #ifdef __linux__ + # include <sys/ioctl.h> /* ioctl */ + # include <sys/mount.h> +-# if !defined(__GLIBC__) || \ +- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) +-/* Maybe libc doesn't have large file support. */ +-# include <linux/unistd.h> /* _llseek */ +-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */ + # ifndef BLKFLSBUF + # define BLKFLSBUF _IO (0x12,97) /* flush buffer cache */ + # endif /* ! BLKFLSBUF */ +@@ -761,25 +756,6 @@ linux_find_partition (char *dev, grub_di + } + #endif /* __linux__ */ + +-#if defined(__linux__) && (!defined(__GLIBC__) || \ +- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))) +- /* Maybe libc doesn't have large file support. */ +-grub_err_t +-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off) +-{ +- loff_t offset, result; +- static int _llseek (uint filedes, ulong hi, ulong lo, +- loff_t *res, uint wh); +- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo, +- loff_t *, res, uint, wh); +- +- offset = (loff_t) off; +- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET)) +- return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"), +- name, strerror (errno)); +- return GRUB_ERR_NONE; +-} +-#else + grub_err_t + grub_util_fd_seek (int fd, const char *name, grub_uint64_t off) + { +@@ -790,7 +766,6 @@ grub_util_fd_seek (int fd, const char *n + name, strerror (errno)); + return 0; + } +-#endif + + static void + flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
meta/recipes-bsp/grub/grub-efi_2.00.bb +2 -0
@@ -33,6 +33,8 @@ EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ --enable-efiemu=no --program-prefix='' \ --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}" + do_install_class-native() { install -d ${D}${bindir} install -m 755 grub-mkimage ${D}${bindir}
meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch new file +46 -0
46 lines not on this page · raw message
meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch new file +56 -0
56 lines not on this page · raw message
meta/recipes-bsp/grub/grub2.inc +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \ file://grub2-fix-initrd-size-bug.patch \ file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \ + file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \ " DEPENDS = "flex-native bison-native xz"
meta/recipes-bsp/grub/grub_2.00.bb +2 -0
@@ -6,6 +6,8 @@ PR = "r1" EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \ --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}" + do_install_append () { install -d ${D}${sysconfdir}/grub.d }
meta/recipes-bsp/grub/grub_git.bb +8 -5
@@ -5,13 +5,14 @@ DEPENDS += "autogen-native" DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_arm = "1" +FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:" + PV = "2.00+${SRCPV}" -SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" +SRCREV = "b95e92678882f56056c64ae29092bc9cf129905f" SRC_URI = "git://git.savannah.gnu.org/grub.git \ - file://grub-2.00-fpmath-sse-387-fix.patch \ + file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \ file://autogen.sh-exclude-pc.patch \ - file://grub-2.00-add-oe-kernel.patch \ - file://0001-Fix-build-with-glibc-2.20.patch \ + file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \ " S = "${WORKDIR}/git"
@@ -30,6 +31,8 @@ GRUBPLATFORM ??= "pc" EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \ --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}" + do_configure_prepend() { ( cd ${S} ${S}/autogen.sh )
@@ -37,7 +40,7 @@ do_configure_prepend() { do_install_append () { install -d ${D}${sysconfdir}/grub.d - + rm -rf ${D}${libdir}/charset.alias } # debugedit chokes on bare metal binaries
Signature · 1 line
2.7.0
Re: [PATCH 02/11] grub: Backport fix for largefile detection/use
Quoted 3 lines · Khem Raj
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}"
Why do you need to pass ac_cv_sizeof_off_t? Surely that's what AC_CHECK_SIZEOF is for?
Ross
Re: [PATCH 02/11] grub: Backport fix for largefile detection/use
Quoted 8 lines · Ross
On 25 January 2016 at 18:32, Khem Raj <[email protected] <mailto:[email protected]>> wrote:
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile ac_cv_sizeof_off_t=8', '--disable-largefile', d)}"Why do you need to pass
ac_cv_sizeof_off_t? Surely that's whatAC_CHECK_SIZEOFis for?
Remember my other email about how we cache sizeof_off_t to openemebedded-architecture ?
this to insulate against that change. Because by caching that variable in our site files we defeat AC_CHECK_SIZEOF macro.
Quoted 2 lines
Ross
Re: [PATCH 02/11] grub: Backport fix for largefile detection/use
Quoted 5 lines · Khem Raj
Remember my other email about how we cache
sizeof_off_tto openemebedded-architecture ?
this to insulate against that change. Because by caching that variable in our site files we defeatAC_CHECK_SIZEOFmacro.
Let's remove it from the site files then?
Ross
Re: [PATCH 02/11] grub: Backport fix for largefile detection/use
Quoted 9 lines · Ross
On 25 January 2016 at 21:33, Khem Raj <[email protected] <mailto:[email protected]>> wrote:
Remember my other email about how we cachesizeof_off_tto openemebedded-architecture ?
this to insulate against that change. Because by caching that variable in our site files we defeatAC_CHECK_SIZEOFmacro.Let's remove it from the site files then?
I will. we need to do it carefully and ensure that it doesnt regress us. These patches here however will work either way when we have removed the caching we can unbolt them if we want to.
Quoted 2 lines
Ross
PATCH 3/11 elfutils: Fix build with uclibc/musl
In reply to Khem RajRemove mempcpy patch its already in uclibc now
refresh libargp patch to match latest elfutils
Add ALLOW_EMPTY for musl
core-image-cmdline-full asks for elfutils package to be added to package it has all eu-* tools but we dont build them on musl. nevertheless lets satisfy the dependency so image can build for musl
Build libdw,libasm,libebl along with libelf
enhance the musl portability patch to compile every other library except the eu-* tools
Fix build on aarch64/musl issues
Header inclusion ends up with duplicate definitions of iovec struct since uclibc defines the same in usersapce, we have been depending upong including the kernel header on aarch64, using sys/uio.h is the right approach
Fix x86 build warning seen on musl
--- ...de-alternatives-for-glibc-assumptions-hel.patch | 1163 ++++++++++++++++++++ .../elfutils/elfutils-0.164/aarch64_uio.patch | 47 + .../elfutils/elfutils-0.164/shadow.patch | 23 + .../elfutils/elfutils-0.164/uclibc-support.patch | 129 +++ .../elfutils/elfutils/mempcpy.patch | 24 - meta/recipes-devtools/elfutils/elfutils_0.148.bb | 1 - meta/recipes-devtools/elfutils/elfutils_0.164.bb | 13 +- 7 files changed, 1370 insertions(+), 30 deletions(-) create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils/mempcpy.patch
meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch new file +1163 -0
@@ -0,0 +1,1163 @@ +From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 31 Dec 2015 06:35:34 +0000 +Subject: [PATCH] build: Provide alternatives for glibc assumptions helps + compiling it on musl + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + Makefile.am | 2 +- + lib/color.c | 2 +- + lib/crc32_file.c | 4 +++- + lib/fixedsizehash.h | 4 ++-- + lib/system.h | 11 +++++++++++ + lib/xmalloc.c | 2 +- + libasm/asm_end.c | 2 +- + libasm/asm_newscn.c | 2 +- + libcpu/i386_gendis.c | 2 +- + libcpu/i386_lex.c | 2 +- + libcpu/i386_parse.c | 2 +- + libdw/Makefile.am | 2 +- + libdw/libdw_alloc.c | 3 ++- + libdwfl/Makefile.am | 2 ++ + libdwfl/dwfl_build_id_find_elf.c | 3 ++- + libdwfl/dwfl_error.c | 4 +++- + libdwfl/dwfl_module_getdwarf.c | 1 + + libdwfl/find-debuginfo.c | 2 +- + libdwfl/libdwfl_crc32_file.c | 10 ++++++++++ + libdwfl/linux-kernel-modules.c | 1 + + libebl/eblopenbackend.c | 2 +- + libebl/eblwstrtab.c | 2 +- + libelf/elf.h | 9 ++++++--- + libelf/libelf.h | 1 + + libelf/libelfP.h | 1 + + src/addr2line.c | 2 +- + src/ar.c | 2 +- + src/arlib.c | 2 +- + src/arlib2.c | 2 +- + src/elfcmp.c | 2 +- + src/elflint.c | 2 +- + src/findtextrel.c | 2 +- + src/i386_ld.c | 2 +- + src/ld.c | 2 +- + src/ldgeneric.c | 2 +- + src/ldlex.c | 2 +- + src/ldscript.c | 2 +- + src/nm.c | 2 +- + src/objdump.c | 2 +- + src/ranlib.c | 2 +- + src/readelf.c | 2 +- + src/size.c | 2 +- + src/stack.c | 2 +- + src/strings.c | 2 +- + src/strip.c | 2 +- + src/unstrip.c | 2 +- + tests/addrscopes.c | 2 +- + tests/allregs.c | 2 +- + tests/backtrace-data.c | 2 +- + tests/backtrace-dwarf.c | 2 +- + tests/backtrace.c | 2 +- + tests/buildid.c | 2 +- + tests/debugaltlink.c | 2 +- + tests/debuglink.c | 2 +- + tests/deleted.c | 2 +- + tests/dwfl-addr-sect.c | 2 +- + tests/dwfl-bug-addr-overflow.c | 2 +- + tests/dwfl-bug-fd-leak.c | 2 +- + tests/dwfl-bug-getmodules.c | 2 +- + tests/dwfl-report-elf-align.c | 2 +- + tests/dwfllines.c | 2 +- + tests/dwflmodtest.c | 2 +- + tests/dwflsyms.c | 2 +- + tests/early-offscn.c | 2 +- + tests/ecp.c | 2 +- + tests/find-prologues.c | 2 +- + tests/funcretval.c | 2 +- + tests/funcscopes.c | 2 +- + tests/getsrc_die.c | 2 +- + tests/line2addr.c | 2 +- + tests/low_high_pc.c | 2 +- + tests/md5-sha1-test.c | 2 +- + tests/rdwrmmap.c | 2 +- + tests/saridx.c | 2 +- + tests/sectiondump.c | 2 +- + tests/varlocs.c | 2 +- + tests/vdsosyms.c | 2 +- + 77 files changed, 109 insertions(+), 73 deletions(-) + +Index: elfutils-0.164/Makefile.am +=================================================================== +--- elfutils-0.164.orig/Makefile.am ++++ elfutils-0.164/Makefile.am +@@ -24,7 +24,7 @@ pkginclude_HEADERS = version.h + + # Add doc back when we have some real content. + SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \ +- backends src po tests ++ backends po tests + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 +Index: elfutils-0.164/lib/color.c +=================================================================== +--- elfutils-0.164.orig/lib/color.c ++++ elfutils-0.164/lib/color.c +@@ -32,7 +32,7 @@ + #endif + + #include <argp.h> +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <stdlib.h> + #include <string.h> +Index: elfutils-0.164/lib/crc32_file.c +=================================================================== +--- elfutils-0.164.orig/lib/crc32_file.c ++++ elfutils-0.164/lib/crc32_file.c +@@ -30,12 +30,14 @@ + # include <config.h> + #endif + +-#include "system.h" + #include <errno.h> + #include <unistd.h> ++#include <stdint.h> + #include <sys/stat.h> + #include <sys/mman.h> + ++#include "system.h" ++ + int + crc32_file (int fd, uint32_t *resp) + { +Index: elfutils-0.164/lib/fixedsizehash.h +=================================================================== +--- elfutils-0.164.orig/lib/fixedsizehash.h ++++ elfutils-0.164/lib/fixedsizehash.h +@@ -30,12 +30,12 @@ + #include <errno.h> + #include <stdlib.h> + #include <string.h> +-#include <sys/cdefs.h> + #include <sys/param.h> + + #include <system.h> + +-#define CONCAT(t1,t2) __CONCAT (t1,t2) ++#define CONCAT1(x,y) x##y ++#define CONCAT(x,y) CONCAT1(x,y) + + /* Before including this file the following macros must be defined: + +Index: elfutils-0.164/lib/system.h +=================================================================== +--- elfutils-0.164.orig/lib/system.h ++++ elfutils-0.164/lib/system.h +@@ -49,6 +49,16 @@ + #else + # error "Unknown byte order" + #endif ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ ++#define error(status, errno, ...) err(status, __VA_ARGS__) + + extern void *xmalloc (size_t) __attribute__ ((__malloc__)); + extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); +Index: elfutils-0.164/lib/xmalloc.c +=================================================================== +--- elfutils-0.164.orig/lib/xmalloc.c ++++ elfutils-0.164/lib/xmalloc.c +@@ -30,7 +30,7 @@ + # include <config.h> + #endif + +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <stddef.h> + #include <stdlib.h> +Index: elfutils-0.164/libasm/asm_end.c +=================================================================== +--- elfutils-0.164.orig/libasm/asm_end.c ++++ elfutils-0.164/libasm/asm_end.c +@@ -32,7 +32,7 @@ + #endif + + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <stdio.h> + #include <stdlib.h> +Index: elfutils-0.164/libasm/asm_newscn.c +=================================================================== +--- elfutils-0.164.orig/libasm/asm_newscn.c ++++ elfutils-0.164/libasm/asm_newscn.c +@@ -32,7 +32,7 @@ + #endif + + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <stdlib.h> + #include <string.h> +Index: elfutils-0.164/libcpu/i386_gendis.c +=================================================================== +--- elfutils-0.164.orig/libcpu/i386_gendis.c ++++ elfutils-0.164/libcpu/i386_gendis.c +@@ -31,7 +31,7 @@ + # include <config.h> + #endif + +-#include <error.h> ++#include <err.h> + #include <errno.h> + #include <stdio.h> + #include <stdlib.h> +Index: elfutils-0.164/libcpu/i386_lex.c +=================================================================== +--- elfutils-0.164.orig/libcpu/i386_lex.c ++++ elfutils-0.164/libcpu/i386_lex.c +@@ -571,7 +571,7 @@ char *i386_text; + #endif + + #include <ctype.h> +-#include <error.h> ++#include <err.h> + #include <libintl.h> + + #include <system.h> +Index: elfutils-0.164/libcpu/i386_parse.c +=================================================================== +--- elfutils-0.164.orig/libcpu/i386_parse.c ++++ elfutils-0.164/libcpu/i386_parse.c +@@ -107,7 +107,7 @@ + #include <assert.h> + #include <ctype.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <inttypes.h> + #include <libintl.h> + #include <math.h> +Index: elfutils-0.164/libdw/Makefile.am +=================================================================== +--- elfutils-0.164.orig/libdw/Makefile.am ++++ elfutils-0.164/libdw/Makefile.am +@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ +- -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) ++ -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp + @$(textrel_check) + $(AM_V_at)ln -fs $@ $@.$(VERSION) + +Index: elfutils-0.164/libdw/libdw_alloc.c +=================================================================== +--- elfutils-0.164.orig/libdw/libdw_alloc.c ++++ elfutils-0.164/libdw/libdw_alloc.c +@@ -31,11 +31,12 @@ + # include <config.h> + #endif + +-#include <error.h> ++#include <err.h> + #include <errno.h> + #include <stdlib.h> + #include <sys/param.h> + #include "libdwP.h" ++#include "system.h" + + + void * +Index: elfutils-0.164/libdwfl/Makefile.am +=================================================================== +--- elfutils-0.164.orig/libdwfl/Makefile.am ++++ elfutils-0.164/libdwfl/Makefile.am +@@ -86,6 +86,8 @@ libelf = ../libelf/libelf.so + libebl = ../libebl/libebl.a + libeu = ../lib/libeu.a + ++LDADD = -lfts ++ + libdwfl_pic_a_SOURCES = + am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os) + +Index: elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c +=================================================================== +--- elfutils-0.164.orig/libdwfl/dwfl_build_id_find_elf.c ++++ elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c +@@ -27,6 +27,7 @@ + not, see <http://www.gnu.org/licenses/>. */ + + #include "libdwflP.h" ++#include "system.h" + #include <inttypes.h> + #include <fcntl.h> + #include <unistd.h> +@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module + { + if (*file_name != NULL) + free (*file_name); +- *file_name = canonicalize_file_name (name); ++ *file_name = realpath (name, NULL); + if (*file_name == NULL) + { + *file_name = name; +Index: elfutils-0.164/libdwfl/dwfl_error.c +=================================================================== +--- elfutils-0.164.orig/libdwfl/dwfl_error.c ++++ elfutils-0.164/libdwfl/dwfl_error.c +@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error) + const char * + dwfl_errmsg (int error) + { ++ static __thread char s[64] = ""; + if (error == 0 || error == -1) + { + int last_error = global_error; +@@ -154,7 +155,8 @@ dwfl_errmsg (int error) + switch (error &~ 0xffff) + { + case OTHER_ERROR (ERRNO): +- return strerror_r (error & 0xffff, "bad", 0); ++ strerror_r (error & 0xffff, s, sizeof(s)); ++ return s; + case OTHER_ERROR (LIBELF): + return elf_errmsg (error & 0xffff); + case OTHER_ERROR (LIBDW): +Index: elfutils-0.164/libdwfl/dwfl_module_getdwarf.c +=================================================================== +--- elfutils-0.164.orig/libdwfl/dwfl_module_getdwarf.c ++++ elfutils-0.164/libdwfl/dwfl_module_getdwarf.c +@@ -31,6 +31,7 @@ + #include <fcntl.h> + #include <string.h> + #include <unistd.h> ++#include "system.h" + #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ + #include "../libelf/libelfP.h" + +Index: elfutils-0.164/libdwfl/find-debuginfo.c +=================================================================== +--- elfutils-0.164.orig/libdwfl/find-debuginfo.c ++++ elfutils-0.164/libdwfl/find-debuginfo.c +@@ -372,7 +372,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul + /* If FILE_NAME is a symlink, the debug file might be associated + with the symlink target name instead. */ + +- char *canon = canonicalize_file_name (file_name); ++ char *canon = realpath (file_name, NULL); + if (canon != NULL && strcmp (file_name, canon)) + fd = find_debuginfo_in_path (mod, canon, + debuglink_file, debuglink_crc, +Index: elfutils-0.164/libdwfl/libdwfl_crc32_file.c +=================================================================== +--- elfutils-0.164.orig/libdwfl/libdwfl_crc32_file.c ++++ elfutils-0.164/libdwfl/libdwfl_crc32_file.c +@@ -31,6 +31,16 @@ + + #define crc32_file attribute_hidden __libdwfl_crc32_file + #define crc32 __libdwfl_crc32 ++ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + #define LIB_SYSTEM_H 1 + #include <libdwflP.h> + #include "../lib/crc32_file.c" +Index: elfutils-0.164/libdwfl/linux-kernel-modules.c +=================================================================== +--- elfutils-0.164.orig/libdwfl/linux-kernel-modules.c ++++ elfutils-0.164/libdwfl/linux-kernel-modules.c +@@ -34,6 +34,7 @@ + #include <config.h> + + #include "libdwflP.h" ++#include "system.h" + #include <inttypes.h> + #include <errno.h> + #include <stdio.h> +Index: elfutils-0.164/libebl/eblopenbackend.c +=================================================================== +--- elfutils-0.164.orig/libebl/eblopenbackend.c ++++ elfutils-0.164/libebl/eblopenbackend.c +@@ -32,7 +32,7 @@ + + #include <assert.h> + #include <dlfcn.h> +-#include <error.h> ++#include <err.h> + #include <libelfP.h> + #include <dwarf.h> + #include <stdlib.h> +Index: elfutils-0.164/libebl/eblwstrtab.c +=================================================================== +--- elfutils-0.164.orig/libebl/eblwstrtab.c ++++ elfutils-0.164/libebl/eblwstrtab.c +@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep, + + /* Process the current node. */ + nodep->offset = *offsetp; +- *freep = wmempcpy (*freep, nodep->string, nodep->len); ++ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len; + *offsetp += nodep->len * sizeof (wchar_t); + + for (subs = nodep->next; subs != NULL; subs = subs->next) +Index: elfutils-0.164/libelf/elf.h +=================================================================== +--- elfutils-0.164.orig/libelf/elf.h ++++ elfutils-0.164/libelf/elf.h +@@ -21,7 +21,9 @@ + + #include <features.h> + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Standard ELF types. */ + +@@ -3552,7 +3554,8 @@ enum + + #define R_TILEGX_NUM 130 + +- +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* elf.h */ +Index: elfutils-0.164/libelf/libelf.h +=================================================================== +--- elfutils-0.164.orig/libelf/libelf.h ++++ elfutils-0.164/libelf/libelf.h +@@ -29,6 +29,7 @@ + #ifndef _LIBELF_H + #define _LIBELF_H 1 + ++#include <fcntl.h> + #include <stdint.h> + #include <sys/types.h> + +Index: elfutils-0.164/libelf/libelfP.h +=================================================================== +--- elfutils-0.164.orig/libelf/libelfP.h ++++ elfutils-0.164/libelf/libelfP.h +@@ -36,6 +36,7 @@ + + #include <ar.h> + #include <gelf.h> ++#include <libelf.h> + + #include <errno.h> + #include <stdint.h> +Index: elfutils-0.164/src/addr2line.c +=================================================================== +--- elfutils-0.164.orig/src/addr2line.c ++++ elfutils-0.164/src/addr2line.c +@@ -23,7 +23,7 @@ + #include <argp.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <inttypes.h> + #include <libdwfl.h> +Index: elfutils-0.164/src/ar.c +=================================================================== +--- elfutils-0.164.orig/src/ar.c ++++ elfutils-0.164/src/ar.c +@@ -22,7 +22,7 @@ + + #include <argp.h> + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <libintl.h> +Index: elfutils-0.164/src/arlib.c +=================================================================== +--- elfutils-0.164.orig/src/arlib.c ++++ elfutils-0.164/src/arlib.c +@@ -21,7 +21,7 @@ + #endif + + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <gelf.h> + #include <libintl.h> + #include <stdio.h> +Index: elfutils-0.164/src/arlib2.c +=================================================================== +--- elfutils-0.164.orig/src/arlib2.c ++++ elfutils-0.164/src/arlib2.c +@@ -20,7 +20,7 @@ + # include <config.h> + #endif + +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <limits.h> + #include <string.h> +Index: elfutils-0.164/src/elfcmp.c +=================================================================== +--- elfutils-0.164.orig/src/elfcmp.c ++++ elfutils-0.164/src/elfcmp.c +@@ -23,7 +23,7 @@ + #include <argp.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <locale.h> + #include <libintl.h> +Index: elfutils-0.164/src/elflint.c +=================================================================== +--- elfutils-0.164.orig/src/elflint.c ++++ elfutils-0.164/src/elflint.c +@@ -24,7 +24,7 @@ + #include <assert.h> + #include <byteswap.h> + #include <endian.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <inttypes.h> +Index: elfutils-0.164/src/findtextrel.c +=================================================================== +--- elfutils-0.164.orig/src/findtextrel.c ++++ elfutils-0.164/src/findtextrel.c +@@ -23,7 +23,7 @@ + #include <argp.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <libdw.h> +Index: elfutils-0.164/src/i386_ld.c +=================================================================== +--- elfutils-0.164.orig/src/i386_ld.c ++++ elfutils-0.164/src/i386_ld.c +@@ -20,7 +20,7 @@ + #endif + + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <stdlib.h> + #include <string.h> +Index: elfutils-0.164/src/ld.c +=================================================================== +--- elfutils-0.164.orig/src/ld.c ++++ elfutils-0.164/src/ld.c +@@ -21,7 +21,7 @@ + + #include <argp.h> + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <libelf.h> + #include <libintl.h> +Index: elfutils-0.164/src/ldgeneric.c +=================================================================== +--- elfutils-0.164.orig/src/ldgeneric.c ++++ elfutils-0.164/src/ldgeneric.c +@@ -23,7 +23,7 @@ + #include <ctype.h> + #include <dlfcn.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <fnmatch.h> + #include <gelf.h> +Index: elfutils-0.164/src/ldlex.c +=================================================================== +--- elfutils-0.164.orig/src/ldlex.c ++++ elfutils-0.164/src/ldlex.c +@@ -1099,7 +1099,7 @@ char *ldtext; + #include <assert.h> + #include <ctype.h> + #include <elf.h> +-#include <error.h> ++#include <err.h> + #include <inttypes.h> + #include <libintl.h> + #include <stdbool.h> +Index: elfutils-0.164/src/ldscript.c +=================================================================== +--- elfutils-0.164.orig/src/ldscript.c ++++ elfutils-0.164/src/ldscript.c +@@ -95,7 +95,7 @@ + #endif + + #include <assert.h> +-#include <error.h> ++#include <err.h> + #include <libintl.h> + #include <stdbool.h> + #include <stdint.h> +Index: elfutils-0.164/src/nm.c +=================================================================== +--- elfutils-0.164.orig/src/nm.c ++++ elfutils-0.164/src/nm.c +@@ -26,7 +26,7 @@ + #include <ctype.h> + #include <dwarf.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <inttypes.h> +Index: elfutils-0.164/src/objdump.c +=================================================================== +--- elfutils-0.164.orig/src/objdump.c ++++ elfutils-0.164/src/objdump.c +@@ -21,7 +21,7 @@ + #endif + + #include <argp.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <inttypes.h> + #include <libintl.h> +Index: elfutils-0.164/src/ranlib.c +=================================================================== +--- elfutils-0.164.orig/src/ranlib.c ++++ elfutils-0.164/src/ranlib.c +@@ -24,7 +24,7 @@ + #include <argp.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <libintl.h> +Index: elfutils-0.164/src/readelf.c +=================================================================== +--- elfutils-0.164.orig/src/readelf.c ++++ elfutils-0.164/src/readelf.c +@@ -25,7 +25,7 @@ + #include <ctype.h> + #include <dwarf.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <inttypes.h> +Index: elfutils-0.164/src/size.c +=================================================================== +--- elfutils-0.164.orig/src/size.c ++++ elfutils-0.164/src/size.c +@@ -21,7 +21,7 @@ + #endif + + #include <argp.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <inttypes.h> +Index: elfutils-0.164/src/stack.c +=================================================================== +--- elfutils-0.164.orig/src/stack.c ++++ elfutils-0.164/src/stack.c +@@ -18,7 +18,7 @@ + #include <config.h> + #include <assert.h> + #include <argp.h> +-#include <error.h> ++#include <err.h> + #include <stdlib.h> + #include <inttypes.h> + #include <stdio.h> +Index: elfutils-0.164/src/strings.c +=================================================================== +--- elfutils-0.164.orig/src/strings.c ++++ elfutils-0.164/src/strings.c +@@ -25,7 +25,7 @@ + #include <ctype.h> + #include <endian.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <inttypes.h> +Index: elfutils-0.164/src/strip.c +=================================================================== +--- elfutils-0.164.orig/src/strip.c ++++ elfutils-0.164/src/strip.c +@@ -24,7 +24,7 @@ + #include <assert.h> + #include <byteswap.h> + #include <endian.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <libelf.h> +Index: elfutils-0.164/src/unstrip.c +=================================================================== +--- elfutils-0.164.orig/src/unstrip.c ++++ elfutils-0.164/src/unstrip.c +@@ -31,7 +31,7 @@ + #include <argp.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <fnmatch.h> + #include <libintl.h> +Index: elfutils-0.164/tests/addrscopes.c +=================================================================== +--- elfutils-0.164.orig/tests/addrscopes.c ++++ elfutils-0.164/tests/addrscopes.c +@@ -25,7 +25,7 @@ + #include <stdio_ext.h> + #include <locale.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + + +Index: elfutils-0.164/tests/allregs.c +=================================================================== +--- elfutils-0.164.orig/tests/allregs.c ++++ elfutils-0.164/tests/allregs.c +@@ -21,7 +21,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <error.h> ++#include <err.h> + #include <locale.h> + #include <argp.h> + #include <assert.h> +Index: elfutils-0.164/tests/backtrace-data.c +=================================================================== +--- elfutils-0.164.orig/tests/backtrace-data.c ++++ elfutils-0.164/tests/backtrace-data.c +@@ -27,7 +27,7 @@ + #include <dirent.h> + #include <stdlib.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <unistd.h> + #include <dwarf.h> + #if defined(__x86_64__) && defined(__linux__) +Index: elfutils-0.164/tests/backtrace-dwarf.c +=================================================================== +--- elfutils-0.164.orig/tests/backtrace-dwarf.c ++++ elfutils-0.164/tests/backtrace-dwarf.c +@@ -22,7 +22,7 @@ + #include <stdio_ext.h> + #include <locale.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <unistd.h> + #include <sys/ptrace.h> + #include <sys/types.h> +Index: elfutils-0.164/tests/backtrace.c +=================================================================== +--- elfutils-0.164.orig/tests/backtrace.c ++++ elfutils-0.164/tests/backtrace.c +@@ -24,7 +24,7 @@ + #include <dirent.h> + #include <stdlib.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <unistd.h> + #include <dwarf.h> + #ifdef __linux__ +Index: elfutils-0.164/tests/buildid.c +=================================================================== +--- elfutils-0.164.orig/tests/buildid.c ++++ elfutils-0.164/tests/buildid.c +@@ -23,7 +23,7 @@ + #include ELFUTILS_HEADER(elf) + #include ELFUTILS_HEADER(dwelf) + #include <stdio.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <stdlib.h> + #include <sys/types.h> +Index: elfutils-0.164/tests/debugaltlink.c +=================================================================== +--- elfutils-0.164.orig/tests/debugaltlink.c ++++ elfutils-0.164/tests/debugaltlink.c +@@ -23,7 +23,7 @@ + #include ELFUTILS_HEADER(dw) + #include ELFUTILS_HEADER(dwelf) + #include <stdio.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <stdlib.h> + #include <sys/types.h> +Index: elfutils-0.164/tests/debuglink.c +=================================================================== +--- elfutils-0.164.orig/tests/debuglink.c ++++ elfutils-0.164/tests/debuglink.c +@@ -21,7 +21,7 @@ + #include <errno.h> + #include ELFUTILS_HEADER(dwelf) + #include <stdio.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <stdlib.h> + #include <sys/types.h> +Index: elfutils-0.164/tests/deleted.c +=================================================================== +--- elfutils-0.164.orig/tests/deleted.c ++++ elfutils-0.164/tests/deleted.c +@@ -21,7 +21,7 @@ + #include <unistd.h> + #include <assert.h> + #include <stdio.h> +-#include <error.h> ++#include <err.h> + #include <errno.h> + #ifdef __linux__ + #include <sys/prctl.h> +Index: elfutils-0.164/tests/dwfl-addr-sect.c +=================================================================== +--- elfutils-0.164.orig/tests/dwfl-addr-sect.c ++++ elfutils-0.164/tests/dwfl-addr-sect.c +@@ -23,7 +23,7 @@ + #include <stdio_ext.h> + #include <stdlib.h> + #include <string.h> +-#include <error.h> ++#include <err.h> + #include <locale.h> + #include <argp.h> + #include ELFUTILS_HEADER(dwfl) +Index: elfutils-0.164/tests/dwfl-bug-addr-overflow.c +=================================================================== +--- elfutils-0.164.orig/tests/dwfl-bug-addr-overflow.c ++++ elfutils-0.164/tests/dwfl-bug-addr-overflow.c +@@ -20,7 +20,7 @@ + #include <inttypes.h> + #include <stdio.h> + #include <stdio_ext.h> +-#include <error.h> ++#include <err.h> + #include <locale.h> + #include ELFUTILS_HEADER(dwfl) + +Index: elfutils-0.164/tests/dwfl-bug-fd-leak.c +=================================================================== +--- elfutils-0.164.orig/tests/dwfl-bug-fd-leak.c ++++ elfutils-0.164/tests/dwfl-bug-fd-leak.c +@@ -24,7 +24,7 @@ + #include <dirent.h> + #include <stdlib.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <unistd.h> + #include <dwarf.h> + #include <sys/resource.h> +Index: elfutils-0.164/tests/dwfl-bug-getmodules.c +=================================================================== +--- elfutils-0.164.orig/tests/dwfl-bug-getmodules.c ++++ elfutils-0.164/tests/dwfl-bug-getmodules.c +@@ -18,7 +18,7 @@ + #include <config.h> + #include ELFUTILS_HEADER(dwfl) + +-#include <error.h> ++#include <err.h> + + static const Dwfl_Callbacks callbacks = + { +Index: elfutils-0.164/tests/dwfl-report-elf-align.c +=================================================================== +--- elfutils-0.164.orig/tests/dwfl-report-elf-align.c ++++ elfutils-0.164/tests/dwfl-report-elf-align.c +@@ -20,7 +20,7 @@ + #include <inttypes.h> + #include <stdio.h> + #include <stdio_ext.h> +-#include <error.h> ++#include <err.h> + #include <locale.h> + #include <string.h> + #include <stdlib.h> +Index: elfutils-0.164/tests/dwfllines.c +=================================================================== +--- elfutils-0.164.orig/tests/dwfllines.c ++++ elfutils-0.164/tests/dwfllines.c +@@ -27,7 +27,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <error.h> ++#include <err.h> + + int + main (int argc, char *argv[]) +Index: elfutils-0.164/tests/dwflmodtest.c +=================================================================== +--- elfutils-0.164.orig/tests/dwflmodtest.c ++++ elfutils-0.164/tests/dwflmodtest.c +@@ -23,7 +23,7 @@ + #include <stdio_ext.h> + #include <stdlib.h> + #include <string.h> +-#include <error.h> ++#include <err.h> + #include <locale.h> + #include <argp.h> + #include ELFUTILS_HEADER(dwfl) +Index: elfutils-0.164/tests/dwflsyms.c +=================================================================== +--- elfutils-0.164.orig/tests/dwflsyms.c ++++ elfutils-0.164/tests/dwflsyms.c +@@ -25,7 +25,7 @@ + #include <stdio.h> + #include <stdio_ext.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + + static const char * +Index: elfutils-0.164/tests/early-offscn.c +=================================================================== +--- elfutils-0.164.orig/tests/early-offscn.c ++++ elfutils-0.164/tests/early-offscn.c +@@ -19,7 +19,7 @@ + #endif + + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <stdio.h> +Index: elfutils-0.164/tests/ecp.c +=================================================================== +--- elfutils-0.164.orig/tests/ecp.c ++++ elfutils-0.164/tests/ecp.c +@@ -20,7 +20,7 @@ + #endif + + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <stdlib.h> +Index: elfutils-0.164/tests/find-prologues.c +=================================================================== +--- elfutils-0.164.orig/tests/find-prologues.c ++++ elfutils-0.164/tests/find-prologues.c +@@ -25,7 +25,7 @@ + #include <stdio_ext.h> + #include <locale.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <fnmatch.h> + +Index: elfutils-0.164/tests/funcretval.c +=================================================================== +--- elfutils-0.164.orig/tests/funcretval.c ++++ elfutils-0.164/tests/funcretval.c +@@ -25,7 +25,7 @@ + #include <stdio_ext.h> + #include <locale.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <fnmatch.h> + +Index: elfutils-0.164/tests/funcscopes.c +=================================================================== +--- elfutils-0.164.orig/tests/funcscopes.c ++++ elfutils-0.164/tests/funcscopes.c +@@ -25,7 +25,7 @@ + #include <stdio_ext.h> + #include <locale.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <fnmatch.h> + +Index: elfutils-0.164/tests/getsrc_die.c +=================================================================== +--- elfutils-0.164.orig/tests/getsrc_die.c ++++ elfutils-0.164/tests/getsrc_die.c +@@ -19,7 +19,7 @@ + #endif + + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <inttypes.h> + #include <libelf.h> +Index: elfutils-0.164/tests/line2addr.c +=================================================================== +--- elfutils-0.164.orig/tests/line2addr.c ++++ elfutils-0.164/tests/line2addr.c +@@ -26,7 +26,7 @@ + #include <locale.h> + #include <stdlib.h> + #include <string.h> +-#include <error.h> ++#include <err.h> + + + static void +Index: elfutils-0.164/tests/low_high_pc.c +=================================================================== +--- elfutils-0.164.orig/tests/low_high_pc.c ++++ elfutils-0.164/tests/low_high_pc.c +@@ -25,7 +25,7 @@ + #include <stdio_ext.h> + #include <locale.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <fnmatch.h> + +Index: elfutils-0.164/tests/md5-sha1-test.c +=================================================================== +--- elfutils-0.164.orig/tests/md5-sha1-test.c ++++ elfutils-0.164/tests/md5-sha1-test.c +@@ -19,7 +19,7 @@ + #endif + + #include <string.h> +-#include <error.h> ++#include <err.h> + + #include "md5.h" + #include "sha1.h" +Index: elfutils-0.164/tests/rdwrmmap.c +=================================================================== +--- elfutils-0.164.orig/tests/rdwrmmap.c ++++ elfutils-0.164/tests/rdwrmmap.c +@@ -19,7 +19,7 @@ + #endif + + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <stdio.h> + #include <fcntl.h> + #include <unistd.h> +Index: elfutils-0.164/tests/saridx.c +=================================================================== +--- elfutils-0.164.orig/tests/saridx.c ++++ elfutils-0.164/tests/saridx.c +@@ -17,7 +17,7 @@ + + #include <config.h> + +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <stdio.h> +Index: elfutils-0.164/tests/sectiondump.c +=================================================================== +--- elfutils-0.164.orig/tests/sectiondump.c ++++ elfutils-0.164/tests/sectiondump.c +@@ -18,7 +18,7 @@ + #include <config.h> + + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <fcntl.h> + #include <gelf.h> + #include <inttypes.h> +Index: elfutils-0.164/tests/varlocs.c +=================================================================== +--- elfutils-0.164.orig/tests/varlocs.c ++++ elfutils-0.164/tests/varlocs.c +@@ -25,7 +25,7 @@ + #include <dwarf.h> + #include <stdio.h> + #include <stdlib.h> +-#include <error.h> ++#include <err.h> + #include <string.h> + #include <sys/types.h> + #include <sys/stat.h> +Index: elfutils-0.164/tests/vdsosyms.c +=================================================================== +--- elfutils-0.164.orig/tests/vdsosyms.c ++++ elfutils-0.164/tests/vdsosyms.c +@@ -18,7 +18,7 @@ + #include <config.h> + #include <assert.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include <inttypes.h> + #include <stdio.h> + #include <string.h> +Index: elfutils-0.164/libelf/elf_getarsym.c +=================================================================== +--- elfutils-0.164.orig/libelf/elf_getarsym.c ++++ elfutils-0.164/libelf/elf_getarsym.c +@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr) + arsym[cnt].as_off = (*u32)[cnt]; + + arsym[cnt].as_hash = _dl_elf_hash (str_data); +- str_data = rawmemchr (str_data, '\0') + 1; ++ str_data = memchr (str_data, '\0', SIZE_MAX) + 1; + } + + /* At the end a special entry. */
meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch new file +47 -0
47 lines not on this page · raw message
meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch new file +23 -0
@@ -0,0 +1,23 @@ +Fix control path where we have str as uninitialized string + +| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm': +| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized] +| memcpy (buf + bufcnt, _str, _len); \ +| ^ +| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here +| const char *str; + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending +Index: elfutils-0.164/libcpu/i386_disasm.c +=================================================================== +--- elfutils-0.164.orig/libcpu/i386_disasm.c ++++ elfutils-0.164/libcpu/i386_disasm.c +@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con + } + + default: ++ str = ""; + assert (! "INVALID not handled"); + } + }
meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch new file +129 -0
129 lines not on this page · raw message
meta/recipes-devtools/elfutils/elfutils/mempcpy.patch deleted +0 -24
@@ -1,24 +0,0 @@ - -uclibc does not export __mempcpy like glibc so we alias it here. -This patch may make sense for upstream but elfutils uses more -glibc specific features like obstack_printf which are missing in -uclibc they need to be fixed along to make it work all the way - -Upstream-Status: Inappropriate[Elfutils uses more glibc specific features] - -Signed-off-by: Khem Raj <[email protected]> - -Index: elfutils-0.148/libelf/elf_begin.c -=================================================================== ---- elfutils-0.148.orig/libelf/elf_begin.c -+++ elfutils-0.148/libelf/elf_begin.c -@@ -68,6 +68,9 @@ - #include "libelfP.h" - #include "common.h" - -+#ifdef __UCLIBC__ -+#define __mempcpy mempcpy -+#endif - - /* Create descriptor for archive in memory. */ - static inline Elf *
meta/recipes-devtools/elfutils/elfutils_0.148.bb +0 -1
@@ -27,7 +27,6 @@ SRC_URI += "\ file://elf_additions.diff \ file://elfutils-fsize.patch \ file://remove-unused.patch \ - file://mempcpy.patch \ file://fix_for_gcc-4.7.patch \ file://dso-link-change.patch \ file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
meta/recipes-devtools/elfutils/elfutils_0.164.bb +8 -5
@@ -4,6 +4,7 @@ SECTION = "base" LICENSE = "(GPLv3 & Elfutils-Exception)" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "libtool bzip2 zlib virtual/libintl" +DEPENDS_append_libc-musl = " argp-standalone fts " SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
@@ -11,13 +12,14 @@ SRC_URI[md5sum] = "2e4536c1c48034f188a80789a59114d8" SRC_URI[sha256sum] = "9683c025928a12d06b7fe812928aa6235249e22d197d086f7084606a48165900" SRC_URI += "\ - file://mempcpy.patch \ file://dso-link-change.patch \ file://Fix_elf_cvt_gunhash.patch \ file://fixheadercheck.patch \ file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \ file://0001-remove-the-unneed-checking.patch \ file://0001-fix-a-stack-usage-warning.patch \ + file://aarch64_uio.patch \ + file://shadow.patch \ " # pick the patch from debian
@@ -33,10 +35,9 @@ SRC_URI += "\ file://0001-Ignore-differences-between-mips-machine-identifiers.patch \ file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ file://0003-Add-mips-n64-relocation-format-hack.patch \ + file://uclibc-support.patch \ " - -# Only apply when building uclibc based target recipe -SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.patch" +SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch " # The buildsystem wants to generate 2 .h files from source using a binary it just built, # which can not pass the cross compiling, so let's work around it by adding 2 .h files
@@ -50,7 +51,7 @@ EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc" do_install_append() { if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then - rm ${D}${bindir}/eu-objdump + rm -f ${D}${bindir}/eu-objdump fi }
@@ -62,6 +63,8 @@ EXTRA_OEMAKE_libc-uclibc = "-C libelf" EXTRA_OEMAKE_class-native = "" EXTRA_OEMAKE_class-nativesdk = "" +ALLOW_EMPTY_${PN}_libc-musl = "1" + BBCLASSEXTEND = "native nativesdk" # Package utilities separately
Signature · 1 line
2.7.0
PATCH 4/11 pth: Delete
In reply to Khem Rajreplacement in npth is available in OE-core
--- meta/recipes-support/pth/pth_2.0.7.bb | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 meta/recipes-support/pth/pth_2.0.7.bb
meta/recipes-support/pth/pth_2.0.7.bb deleted +0 -31
@@ -1,31 +0,0 @@ -SUMMARY = "GNU Portable Threads library" -HOMEPAGE = "http://www.gnu.org/software/pth/" -SECTION = "libs" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1" -PR = "r3" - -python __anonymous () { - import re - uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None) - if uc_os: - raise bb.parse.SkipPackage("incompatible with uClibc") -} - -SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz \ - file://pth-add-pkgconfig-support.patch \ - file://pth-fix-parallel.patch \ - " - -SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793" -SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232" - -BINCONFIG = "${bindir}/pth-config" - -inherit autotools binconfig-disabled pkgconfig - -do_configure() { - ( cd ${S}; gnu-configize ) - ( cd ${S}; autoconf ) - oe_runconf -}
Signature · 1 line
2.7.0
Re: [PATCH 04/11] pth: Delete
Quoted 2 lines · Khem Raj
replacement in npth is available in OE-core
This breaks anyone using core-image-lsb because that pulls in pth explicitly.
I can't see any mention of pth in the LSB specification so it could be that it can just be removed. Or maybe it should be replaced with npth. Does anyone have any opinions here?
Ross
PATCH 5/11 argp-standalone: Fix build when S != B
In reply to Khem Rajaccesses headers from source tree.
--- .../argp-standalone/argp-standalone_1.3.bb | 1 + .../argp-standalone/files/out_of_tree_build.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 meta/recipes-support/argp-standalone/files/out_of_tree_build.patch
meta/recipes-support/argp-standalone/argp-standalone_1.3.bb +1 -0
@@ -10,6 +10,7 @@ SECTION = "libs" SRC_URI = "http://www.lysator.liu.se/~nisse/misc/argp-standalone-${PV}.tar.gz \ file://0001-throw-in-funcdef.patch \ file://0002-isprint.patch \ + file://out_of_tree_build.patch \ " SRC_URI[md5sum] = "720704bac078d067111b32444e24ba69" SRC_URI[sha256sum] = "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be"
meta/recipes-support/argp-standalone/files/out_of_tree_build.patch new file +19 -0
@@ -0,0 +1,19 @@ +Fix the testsuite to built out of tree +in OE S != B + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending +Index: argp-standalone-1.3/testsuite/Makefile.am +=================================================================== +--- argp-standalone-1.3.orig/testsuite/Makefile.am ++++ argp-standalone-1.3/testsuite/Makefile.am +@@ -5,7 +5,8 @@ TS_ALL = $(TS_PROGS) $(TS_SH) + + noinst_PROGRAMS = $(TS_PROGS) ex1 ex3 ex4 + +-LDADD = ../libargp.a ++AM_CPPFLAGS = -I$(top_srcdir) ++LDADD = $(top_builddir)/libargp.a + + EXTRA_DIST = $(TS_SH) run-tests + CLEANFILES = test.out
Signature · 1 line
2.7.0
PATCH 6/11 gdb: Fix build failures on musl
In reply to Khem Rajmode_t is needed by gdbserver headers so include sys/types.h to get them
--- meta/recipes-devtools/gdb/gdb.inc | 1 + .../gdb/0001-include-sys-types.h-for-mode_t.patch | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
meta/recipes-devtools/gdb/gdb.inc +1 -0
@@ -5,6 +5,7 @@ inherit gettext SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \ file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \ file://0001-Use-exported-definitions-of-SIGRTMIN.patch \ + file://0001-include-sys-types.h-for-mode_t.patch \ " #LDFLAGS_append = " -s" #export CFLAGS_append=" -L${STAGING_LIBDIR}"
meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch new file +30 -0
@@ -0,0 +1,30 @@ +From acbee4edacb80b5eeaff2480712fe98e56443997 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 19 Jan 2016 18:18:52 -0800 +Subject: [PATCH] include sys/types.h for mode_t + +mode_t is used in target.h, so we need to include sys/types.h to get the +defintion + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + gdb/gdbserver/target.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h +index 9a40867..aaecab9 100644 +--- a/gdb/gdbserver/target.h ++++ b/gdb/gdbserver/target.h +@@ -27,6 +27,7 @@ + #include "target/waitstatus.h" + #include "mem-break.h" + #include "btrace-common.h" ++#include <sys/types.h> + + struct emit_ops; + struct buffer; +-- +2.7.0 +
Signature · 1 line
2.7.0
PATCH 7/11 ltp: Add rdep on ldd
In reply to Khem RajFixes runtime errors e.g.
/opt/ltp/ver_linux: line 50: ldd: command not found
awk: cmd. line:2: (FILENAME=- FNR=1) fatal: attempt to access field -1 /opt/ltp/ver_linux: line 54: ldd: command not found
--- meta/recipes-extended/ltp/ltp_20150903.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/ltp/ltp_20150903.bb +1 -1
@@ -63,7 +63,7 @@ do_install(){ cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases } -RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect" +RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect ldd" FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
Signature · 1 line
2.7.0
PATCH 8/11 bsd-headers: Fix LICENCE and dev package RDEPENDS
In reply to Khem RajClear out runtime deps for dev package, since PN is empty packager will try to resolve to PN when building images with musl and error out since PN is deleted as its empty
musl-dev explicitly depends upon it so it will get pulled into build in right order
--- meta/recipes-core/bsd-headers/bsd-headers.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-core/bsd-headers/bsd-headers.bb +5 -1
@@ -2,7 +2,8 @@ # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "bsd compatible headers" -LICENSE = "BSD-3-Clause && BSD-2-Clause" +LICENSE = "BSD-3-Clause & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://sys-queue.h;beginline=1;endline=32;md5=c6352b0f03bb448600456547d334b56f" SECTION = "devel" SRC_URI = "file://sys-queue.h \
@@ -24,4 +25,7 @@ do_install() { # # We will skip parsing for non-musl systems # + COMPATIBLE_HOST = ".*-musl.*" +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
Signature · 1 line
2.7.0
PATCH 9/11 fts: Correct LIC_FILES_CHKSUM
In reply to Khem RajIt was using wrong keyword and let it point to section of header file
--- meta/recipes-core/fts/fts.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/fts/fts.bb +1 -1
@@ -4,7 +4,7 @@ DESCRIPTION = "keith bostic's POSIX file tree stream operations library" HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic" LICENSE = "BSD-4-Clause" -LIC_FILES_CHECKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-4-Clause;md5=624d9e67e8ac41a78f6b6c2c55a83a2b" +LIC_FILES_CHKSUM = "file://fts.h;beginline=1;endline=36;md5=2532eddb3d1a21905723a4011ec4e085" SECTION = "libs" SRC_URI = "https://sites.google.com/a/bostic.com/keithbostic/files/fts.tar.gz \
Signature · 1 line
2.7.0
PATCH 10/11 musl: Upgrade to tip of tree
In reply to Khem RajAdd explicit runtime dep on bsd-headers-dev
so we dont miss them in dev images
--- meta/recipes-core/musl/musl_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/musl/musl_git.bb +2 -2
@@ -3,7 +3,7 @@ require musl.inc -SRCREV = "3abb094d19ca4c7c4adcf373d971fb5aa05c5252" +SRCREV = "369b22f9c4aebba2b8fe905db8469b2667572ee1" PV = "1.1.12+git${SRCPV}"
@@ -53,7 +53,7 @@ do_install() { ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd } -RDEPENDS_${PN}-dev = "linux-libc-headers-dev" +RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev" RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev" RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"
Signature · 1 line
2.7.0
PATCH 11/11 libdrm: Refresh patch to match upstream submission
In reply to Khem RajThe version submitted upstream has been updated to this one after feedback
--- ...tests-kms-steal-crtc-Include-sys-select.h.patch | 83 +++++++++++++++++++--- 1 file changed, 73 insertions(+), 10 deletions(-)
meta/recipes-graphics/drm/libdrm/0001-tests-kms-steal-crtc-Include-sys-select.h.patch +73 -10
@@ -1,33 +1,96 @@ -From 46fb5516fb0ab17bcf46a0306a11e8966bb36e14 Mon Sep 17 00:00:00 2001 +From fb53d7a1be116a172b56625f290fcf88b6d158ca Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> -Date: Tue, 29 Dec 2015 22:17:21 +0000 -Subject: [PATCH] tests/kms-steal-crtc: Include sys/select.h +Date: Wed, 20 Jan 2016 05:23:00 +0000 +Subject: [PATCH] tests: Include sys/select.h -Fixes errors e.g. +Used in compliance with POSIX 2001/2008 +Fixes errors e.g. error: implicit declaration of function 'select' -and missing definitions of FD_* defines +and helps with missing definitions of FD_* defines Signed-off-by: Khem Raj <[email protected]> +Reviewed-by: Thierry Reding <[email protected]> --- Upstream-Status: Submitted - tests/kms/kms-steal-crtc.c | 1 + - 1 file changed, 1 insertion(+) + configure.ac | 2 +- + tests/kms/kms-steal-crtc.c | 3 +++ + tests/kms/kms-universal-planes.c | 3 +++ + tests/modetest/modetest.c | 3 +++ + tests/vbltest/vbltest.c | 3 +++ + 5 files changed, 13 insertions(+), 1 deletion(-) +diff --git a/configure.ac b/configure.ac +index 057a846..258e2f6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -53,7 +53,7 @@ AC_USE_SYSTEM_EXTENSIONS + AC_SYS_LARGEFILE + AC_FUNC_ALLOCA + +-AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h]) ++AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h sys/select.h]) + + # Initialize libtool + LT_PREREQ([2.2]) diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c -index 2f7f327..24d70ab 100644 +index 2f7f327..497772e 100644 --- a/tests/kms/kms-steal-crtc.c +++ b/tests/kms/kms-steal-crtc.c -@@ -31,6 +31,7 @@ +@@ -31,6 +31,9 @@ + #include <stdio.h> + #include <string.h> + #include <unistd.h> ++#ifdef HAVE_SYS_SELECT_H ++#include <sys/select.h> ++#endif + + #include <drm_fourcc.h> + +diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c +index 9151231..d8e5fc4 100644 +--- a/tests/kms/kms-universal-planes.c ++++ b/tests/kms/kms-universal-planes.c +@@ -32,6 +32,9 @@ #include <stdio.h> #include <string.h> #include <unistd.h> ++#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> ++#endif #include <drm_fourcc.h> + #include "xf86drm.h" +diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c +index 22e3e81..d5a4062 100644 +--- a/tests/modetest/modetest.c ++++ b/tests/modetest/modetest.c +@@ -55,6 +55,9 @@ + #include <errno.h> + #include <sys/poll.h> + #include <sys/time.h> ++#ifdef HAVE_SYS_SELECT_H ++#include <sys/select.h> ++#endif + + #include "xf86drm.h" + #include "xf86drmMode.h" +diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c +index 1833321..086407e 100644 +--- a/tests/vbltest/vbltest.c ++++ b/tests/vbltest/vbltest.c +@@ -37,6 +37,9 @@ + #include <errno.h> + #include <sys/poll.h> + #include <sys/time.h> ++#ifdef HAVE_SYS_SELECT_H ++#include <sys/select.h> ++#endif + #include "xf86drm.h" + #include "xf86drmMode.h" -- -2.6.4 +2.7.0
Signature · 1 line
2.7.0