summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-extended')
-rw-r--r--yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch53
-rw-r--r--yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch21
-rw-r--r--yocto-poky/meta/recipes-extended/at/at_3.1.18.bb (renamed from yocto-poky/meta/recipes-extended/at/at_3.1.16.bb)11
-rw-r--r--yocto-poky/meta/recipes-extended/bash/bash.inc9
-rw-r--r--yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch169
-rw-r--r--yocto-poky/meta/recipes-extended/bash/bash/run-ptest2
-rw-r--r--yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb4
-rw-r--r--yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am1
-rw-r--r--yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac5
-rw-r--r--yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch33
-rw-r--r--yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb4
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch220
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch20
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch17
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch (renamed from yocto-poky/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch)104
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch (renamed from yocto-poky/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch)0
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb15
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb12
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb4
-rw-r--r--yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc1
-rw-r--r--yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb28
-rw-r--r--yocto-poky/meta/recipes-extended/cups/cups.inc27
-rw-r--r--yocto-poky/meta/recipes-extended/cups/cups/cups.path8
-rw-r--r--yocto-poky/meta/recipes-extended/cups/cups/cups.service10
-rw-r--r--yocto-poky/meta/recipes-extended/cups/cups/cups.socket8
-rw-r--r--yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/ed/ed_0.5.bb7
-rw-r--r--yocto-poky/meta/recipes-extended/ed/ed_1.9.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb (renamed from yocto-poky/meta/recipes-extended/ethtool/ethtool_4.0.bb)4
-rw-r--r--yocto-poky/meta/recipes-extended/findutils/findutils.inc5
-rw-r--r--yocto-poky/meta/recipes-extended/findutils/findutils_4.6.0.bb (renamed from yocto-poky/meta/recipes-extended/findutils/findutils_4.5.14.bb)6
-rw-r--r--yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch23
-rw-r--r--yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch23
-rw-r--r--yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb3
-rw-r--r--yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch81
-rw-r--r--yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch48
-rw-r--r--yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch38
-rw-r--r--yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h40
-rw-r--r--yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb (renamed from yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.16.bb)11
-rw-r--r--yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch154
-rw-r--r--yocto-poky/meta/recipes-extended/grep/grep_2.23.bb (renamed from yocto-poky/meta/recipes-extended/grep/grep_2.21.bb)5
-rw-r--r--yocto-poky/meta/recipes-extended/gzip/gzip.inc7
-rw-r--r--yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch50
-rw-r--r--yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch69
-rw-r--r--yocto-poky/meta/recipes-extended/iptables/iptables_1.6.0.bb (renamed from yocto-poky/meta/recipes-extended/iptables/iptables_1.4.21.bb)10
-rw-r--r--yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch92
-rw-r--r--yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch52
-rw-r--r--yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch37
-rw-r--r--yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb (renamed from yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb)13
-rw-r--r--yocto-poky/meta/recipes-extended/less/less_481.bb (renamed from yocto-poky/meta/recipes-extended/less/less_479.bb)6
-rw-r--r--yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch59
-rw-r--r--yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb22
-rw-r--r--yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb3
-rw-r--r--yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb (renamed from yocto-poky/meta/recipes-extended/libidn/libidn_1.30.bb)7
-rw-r--r--yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch37
-rw-r--r--yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb30
-rw-r--r--yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch62
-rw-r--r--yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch878
-rw-r--r--yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch144
-rw-r--r--yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch38
-rw-r--r--yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch18
-rw-r--r--yocto-poky/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb (renamed from yocto-poky/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb)13
-rw-r--r--yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch62
-rw-r--r--yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch27
-rw-r--r--yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb7
-rw-r--r--yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch387
-rw-r--r--yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb (renamed from yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb)5
-rw-r--r--yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb5
-rw-r--r--yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb5
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch202
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch (renamed from yocto-poky/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch)11
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch69
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch43
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch (renamed from yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch)20
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch147
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch45
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch31
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch394
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch285
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch270
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch73
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch136
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch351
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch67
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch56
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch64
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch45
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch88
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch32
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch32
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch48
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch71
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch29
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch48
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch68
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch28
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch29
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch29
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch43
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch32
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch33
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch (renamed from yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch)17
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch30
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch41
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch43
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch23
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch39
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch61
-rw-r--r--yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb (renamed from yocto-poky/meta/recipes-extended/ltp/ltp_20150420.bb)62
-rw-r--r--yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb4
-rw-r--r--yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb (renamed from yocto-poky/meta/recipes-extended/man-pages/man-pages_4.02.bb)4
-rw-r--r--yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch31
-rw-r--r--yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch105
-rw-r--r--yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch68
-rw-r--r--yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch30
-rw-r--r--yocto-poky/meta/recipes-extended/man/man_1.6g.bb4
-rw-r--r--yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb (renamed from yocto-poky/meta/recipes-extended/mc/mc_4.8.14.bb)7
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch50
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch33
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch55
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch45
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch2
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch45
-rw-r--r--yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb (renamed from yocto-poky/meta/recipes-extended/mdadm/mdadm_3.3.4.bb)20
-rw-r--r--yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb (renamed from yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.2.bb)4
-rw-r--r--yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch100
-rw-r--r--yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch638
-rw-r--r--yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch28
-rw-r--r--yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch363
-rw-r--r--yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb22
-rw-r--r--yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch26
-rw-r--r--yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch36
-rw-r--r--yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb3
-rw-r--r--yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb17
-rw-r--r--yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch68
-rw-r--r--yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch59
-rw-r--r--yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb10
-rw-r--r--yocto-poky/meta/recipes-extended/parted/parted_3.2.bb3
-rw-r--r--yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch1287
-rw-r--r--yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch33
-rw-r--r--yocto-poky/meta/recipes-extended/pax/pax_3.4.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb (renamed from yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb)8
-rw-r--r--yocto-poky/meta/recipes-extended/pigz/pigz.inc2
-rw-r--r--yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch51
-rw-r--r--yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch47
-rw-r--r--yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch68
-rw-r--r--yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb24
-rw-r--r--yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch19
-rw-r--r--yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb (renamed from yocto-poky/meta/recipes-extended/procps/procps_3.3.10.bb)7
-rw-r--r--yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch51
-rw-r--r--yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb8
-rw-r--r--yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch33
-rw-r--r--yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch93
-rw-r--r--yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch75
-rw-r--r--yocto-poky/meta/recipes-extended/quota/quota_4.03.bb (renamed from yocto-poky/meta/recipes-extended/quota/quota_4.02.bb)24
-rw-r--r--yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch43
-rw-r--r--yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service2
-rw-r--r--yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch124
-rw-r--r--yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch34
-rw-r--r--yocto-poky/meta/recipes-extended/shadow/shadow.inc4
-rw-r--r--yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/stat/stat_3.3.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb1
-rw-r--r--yocto-poky/meta/recipes-extended/sudo/files/sudo.pam2
-rw-r--r--yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch31
-rw-r--r--yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb (renamed from yocto-poky/meta/recipes-extended/sudo/sudo_1.8.14p3.bb)8
-rw-r--r--yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch132
-rw-r--r--yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc8
-rw-r--r--yocto-poky/meta/recipes-extended/sysstat/sysstat.inc4
-rw-r--r--yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb (renamed from yocto-poky/meta/recipes-extended/sysstat/sysstat_11.1.5.bb)5
-rw-r--r--yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch19
-rw-r--r--yocto-poky/meta/recipes-extended/tar/tar_1.28.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch31
-rw-r--r--yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb4
-rw-r--r--yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb2
-rw-r--r--yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb25
-rw-r--r--yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb25
-rw-r--r--yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb (renamed from yocto-poky/meta/recipes-extended/tzdata/tzdata_2016a.bb)14
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb6
-rw-r--r--yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch99
-rw-r--r--yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch3
-rw-r--r--yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch3
-rw-r--r--yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb12
-rw-r--r--yocto-poky/meta/recipes-extended/wget/wget.inc5
-rw-r--r--yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch18
-rw-r--r--yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb9
-rw-r--r--yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb8
-rw-r--r--yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch30
-rw-r--r--yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch665
-rw-r--r--yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb (renamed from yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb)20
-rw-r--r--yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch100
-rw-r--r--yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch1
-rw-r--r--yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb9
-rw-r--r--yocto-poky/meta/recipes-extended/xz/xz_5.2.2.bb (renamed from yocto-poky/meta/recipes-extended/xz/xz_5.2.1.bb)4
-rw-r--r--yocto-poky/meta/recipes-extended/zip/zip_3.0.bb3
228 files changed, 9293 insertions, 2622 deletions
diff --git a/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch b/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
new file mode 100644
index 000000000..389af1e07
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
@@ -0,0 +1,53 @@
+From c02354af7f3d9426da31503abfae70952c699a9d Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Fri, 18 Mar 2016 03:23:11 -0400
+Subject: [PATCH] configure: fix with/without selinux
+
+Problem:
+without-selinux doesn't work since WITH_SELINUX is always be defined no
+matter which option is given: with-selinux, without-selinux.
+
+Fix:
+Disable selinux support if without-selinux is given; otherwise check
+libselinux to determine if selinux support should be enabled.
+
+Upstream-Status: Submitted [at@packages.debian.org]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure.ac | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a43419..8c9de62 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -240,10 +240,21 @@ AC_ARG_WITH(daemon_username,
+ AC_SUBST(DAEMON_USERNAME)
+
+ AC_ARG_WITH(selinux,
+-[ --with-selinux Define to run with selinux],
+-AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux]),
+-)
+-AC_CHECK_LIB(selinux, is_selinux_enabled, SELINUXLIB=-lselinux)
++[ --with-selinux Define to run with selinux (default=check)],
++[],
++[with_selinux=check])
++
++if test "x$with_selinux" != xno; then
++ AC_CHECK_LIB([selinux], [is_selinux_enabled],
++ [SELINUXLIB=-lselinux
++ AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux])
++ ],
++ [if test "x$with_selinux" != xcheck; then
++ AC_MSG_FAILURE([--with-selinux is given, but test for selinux failed])
++ fi
++ ]
++ )
++fi
+ AC_SUBST(SELINUXLIB)
+ AC_SUBST(WITH_SELINUX)
+
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch
index 66ff3e1c1..100f8898e 100644
--- a/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch
+++ b/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch
@@ -13,16 +13,23 @@ Upstream-Status: Pending
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Index: at-3.1.12/Makefile.in
-===================================================================
---- at-3.1.12.orig/Makefile.in
-+++ at-3.1.12/Makefile.in
-@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
+---
+ Makefile.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index dd3c2f8..7897e45 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -82,6 +82,8 @@ y.tab.c y.tab.h: parsetime.y
lex.yy.c: parsetime.l
$(LEX) -i parsetime.l
+parsetime.l: y.tab.h
+
- atrun: atrun.in
- configure
+ atd.service: atd.service.in
+ sed -e 's![@]sbindir[@]!$(sbindir)!g' < $< > $@
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/at/at_3.1.16.bb b/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb
index 0512bcb83..93044f53e 100644
--- a/yocto-poky/meta/recipes-extended/at/at_3.1.16.bb
+++ b/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb
@@ -15,7 +15,7 @@ PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
RCONFLICTS_${PN} = "atd"
RREPLACES_${PN} = "atd"
-SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
+SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz;subdir=${BP} \
file://fix_parallel_build_error.patch \
file://posixtm.c \
file://posixtm.h \
@@ -25,13 +25,14 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://makefile-fix-parallel.patch \
file://0001-remove-glibc-assumption.patch \
+ file://configure-fix-with-without-selinux.patch \
"
PAM_SRC_URI = "file://pam.conf.patch \
file://configure-add-enable-pam.patch"
-SRC_URI[md5sum] = "d05da75d9b75d93917ffb16ab48b1e19"
-SRC_URI[sha256sum] = "cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1"
+SRC_URI[md5sum] = "f67a7aab557cd5b4a1311079a08acebe"
+SRC_URI[sha256sum] = "dbd5c8cb8edd53ef467363c3af0391c08769f1dbbd4d5002c59a4cd4cac11d52"
EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-daemon_username=root \
@@ -47,10 +48,10 @@ INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE_${PN} = "atd.service"
-
-do_compile_prepend () {
+copy_sources() {
cp -f ${WORKDIR}/posixtm.[ch] ${S}
}
+do_patch[postfuncs] += "copy_sources"
do_install () {
oe_runmake -e "IROOT=${D}" install
diff --git a/yocto-poky/meta/recipes-extended/bash/bash.inc b/yocto-poky/meta/recipes-extended/bash/bash.inc
index 020409fb6..93ca00b25 100644
--- a/yocto-poky/meta/recipes-extended/bash/bash.inc
+++ b/yocto-poky/meta/recipes-extended/bash/bash.inc
@@ -23,6 +23,9 @@ RDEPENDS_${PN} += "base-files"
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-ptest += "make"
+USERADD_PACKAGES = "${PN}-ptest"
+USERADD_PARAM_${PN}-ptest = "--create-home --user-group test"
+
do_configure_prepend () {
if [ ! -e ${S}/acinclude.m4 ]; then
cat ${S}/aclocal.m4 > ${S}/acinclude.m4
@@ -42,13 +45,15 @@ do_install_append () {
}
do_install_append_class-target () {
# Clean host path in bashbug
- sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
+ sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+ -e "s,-I${WORKDIR}/\S* ,,g" ${D}${bindir}/bashbug
}
do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
cp ${B}/Makefile ${D}${PTEST_PATH}
- sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
+ sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+ -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" ${D}${PTEST_PATH}/Makefile
}
pkg_postinst_${PN} () {
diff --git a/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch b/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
new file mode 100644
index 000000000..7f099ae0c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
@@ -0,0 +1,169 @@
+From 2c30dff8ea8b17ad5ba9881e35ad1eba9c515f13 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 26 Nov 2015 22:09:07 -0500
+Subject: [PATCH] fix run-coproc/run-heredoc/run-execscript/run-test/ failed
+
+FAIL: run-coproc
+update test case:tests/coproc.right, tests/coproc.tests
+git://git.sv.gnu.org/bash.git bash-4.4-testing
+
+FAIL: run-heredoc
+update test case: tests/heredoc.right tests/heredoc3.sub
+git://git.sv.gnu.org/bash.git bash-4.4-testing
+
+FAIL: run-execscript:
+the test suite should not be run as root
+
+FAIL: run-test
+the test suite should not be run as root
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/coproc.right | 5 +----
+ tests/coproc.tests | 30 +++++++++++++++++++++++++-----
+ tests/heredoc.right | 5 ++---
+ tests/heredoc3.sub | 3 ++-
+ tests/run-execscript | 3 ++-
+ tests/run-test | 3 ++-
+ 6 files changed, 34 insertions(+), 15 deletions(-)
+
+diff --git a/tests/coproc.right b/tests/coproc.right
+index 6d9deaa..94b001c 100644
+--- a/tests/coproc.right
++++ b/tests/coproc.right
+@@ -1,11 +1,8 @@
+-84575
+ 63 60
+ a b c
+-84577
+ 63 60
+ flop
+-./coproc.tests: line 22: 84577 Terminated coproc REFLECT { cat -; }
+-84579
++coproc.tests: REFLECT: status 143
+ 63 60
+ FOO
+ 63 60
+diff --git a/tests/coproc.tests b/tests/coproc.tests
+index 8be3563..d347eb7 100644
+--- a/tests/coproc.tests
++++ b/tests/coproc.tests
+@@ -1,6 +1,13 @@
++: ${TMPDIR:=/tmp}
++TMPOUT=${TMPDIR}/coproc-wait-$BASHPID
++
+ coproc { echo a b c; sleep 2; }
+
+-echo $COPROC_PID
++case $COPROC_PID in
++[0-9]*) ;;
++*) echo COPROC_PID not integer ;;
++esac
++
+ echo ${COPROC[@]}
+
+ read LINE <&${COPROC[0]}
+@@ -10,7 +17,11 @@ wait $COPROC_PID
+
+ coproc REFLECT { cat - ; }
+
+-echo $REFLECT_PID
++case $REFLECT_PID in
++[0-9]*) ;;
++*) echo REFLECT_PID not integer ;;
++esac
++
+ echo ${REFLECT[@]}
+
+ echo flop >&${REFLECT[1]}
+@@ -18,12 +29,21 @@ read LINE <&${REFLECT[0]}
+
+ echo $LINE
+
+-kill $REFLECT_PID
+-wait $REFLECT_PID
++{ sleep 1; kill $REFLECT_PID; } &
++wait $REFLECT_PID >$TMPOUT 2>&1 || echo "coproc.tests: REFLECT: status $?"
++grep 'Terminated.*coproc.*REFLECT' < $TMPOUT >/dev/null 2>&1 || {
++ echo "coproc.tests: wait for REFLECT failed" >&2
++}
++rm -f $TMPOUT
++exec 2>&1
+
+ coproc xcase -n -u
+
+-echo $COPROC_PID
++case $COPROC_PID in
++[0-9]*) ;;
++*) echo COPROC_PID not integer ;;
++esac
++
+ echo ${COPROC[@]}
+
+ echo foo >&${COPROC[1]}
+diff --git a/tests/heredoc.right b/tests/heredoc.right
+index 6abaa1f..8df91c5 100644
+--- a/tests/heredoc.right
++++ b/tests/heredoc.right
+@@ -76,15 +76,14 @@ ENDEND
+ end ENDEND
+ hello
+ end hello
+-x star x
+ end x*x
+ helloEND
+ end helloEND
+ hello
+ \END
+ end hello<NL>\END
+-./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF')
+-./heredoc3.sub: line 75: syntax error: unexpected end of file
++./heredoc3.sub: line 75: warning: here-document at line 73 delimited by end-of-file (wanted `EOF')
++./heredoc3.sub: line 76: syntax error: unexpected end of file
+ comsub here-string
+ ./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
+ hi
+diff --git a/tests/heredoc3.sub b/tests/heredoc3.sub
+index 73a111e..9d3d846 100644
+--- a/tests/heredoc3.sub
++++ b/tests/heredoc3.sub
+@@ -49,9 +49,10 @@ hello
+ END
+ echo end hello
+
+-cat <<x*x & touch 'x*x'
++cat <<x*x >/dev/null & touch 'x*x'
+ x star x
+ x*x
++wait $!
+ echo end 'x*x'
+ rm 'x*x'
+
+diff --git a/tests/run-execscript b/tests/run-execscript
+index f97ab21..0d00a1b 100644
+--- a/tests/run-execscript
++++ b/tests/run-execscript
+@@ -5,5 +5,6 @@ echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory"
+ echo "warning: produce diff output, please do not consider this a test failure" >&2
+ echo "warning: if diff output differing only in the location of the bash" >&2
+ echo "warning: binary appears, please do not consider this a test failure" >&2
+-${THIS_SH} ./execscript > /tmp/xx 2>&1
++rm -f /tmp/xx
++su -c "${THIS_SH} ./execscript > /tmp/xx 2>&1" test
+ diff /tmp/xx exec.right && rm -f /tmp/xx
+diff --git a/tests/run-test b/tests/run-test
+index b2482c3..2e8f049 100644
+--- a/tests/run-test
++++ b/tests/run-test
+@@ -1,4 +1,5 @@
+ unset GROUPS UID 2>/dev/null
+
+-${THIS_SH} ./test.tests >/tmp/xx 2>&1
++rm -f /tmp/xx
++su -c "${THIS_SH} ./test.tests >/tmp/xx 2>&1" test
+ diff /tmp/xx test.right && rm -f /tmp/xx
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/bash/bash/run-ptest b/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
index e3f813381..2098fa46b 100644
--- a/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
+++ b/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
@@ -1,2 +1,2 @@
#!/bin/sh
-make -k THIS_SH=/bin/bash BUILD_DIR=. srcdir=. runtest
+make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest
diff --git a/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb b/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
index 811e61c79..4426cf00a 100644
--- a/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
+++ b/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
file://mkbuiltins_have_stringize.patch \
file://build-tests.patch \
file://test-output.patch \
+ file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
file://run-ptest \
"
diff --git a/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb b/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
index 679196be1..d6250a90c 100644
--- a/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
+++ b/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
@@ -18,6 +18,10 @@ SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \
SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
+
S = "${WORKDIR}/${BPN}-4.orig"
inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
index 1d163b6c9..05d389fc7 100644
--- a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
+++ b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -1,5 +1,6 @@
lib_LTLIBRARIES = libbz2.la
+libbz2_la_LDFLAGS = -version-info 1:6:0
libbz2_la_SOURCES = blocksort.c \
huffman.c \
diff --git a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
index 47ee576a8..e2bf1bf11 100644
--- a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
+++ b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -1,12 +1,9 @@
AC_PREREQ([2.57])
-AC_INIT(bzip2, 2.0.5, , libXrender)
+AC_INIT(bzip2, 1.0.6)
AM_INIT_AUTOMAKE(foreign)
AM_MAINTAINER_MODE
-#AM_CONFIG_HEADER(config.h)
-
-# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
diff --git a/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index d7b8c0655..f717d85f4 100644
--- a/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -17,6 +17,8 @@ SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
+UPSTREAM_CHECK_URI = "http://www.bzip.org/downloads.html"
+
PACKAGES =+ "libbz2"
CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
diff --git a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
index 7fd34aa05..c0f7f1674 100644
--- a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
+++ b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
# support for alternatives.
SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot"
S = "${WORKDIR}/git"
+UPSTREAM_CHECK_GITTAGREGEX = "chkconfig-(?P<pver>(\d+(\.\d+)+))"
SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee"
PV = "1.3.59+${SRCPV}"
diff --git a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
new file mode 100644
index 000000000..96d193879
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
@@ -0,0 +1,33 @@
+caddr_t is a legacy BSD type which was rejected by the POSIX standard.
+Use void * instead.
+
+sys/unitstd.h is not needed and moreover its not available on all C library
+implementations e.g. musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: chkconfig-1.3.58/alternatives.c
+===================================================================
+--- chkconfig-1.3.58.orig/alternatives.c
++++ chkconfig-1.3.58/alternatives.c
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
+-#include <sys/unistd.h>
+ #include <unistd.h>
+
+ #define FLAGS_TEST (1 << 0)
+Index: chkconfig-1.3.58/leveldb.c
+===================================================================
+--- chkconfig-1.3.58.orig/leveldb.c
++++ chkconfig-1.3.58/leveldb.c
+@@ -442,7 +442,7 @@ int parseServiceInfo(int fd, char * name
+ fstat(fd, &sb);
+
+ bufstart = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
+- if (bufstart == ((caddr_t) -1)) {
++ if (bufstart == ((void*) -1)) {
+ close(fd);
+ return -1;
+ }
diff --git a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
index 488847ac4..e8390264c 100644
--- a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
+++ b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -16,7 +16,9 @@ PROVIDES += "virtual/update-alternatives"
PR = "r7"
-SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2 \
+ file://replace_caddr_t.patch \
+ "
SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
deleted file mode 100644
index 89cd3cfa5..000000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-cpio: Fix memory overrun on reading improperly created link records
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
-
- * src/copyin.c (get_link_name): New function.
- (list_file, copyin_link): use get_link_name
-
- * tests/symlink-bad-length.at: New file.
- * tests/symlink-long.at: New file.
- * tests/Makefile.am: Add new files.
- * tests/testsuite.at: Likewise.
-
- See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-
-Upstream-Status: Backport
-
-Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
-
-diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c
---- cpio-2.11.orig/src/copyin.c 2010-02-15 18:02:23.000000000 +0800
-+++ cpio-2.11/src/copyin.c 2014-12-08 13:14:04.355547508 +0800
-@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_
- }
-
-
-+static char *
-+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
-+{
-+ off_t n = file_hdr->c_filesize + 1;
-+ char *link_name;
-+
-+ if (n == 0 || n > SIZE_MAX)
-+ {
-+ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
-+ link_name = NULL;
-+ }
-+ else
-+ {
-+ link_name = xmalloc (n);
-+ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-+ link_name[file_hdr->c_filesize] = '\0';
-+ tape_skip_padding (in_file_des, file_hdr->c_filesize);
-+ }
-+ return link_name;
-+}
-+
-+
- static void
- list_file(struct cpio_file_stat* file_hdr, int in_file_des)
- {
-@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
- {
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
-- char *link_name = NULL; /* Name of hard and symbolic links. */
--
-- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
-- link_name[file_hdr->c_filesize] = '\0';
-- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-- long_format (file_hdr, link_name);
-- free (link_name);
-- tape_skip_padding (in_file_des, file_hdr->c_filesize);
-- return;
-+ char *link_name = get_link_name (file_hdr, in_file_des);
-+ if (link_name)
-+ {
-+ long_format (file_hdr, link_name);
-+ free (link_name);
-+ }
- }
- else
-- {
- long_format (file_hdr, file_hdr->c_tar_linkname);
-- return;
-- }
-+ return;
- }
- else
- #endif
-@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_
-
- if (archive_format != arf_tar && archive_format != arf_ustar)
- {
-- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
-- link_name[file_hdr->c_filesize] = '\0';
-- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-- tape_skip_padding (in_file_des, file_hdr->c_filesize);
-+ link_name = get_link_name (file_hdr, in_file_des);
- }
- else
- {
-diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am
---- cpio-2.11.orig/tests/Makefile.am 2010-02-15 18:02:23.000000000 +0800
-+++ cpio-2.11/tests/Makefile.am 2014-12-08 13:14:49.931545727 +0800
-@@ -52,6 +52,8 @@ TESTSUITE_AT = \
- setstat04.at\
- setstat05.at\
- symlink.at\
-+ symlink-bad-length.at\
-+ symlink-long.at\
- version.at
-
- TESTSUITE = $(srcdir)/testsuite
-diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at
---- cpio-2.11.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800
-+++ cpio-2.11/tests/symlink-bad-length.at 2014-12-08 13:17:45.979538847 +0800
-@@ -0,0 +1,49 @@
-+# Process this file with autom4te to create testsuite. -*- Autotest -*-
-+# Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301 USA.
-+
-+# Cpio v2.11 did segfault with badly set symlink length.
-+# References:
-+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-+
-+AT_SETUP([symlink-bad-length])
-+AT_KEYWORDS([symlink-long copyout])
-+
-+AT_DATA([ARCHIVE.base64],
-+[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
-+JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
-+UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
-+])
-+
-+AT_CHECK([
-+base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
-+cpio -ntv < ARCHIVE
-+test $? -eq 2
-+],
-+[0],
-+[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE
-+],[cpio: LINK: stored filename length too big
-+cpio: premature end of file
-+])
-+
-+AT_CLEANUP
-diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at
---- cpio-2.11.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800
-+++ cpio-2.11/tests/symlink-long.at 2014-12-08 13:17:57.219538408 +0800
-@@ -0,0 +1,46 @@
-+# Process this file with autom4te to create testsuite. -*- Autotest -*-
-+# Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301 USA.
-+
-+# Cpio v2.11.90 changed the way symlink name is read from archive.
-+# References:
-+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-+
-+AT_SETUP([symlink-long])
-+AT_KEYWORDS([symlink-long copyout])
-+
-+AT_CHECK([
-+
-+# len(dirname) > READBUFSIZE
-+dirname=
-+for i in {1..52}; do
-+ dirname="xxxxxxxxx/$dirname"
-+ mkdir "$dirname"
-+done
-+ln -s "$dirname" x || AT_SKIP_TEST
-+
-+echo x | cpio -o > ar
-+list=`cpio -tv < ar | sed 's|.*-> ||'`
-+test "$list" = "$dirname" && echo success || echo fail
-+],
-+[0],
-+[success
-+],[2 blocks
-+2 blocks
-+])
-+
-+AT_CLEANUP
-diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at
---- cpio-2.11.orig/tests/testsuite.at 2010-02-15 18:02:23.000000000 +0800
-+++ cpio-2.11/tests/testsuite.at 2014-12-08 13:15:13.515544805 +0800
-@@ -31,6 +31,8 @@ m4_include([version.at])
-
- m4_include([inout.at])
- m4_include([symlink.at])
-+m4_include([symlink-bad-length.at])
-+m4_include([symlink-long.at])
- m4_include([interdir.at])
-
- m4_include([setstat01.at])
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
deleted file mode 100644
index b4d113d3a..000000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: cpio-2.11/gnu/stdio.in.h
-===================================================================
---- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700
-+++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700
-@@ -138,8 +138,10 @@
- /* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
-+#if defined gets
- #undef gets
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
-
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
deleted file mode 100644
index a6b8e82a0..000000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Avoid multiple stat definitions
-Patch taken from cpio mailing list posting 2010-03-19
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
---- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
-+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
-@@ -82,4 +82,6 @@
- #define lstat stat
- #endif
- int lstat ();
-+#ifndef stat
- int stat ();
-+#endif
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch
index b54afb867..5c999197f 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch
@@ -1,28 +1,45 @@
-Description: CVE-2015-1197
- Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197.
- Upstream is dormant or no longer existing. To restore the old
- behaviour use --extract-over-symlinks (Closes: #774669)
- This issue has been discovered by Alexander Cherepanov.
+From dcee489f821c1260a0136fcdfdb6ff4dd11086ac Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 9 Dec 2015 17:58:03 +0200
+Subject: [PATCH] Fix CVE-2015-1197
+
+Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197.
+Upstream is dormant or no longer existing. To restore the old
+behaviour use --extract-over-symlinks (Closes: #774669)
+This issue has been discovered by Alexander Cherepanov.
Author: Vitezslav Cizek <vcizek@suse.cz>
Bug-Debian: https://bugs.debian.org/774669
-Upstream-Status: Backport
-
+Upstream-Status: Pending
+CVE: CVE-2015-1197
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ doc/cpio.1 | 1 +
+ src/copyin.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/extern.h | 1 +
+ src/global.c | 3 +++
+ src/main.c | 7 +++++++
+ 5 files changed, 74 insertions(+)
---- cpio-2.11+dfsg.orig/doc/cpio.1
-+++ cpio-2.11+dfsg/doc/cpio.1
-@@ -22,6 +22,7 @@ cpio \- copy files to and from archives
- [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
- [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse]
- [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command]
-+[\-\-extract\-over\-symlinks]
- [\-\-help] [\-\-version] [pattern...] [< archive]
+diff --git a/doc/cpio.1 b/doc/cpio.1
+index 2a68241..dc4676c 100644
+--- a/doc/cpio.1
++++ b/doc/cpio.1
+@@ -49,6 +49,7 @@ cpio \- copy files to and from archives
+ [\fB\-\-no\-preserve\-owner\fR] [\fB\-\-message=\fIMESSAGE\fR]
+ [\fB\-\-force\-local\fR] [\fB\-\-no\-absolute\-filenames\fR] [\fB\-\-sparse\fR]
+ [\fB\-\-only\-verify\-crc\fR] [\fB\-\-to\-stdout\fR] [\fB\-\-quiet\fR]
++[\fB\-\-extract\-over\-symlinks\fR]
+ [\fB\-\-rsh\-command=\fICOMMAND\fR]
+ [\fIpattern\fR...] [\fB<\fR \fIarchive\fR]
- .B cpio
---- cpio-2.11+dfsg.orig/src/copyin.c
-+++ cpio-2.11+dfsg/src/copyin.c
-@@ -700,6 +700,51 @@ copyin_link (struct cpio_file_stat *file
+diff --git a/src/copyin.c b/src/copyin.c
+index cde911e..053afe7 100644
+--- a/src/copyin.c
++++ b/src/copyin.c
+@@ -695,6 +695,51 @@ copyin_link (struct cpio_file_stat *file_hdr, int in_file_des)
free (link_name);
}
@@ -74,7 +91,7 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
static void
copyin_file (struct cpio_file_stat *file_hdr, int in_file_des)
{
-@@ -1471,6 +1516,23 @@ process_copy_in ()
+@@ -1468,6 +1513,23 @@ process_copy_in ()
{
/* Copy the input file into the directory structure. */
@@ -98,18 +115,22 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
/* Do we need to rename the file? */
if (rename_flag || rename_batch_file)
{
---- cpio-2.11+dfsg.orig/src/extern.h
-+++ cpio-2.11+dfsg/src/extern.h
-@@ -95,6 +95,7 @@ extern char input_is_special;
+diff --git a/src/extern.h b/src/extern.h
+index e27d662..d864bde 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -96,6 +96,7 @@ extern char input_is_special;
extern char output_is_special;
extern char input_is_seekable;
extern char output_is_seekable;
+extern bool extract_over_symlinks;
extern int (*xstat) ();
extern void (*copy_function) ();
-
---- cpio-2.11+dfsg.orig/src/global.c
-+++ cpio-2.11+dfsg/src/global.c
+ extern char *change_directory_option;
+diff --git a/src/global.c b/src/global.c
+index 57e505a..336fce4 100644
+--- a/src/global.c
++++ b/src/global.c
@@ -187,6 +187,9 @@ bool to_stdout_option = false;
/* The name this program was run with. */
char *program_name;
@@ -120,19 +141,19 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
/* A pointer to either lstat or stat, depending on whether
dereferencing of symlinks is done for input files. */
int (*xstat) ();
---- cpio-2.11+dfsg.orig/src/main.c
-+++ cpio-2.11+dfsg/src/main.c
-@@ -57,7 +57,8 @@ enum cpio_options {
- FORCE_LOCAL_OPTION,
+diff --git a/src/main.c b/src/main.c
+index a13861f..87cb309 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -59,6 +59,7 @@ enum cpio_options {
DEBUG_OPTION,
BLOCK_SIZE_OPTION,
-- TO_STDOUT_OPTION
-+ TO_STDOUT_OPTION,
-+ EXTRACT_OVER_SYMLINKS
- };
-
- const char *program_authors[] =
-@@ -222,6 +223,8 @@ static struct argp_option options[] = {
+ TO_STDOUT_OPTION,
++ EXTRACT_OVER_SYMLINKS,
+ RENUMBER_INODES_OPTION,
+ IGNORE_DEVNO_OPTION,
+ DEVICE_INDEPENDENT_OPTION
+@@ -243,6 +244,8 @@ static struct argp_option options[] = {
N_("Create leading directories where needed"), GRID+1 },
{"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0,
N_("Do not change the ownership of the files"), GRID+1 },
@@ -141,14 +162,17 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
{"unconditional", 'u', NULL, 0,
N_("Replace all files unconditionally"), GRID+1 },
{"sparse", SPARSE_OPTION, NULL, 0,
-@@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als
+@@ -432,6 +435,10 @@ crc newc odc bin ustar tar (all-caps also recognized)"), arg));
no_chown_flag = true;
break;
-+ case EXTRACT_OVER_SYMLINKS: /* --extract-over-symlinks */
++ case EXTRACT_OVER_SYMLINKS: /* --extract-over-symlinks */
+ extract_over_symlinks = true;
+ break;
+
case 'o': /* Copy-out mode. */
if (copy_function != 0)
- error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
+ USAGE_ERROR ((0, 0, _("Mode already defined")));
+--
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch
index 6ae213942..6ae213942 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
index 49a7cf52a..a31573510 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -1,4 +1,5 @@
Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+CVE: CVE-2010-0624
This patch avoids heap overflow reported by :
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb b/yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb
deleted file mode 100644
index c5d92bfaa..000000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-include cpio_v2.inc
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
-PR = "r5"
-
-SRC_URI += "file://remove-gets.patch \
- file://fix-memory-overrun.patch \
- file://cpio-CVE-2015-1197.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
-SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb b/yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb
new file mode 100644
index 000000000..e7439996b
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb
@@ -0,0 +1,12 @@
+include cpio_v2.inc
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0001-Fix-CVE-2015-1197.patch \
+ "
+
+SRC_URI[md5sum] = "fc207561a86b63862eea4b8300313e86"
+SRC_URI[sha256sum] = "08a35e92deb3c85d269a0059a27d4140a9667a6369459299d08c17f713a92e73"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb b/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb
index 3f97dbe2c..624906b13 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
PR = "r4"
-SRC_URI += "file://m4extensions.patch \
+SRC_URI += " \
+ file://statdef.patch \
+ file://m4extensions.patch \
file://avoid_heap_overflow.patch \
file://fix-memory-overrun.patch \
"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc b/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
index 8520ff267..1bdc6176c 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
@@ -7,7 +7,6 @@ SECTION = "base"
DEPENDS = "texinfo-native"
SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
- file://statdef.patch \
"
inherit autotools gettext texinfo
diff --git a/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb b/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
index c0ffe3316..3bd3f9367 100644
--- a/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
+++ b/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
@@ -18,6 +18,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582"
SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88be3fa33"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cracklib/files/cracklib/"
+UPSTREAM_CHECK_REGEX = "/cracklib/(?P<pver>(\d+[\.\-_]*)+)/"
+
inherit autotools gettext pythonnative python-dir
do_install_append_class-target() {
@@ -26,20 +29,19 @@ do_install_append_class-target() {
do_install_append() {
src_dir="${D}${base_libdir}/${PYTHON_DIR}/site-packages"
- rm -f $src_dir/*.pyo
- rm -f $src_dir/test_cracklib.py
- # Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
- install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
- mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
- rm -fr ${D}${base_libdir}/${PYTHON_DIR}
+ rm -f $src_dir/test_cracklib.py*
+
+ if [ "${base_libdir}" != "${libdir}" ] ; then
+ # Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
+ install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
+ mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
+ rm -fr ${D}${base_libdir}/${PYTHON_DIR}
+ fi
}
BBCLASSEXTEND = "native nativesdk"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py \
- ${PYTHON_SITEPACKAGES_DIR}/_cracklib.so \
- "
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/_cracklib.so"
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a \
- ${PYTHON_SITEPACKAGES_DIR}/_cracklib.la \
- "
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py* \
+ ${PYTHON_SITEPACKAGES_DIR}/_cracklib.*"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a"
diff --git a/yocto-poky/meta/recipes-extended/cups/cups.inc b/yocto-poky/meta/recipes-extended/cups/cups.inc
index 2c34da98d..4b2d21409 100644
--- a/yocto-poky/meta/recipes-extended/cups/cups.inc
+++ b/yocto-poky/meta/recipes-extended/cups/cups.inc
@@ -3,15 +3,15 @@ SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2"
DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
-SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
+SRC_URI = "https://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
- file://cups.socket \
- file://cups.path \
- file://cups.service \
"
+UPSTREAM_CHECK_URI = "http://www.cups.org/software.php"
+UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar"
+
LEAD_SONAME = "libcupsdriver.so"
CLEANBROKEN = "1"
@@ -21,13 +21,15 @@ inherit autotools-brokensep binconfig useradd systemd
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system lpadmin"
-SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
+SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket org.cups.cups-lpd@.service"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
+PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
EXTRA_OECONF = " \
@@ -75,13 +77,6 @@ do_install () {
rm -rf ${D}${sysconfdir}/init.d/
rm -rf ${D}${sysconfdir}/rc*
fi
-
- # Install systemd unit files
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
}
python do_package_append() {
@@ -106,14 +101,6 @@ FILES_${PN}-lib = "${libdir}/libcups.so.*"
FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
-FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
- ${libdir}/cups/cgi-bin/.debug \
- ${libdir}/cups/filter/.debug \
- ${libdir}/cups/monitor/.debug \
- ${libdir}/cups/notifier/.debug \
- ${libdir}/cups/daemon/.debug \
- "
-
#package the html for the webgui inside the main packages (~1MB uncompressed)
FILES_${PN} += "${datadir}/doc/cups/images \
diff --git a/yocto-poky/meta/recipes-extended/cups/cups/cups.path b/yocto-poky/meta/recipes-extended/cups/cups/cups.path
deleted file mode 100644
index de8cc57c2..000000000
--- a/yocto-poky/meta/recipes-extended/cups/cups/cups.path
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=CUPS Printer Service Spool
-
-[Path]
-PathExistsGlob=/var/spool/cups/d*
-
-[Install]
-WantedBy=multi-user.target
diff --git a/yocto-poky/meta/recipes-extended/cups/cups/cups.service b/yocto-poky/meta/recipes-extended/cups/cups/cups.service
deleted file mode 100644
index 7d3e83986..000000000
--- a/yocto-poky/meta/recipes-extended/cups/cups/cups.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=CUPS Printing Service
-
-[Service]
-ExecStart=@SBINDIR@/cupsd -f
-PrivateTmp=true
-
-[Install]
-Also=cups.socket cups.path
-WantedBy=printer.target
diff --git a/yocto-poky/meta/recipes-extended/cups/cups/cups.socket b/yocto-poky/meta/recipes-extended/cups/cups/cups.socket
deleted file mode 100644
index 33148705d..000000000
--- a/yocto-poky/meta/recipes-extended/cups/cups/cups.socket
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=CUPS Printing Service Sockets
-
-[Socket]
-ListenStream=/var/run/cups/cups.sock
-
-[Install]
-WantedBy=sockets.target
diff --git a/yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb b/yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb
deleted file mode 100644
index bad73b34f..000000000
--- a/yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
-
-SRC_URI[md5sum] = "f5c847d9a4fac6c4c66fb0526a7afaae"
-SRC_URI[sha256sum] = "e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd"
diff --git a/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb b/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb
new file mode 100644
index 000000000..aef211d91
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
+
+SRC_URI[md5sum] = "62b8fafd590e75f72316915790b0850a"
+SRC_URI[sha256sum] = "36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3"
diff --git a/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb b/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb
index 143e63654..e2df13f4b 100644
--- a/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb
+++ b/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb
@@ -15,7 +15,6 @@ inherit autotools texinfo
EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
-CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
-CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
-
-
+CONFIGUREOPTS_remove = "--disable-dependency-tracking"
+CONFIGUREOPTS_remove = "--disable-silent-rules"
+EXTRA_OECONF_remove = "--disable-static"
diff --git a/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb b/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb
index 8e94eedea..f2ec42ad1 100644
--- a/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb
+++ b/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb
@@ -16,6 +16,8 @@ SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz"
SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d"
SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
inherit texinfo
do_configure() {
diff --git a/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.0.bb b/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb
index 13f2b1cf5..95df784c4 100644
--- a/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.0.bb
+++ b/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb
@@ -11,8 +11,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
file://avoid_parallel_tests.patch \
"
-SRC_URI[md5sum] = "0a1c78787c7dcf077016ed86372a472f"
-SRC_URI[sha256sum] = "e200516727cc9583e8b63fd6e72f667f9ed41bb4f0577ff4803b60c64cfd1dbc"
+SRC_URI[md5sum] = "5b55f7cd76e901dfc2738ac22cab96ca"
+SRC_URI[sha256sum] = "f84226db8dd18afaf91d8d00f5cb8f87ec3d7f787d2a3605de08d6dfa95ab8ef"
inherit autotools ptest
RDEPENDS_${PN}-ptest += "make"
diff --git a/yocto-poky/meta/recipes-extended/findutils/findutils.inc b/yocto-poky/meta/recipes-extended/findutils/findutils.inc
index 37c84cc59..bfedf874b 100644
--- a/yocto-poky/meta/recipes-extended/findutils/findutils.inc
+++ b/yocto-poky/meta/recipes-extended/findutils/findutils.inc
@@ -6,10 +6,9 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/"
BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
SECTION = "console/utils"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
-SRC_URI = "ftp://alpha.gnu.org/gnu/${BPN}/${BP}.tar.gz"
-
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives upstream-version-is-even
ALTERNATIVE_${PN} = "find xargs"
ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-extended/findutils/findutils_4.5.14.bb b/yocto-poky/meta/recipes-extended/findutils/findutils_4.6.0.bb
index a58a82f0e..072d3b3c0 100644
--- a/yocto-poky/meta/recipes-extended/findutils/findutils_4.5.14.bb
+++ b/yocto-poky/meta/recipes-extended/findutils/findutils_4.6.0.bb
@@ -3,13 +3,13 @@ require findutils.inc
# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
+
DEPENDS = "bison-native"
SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
-SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66"
-SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
+SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1"
+SRC_URI[sha256sum] = "ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d"
# http://savannah.gnu.org/bugs/?27299
CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
diff --git a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch
deleted file mode 100644
index aaedc88aa..000000000
--- a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Backport
-
-
-http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7406
-
-Hand applied change to util.c. Fix was for cups-filters but also applied to foomatic-filters.
-
-CVE: CVE-2015-8327
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: util.c
-===================================================================
---- a/util.c
-+++ b/util.c
-@@ -31,7 +31,7 @@
- #include <assert.h>
-
-
--const char* shellescapes = "|;<>&!$\'\"#*?()[]{}";
-+const char* shellescapes = "|;<>&!$\'\"`#*?()[]{}";
-
- const char * temp_dir()
- {
diff --git a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch
deleted file mode 100644
index dc973c459..000000000
--- a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Backport
-
-
-http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7419
-
-Hand applied change to util.c. Fix was for cups-filters but also applied to foomatic-filters.
-
-CVE: CVE-2015-8560
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: util.c
-===================================================================
---- a/util.c
-+++ b/util.c
-@@ -31,7 +31,7 @@
- #include <assert.h>
-
-
--const char* shellescapes = "|<>&!$\'\"#*?()[]{}";
-+const char* shellescapes = "|;<>&!$\'\"#*?()[]{}";
-
- const char * temp_dir()
- {
diff --git a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
index 58ef1f5b0..0cffedd66 100644
--- a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
+++ b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
@@ -17,13 +17,11 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca
SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
-SRC_URI += "file://CVE-2015-8560.patch \
- file://CVE-2015-8327.patch \
- "
-
SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896"
SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3"
+UPSTREAM_CHECK_REGEX = "foomatic-filters-(?P<pver>((\d|\d\d)\.*)+)\.tar\.gz"
+
inherit autotools pkgconfig
EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops"
diff --git a/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb b/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
index c7af4a9b7..7c92bded3 100644
--- a/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
+++ b/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -26,9 +26,8 @@ inherit autotools gettext texinfo update-alternatives
PACKAGES += "gawk-common pgawk"
FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
-FILES_gawk-common += "${datadir}/awk/* ${libdir}/gawk/awk/*"
+FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
FILES_pgawk = "${bindir}/pgawk*"
-FILES_${PN}-dbg += "${libdir}/gawk/awk/.debug"
ALTERNATIVE_${PN} = "awk"
ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
diff --git a/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb b/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb
index d1a88e45a..6ca7f3ef4 100644
--- a/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb
+++ b/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb
@@ -26,7 +26,6 @@ inherit autotools gettext texinfo update-alternatives
FILES_${PN} += "${datadir}/awk"
FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
-FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
ALTERNATIVE_${PN} = "awk"
ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch b/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch
new file mode 100644
index 000000000..d586a1d6d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch
@@ -0,0 +1,81 @@
+From 1d19998091154f89b8294e4594a05986b4c2f822 Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Wed, 13 Jan 2016 02:08:42 -0500
+Subject: [PATCH 1/2] Bug 696497: Fix support for building with no jbig2
+ decoder
+
+Author: Chris Liddell <chris.liddell@artifex.com>
+
+Upstream-Status: Backport
+http://bugs.ghostscript.com/show_bug.cgi?id=696497
+http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0f5a975
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/lib.mak | 9 +++++++++
+ psi/int.mak | 23 ++++++++++++++++++-----
+ 2 files changed, 27 insertions(+), 5 deletions(-)
+
+diff --git a/base/lib.mak b/base/lib.mak
+index 241df2f..daa7056 100644
+--- a/base/lib.mak
++++ b/base/lib.mak
+@@ -1732,6 +1732,10 @@ $(GLD)sjbig2_jbig2dec.dev : $(LIB_MAK) $(ECHOGS_XE) \
+ $(SETMOD) $(GLD)sjbig2_jbig2dec $(sjbig2_jbig2dec)
+ $(ADDMOD) $(GLD)sjbig2_jbig2dec -include $(GLD)jbig2dec.dev
+
++$(GLD)sjbig2_.dev : $(LIB_MAK) $(ECHOGS_XE) \
++ $(LIB_MAK) $(MAKEDIRS)
++ $(SETMOD) $(GLD)sjbig2_
++
+ # jbig2dec.dev is defined in jbig2.mak
+
+ $(GLOBJ)sjbig2.$(OBJ) : $(GLSRC)sjbig2.c $(AK) \
+@@ -1739,6 +1743,11 @@ $(GLOBJ)sjbig2.$(OBJ) : $(GLSRC)sjbig2.c $(AK) \
+ $(sjbig2_h) $(strimpl_h) $(MAKEDIRS)
+ $(GLJBIG2CC) $(GLO_)sjbig2.$(OBJ) $(C_) $(GLSRC)sjbig2.c
+
++$(GLOBJ)snojbig2.$(OBJ) : $(GLSRC)snojbig2.c $(AK) \
++ $(stdint__h) $(memory__h) $(stdio__h) $(gserrors_h) $(gdebug_h) \
++ $(strimpl_h) $(LIB_MAK) $(MAKEDIRS)
++ $(GLJBIG2CC) $(GLO_)snojbig2.$(OBJ) $(C_) $(GLSRC)snojbig2.c
++
+ # luratech version
+ sjbig2_luratech=$(GLOBJ)sjbig2_luratech.$(OBJ)
+
+diff --git a/psi/int.mak b/psi/int.mak
+index 6149a3b..f9d667d 100644
+--- a/psi/int.mak
++++ b/psi/int.mak
+@@ -1254,11 +1254,24 @@ $(PSOBJ)zfaes.$(OBJ) : $(PSSRC)zfaes.c $(OP) $(memory__h)\
+ # this can be turned on and off with a FEATURE_DEV
+
+ fjbig2_=$(PSOBJ)zfjbig2_$(JBIG2_LIB).$(OBJ)
+-$(PSD)jbig2.dev : $(INT_MAK) $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
+- $(MAKEDIRS)
+- $(SETMOD) $(PSD)jbig2 $(fjbig2_)
+- $(ADDMOD) $(PSD)jbig2 -include $(GLD)sjbig2
+- $(ADDMOD) $(PSD)jbig2 -oper zfjbig2
++
++$(PSD)jbig2_jbig2dec.dev : $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
++ $(INT_MAK) $(MAKEDIRS)
++ $(SETMOD) $(PSD)jbig2_jbig2dec $(fjbig2_)
++ $(ADDMOD) $(PSD)jbig2_jbig2dec -include $(GLD)sjbig2
++ $(ADDMOD) $(PSD)jbig2_jbig2dec -oper zfjbig2
++
++$(PSD)jbig2_luratech.dev : $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
++ $(INT_MAK) $(MAKEDIRS)
++ $(SETMOD) $(PSD)jbig2_luratech $(fjbig2_)
++ $(ADDMOD) $(PSD)jbig2_luratech -include $(GLD)sjbig2
++ $(ADDMOD) $(PSD)jbig2_luratech -oper zfjbig2
++
++$(PSD)jbig2_.dev : $(ECHOGS_XE) $(INT_MAK) $(MAKEDIRS)
++ $(SETMOD) $(PSD)jbig2_
++
++$(PSD)jbig2.dev : $(PSD)jbig2_$(JBIG2_LIB).dev $(INT_MAK) $(MAKEDIRS)
++ $(CP_) $(PSD)jbig2_$(JBIG2_LIB).dev $(PSD)jbig2.dev
+
+ $(PSOBJ)zfjbig2_jbig2dec.$(OBJ) : $(PSSRC)zfjbig2.c $(OP) $(memory__h)\
+ $(gsstruct_h) $(gstypes_h) $(ialloc_h) $(idict_h) $(ifilter_h)\
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch b/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch
new file mode 100644
index 000000000..fcfc479fb
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch
@@ -0,0 +1,48 @@
+From 3b43f93ec02611c4d554612953f5b64765b8683b Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Wed, 13 Jan 2016 02:14:55 -0500
+Subject: [PATCH 2/2] Bug 696497 (part 2): fix support for building with a JPX
+ decoder
+
+Author: Chris Liddell <chris.liddell@artifex.com>
+
+Upstream-Status: Backport
+http://bugs.ghostscript.com/show_bug.cgi?id=696497
+http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0f5a975
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/lib.mak | 3 +++
+ psi/int.mak | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/base/lib.mak b/base/lib.mak
+index daa7056..8853dd5 100644
+--- a/base/lib.mak
++++ b/base/lib.mak
+@@ -1774,6 +1774,9 @@ $(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \
+ $(gdebug_h) $(strimpl_h) $(sjpx_h) $(MAKEDIRS)
+ $(GLJASCC) $(GLO_)sjpx.$(OBJ) $(C_) $(GLSRC)sjpx.c
+
++$(GLD)sjpx_.dev : $(LIB_MAK) $(ECHOGS_XE) $(LIB_MAK) $(MAKEDIRS)
++ $(SETMOD) $(GLD)sjpx_
++
+ # luratech version
+ sjpx_luratech=$(GLOBJ)sjpx_luratech.$(OBJ)
+ $(GLD)sjpx_luratech.dev : $(LIB_MAK) $(ECHOGS_XE) \
+diff --git a/psi/int.mak b/psi/int.mak
+index f9d667d..db01b65 100644
+--- a/psi/int.mak
++++ b/psi/int.mak
+@@ -1290,6 +1290,9 @@ $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev\
+ $(MAKEDIRS)
+ $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev
+
++$(PSD)jpx_.dev : $(ECHOGS_XE) $(INT_MAK) $(MAKEDIRS)
++ $(SETMOD) $(PSD)jpx_
++
+ fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ)
+
+ $(PSOBJ)zfjpx.$(OBJ) : $(PSSRC)zfjpx.c $(OP) $(memory__h)\
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
new file mode 100644
index 000000000..b445a6c9e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
@@ -0,0 +1,38 @@
+From 5ef8b85bc98f3bd9a15d5f47e24d3e23ae27c265 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 18 Jan 2016 01:00:30 -0500
+Subject: [PATCH] configure.ac: do not check local png source
+
+In oe-core, it did not need to compile local libpng
+source in ghostscript, so do not check local png
+source, and directly check the existance of shared
+libpng library.
+
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ab30a97..b762fd7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -955,11 +955,11 @@ AC_SUBST(ZLIBDIR)
+ AC_SUBST(FT_SYS_ZLIB)
+
+ dnl png for the png output device; it also requires zlib
+-LIBPNGDIR=src
++LIBPNGDIR=$srcdir/libpng
+ PNGDEVS=''
+ PNGDEVS_ALL='png48 png16m pnggray pngmono png256 png16 pngalpha'
+ AC_MSG_CHECKING([for local png library source])
+-if test -f $srcdir/libpng/pngread.c; then
++if false; then
+ AC_MSG_RESULT([yes])
+ SHARE_LIBPNG=0
+ LIBPNGDIR=$srcdir/libpng
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h
new file mode 100644
index 000000000..3ec810168
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 4
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.16.bb b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb
index d584c49b0..d4222c773 100644
--- a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.16.bb
+++ b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb
@@ -13,13 +13,16 @@ SECTION = "console/utils"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
-DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
-DEPENDS_class-native = ""
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
+DEPENDS_class-native = "libpng-native"
SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \
file://ghostscript-9.15-parallel-make.patch \
file://ghostscript-9.16-Werror-return-type.patch \
file://png_mak.patch \
+ file://0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch \
+ file://0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch \
+ file://do-not-check-local-libpng-source.patch \
"
SRC_URI = "${SRC_URI_BASE} \
@@ -34,8 +37,8 @@ SRC_URI_class-native = "${SRC_URI_BASE} \
file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
"
-SRC_URI[md5sum] = "829319325bbdb83f5c81379a8f86f38f"
-SRC_URI[sha256sum] = "746d77280cca8afdd3d4c2c1389e332ed9b0605bd107bcaae1d761b061d1a68d"
+SRC_URI[md5sum] = "33a47567d7a591c00a253caddd12a88a"
+SRC_URI[sha256sum] = "5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b"
EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
--with-fontpath=${datadir}/fonts \
diff --git a/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
index 059d0687b..721f2a0a6 100644
--- a/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
+++ b/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
@@ -10,6 +10,7 @@ http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667
Upstream-Status: Inappropriate [other]
This version of GNU Grep has been abandoned upstream and they are no longer
accepting patches. This is not a backport.
+CVE: CVE-2012-5667
Signed-off-by Ming Liu <ming.liu@windriver.com>
---
diff --git a/yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch b/yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch
deleted file mode 100644
index e88a9880f..000000000
--- a/yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Upstream-Status: Backport
-
-Backport patch to fix CVE-2015-1345.
-http://git.savannah.gnu.org/cgit/grep.git/commit/?id=83a95bd
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001
-From: Yuliy Pisetsky <ypisetsky@fb.com>
-Date: Thu, 1 Jan 2015 15:36:55 -0800
-Subject: [PATCH] grep -F: fix a heap buffer (read) overrun
-
-grep's read buffer is often filled to its full size, except when
-reading the final buffer of a file. In that case, the number of
-bytes read may be far less than the size of the buffer. However, for
-certain unusual pattern/text combinations, grep -F would mistakenly
-examine bytes in that uninitialized region of memory when searching
-for a match. With carefully chosen inputs, one can cause grep -F to
-read beyond the end of that buffer altogether. This problem arose via
-commit v2.18-90-g73893ff with the introduction of a more efficient
-heuristic using what is now the memchr_kwset function. The use of
-that function in bmexec_trans could leave TP much larger than EP,
-and the subsequent call to bm_delta2_search would mistakenly access
-beyond end of the main input read buffer.
-
-* src/kwset.c (bmexec_trans): When TP reaches or exceeds EP,
-do not call bm_delta2_search.
-* tests/kwset-abuse: New file.
-* tests/Makefile.am (TESTS): Add it.
-* THANKS.in: Update.
-* NEWS (Bug fixes): Mention it.
-
-Prior to this patch, this command would trigger a UMR:
-
- printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0)
-
- Use of uninitialised value of size 8
- at 0x4142BE: bmexec_trans (kwset.c:657)
- by 0x4143CA: bmexec (kwset.c:678)
- by 0x414973: kwsexec (kwset.c:848)
- by 0x414DC4: Fexecute (kwsearch.c:128)
- by 0x404E2E: grepbuf (grep.c:1238)
- by 0x4054BF: grep (grep.c:1417)
- by 0x405CEB: grepdesc (grep.c:1645)
- by 0x405EC1: grep_command_line_arg (grep.c:1692)
- by 0x4077D4: main (grep.c:2570)
-
-See the accompanying test for how to trigger the heap buffer overrun.
-
-Thanks to Nima Aghdaii for testing and finding numerous
-ways to break early iterations of this patch.
----
- NEWS | 5 +++++
- THANKS.in | 1 +
- src/kwset.c | 2 ++
- tests/Makefile.am | 1 +
- tests/kwset-abuse | 32 ++++++++++++++++++++++++++++++++
- 5 files changed, 41 insertions(+)
- create mode 100755 tests/kwset-abuse
-
-diff --git a/NEWS b/NEWS
-index 975440d..3835d8d 100644
---- a/NEWS
-+++ b/NEWS
-@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*-
-
- * Noteworthy changes in release ?.? (????-??-??) [?]
-
-+** Bug fixes
-+
-+ grep no longer reads from uninitialized memory or from beyond the end
-+ of the heap-allocated input buffer.
-+
-
- * Noteworthy changes in release 2.21 (2014-11-23) [stable]
-
-diff --git a/THANKS.in b/THANKS.in
-index aeaf516..624478d 100644
---- a/THANKS.in
-+++ b/THANKS.in
-@@ -62,6 +62,7 @@ Michael Aichlmayr mikla@nx.com
- Miles Bader miles@ccs.mt.nec.co.jp
- Mirraz Mirraz mirraz1@rambler.ru
- Nelson H. F. Beebe beebe@math.utah.edu
-+Nima Aghdaii naghdaii@fb.com
- Olaf Kirch okir@ns.lst.de
- Paul Kimoto kimoto@spacenet.tn.cornell.edu
- PĂ©ter Radics mitchnull@gmail.com
-diff --git a/src/kwset.c b/src/kwset.c
-index 4003c8d..376f7c3 100644
---- a/src/kwset.c
-+++ b/src/kwset.c
-@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
- if (! tp)
- return -1;
- tp++;
-+ if (ep <= tp)
-+ break;
- }
- }
- }
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 2cba2cd..0508cd2 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -75,6 +75,7 @@ TESTS = \
- inconsistent-range \
- invalid-multibyte-infloop \
- khadafy \
-+ kwset-abuse \
- long-line-vs-2GiB-read \
- match-lines \
- max-count-overread \
-diff --git a/tests/kwset-abuse b/tests/kwset-abuse
-new file mode 100755
-index 0000000..6d8ec0c
---- /dev/null
-+++ b/tests/kwset-abuse
-@@ -0,0 +1,32 @@
-+#! /bin/sh
-+# Evoke a segfault in a hard-to-reach code path of kwset.c.
-+# This bug affected grep versions 2.19 through 2.21.
-+#
-+# Copyright (C) 2015 Free Software Foundation, Inc.
-+#
-+# This program is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+. "${srcdir=.}/init.sh"; path_prepend_ ../src
-+
-+fail=0
-+
-+# This test case chooses a haystack of size 260,000, since prodding
-+# with gdb showed a reallocation slightly larger than that in fillbuf.
-+# To reach the buggy code, the needle must have length < 1/11 that of
-+# the haystack, and 10,000 is a nice round number that fits the bill.
-+printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0)
-+
-+test $? = 1 || fail=1
-+
-+Exit $fail
---
-2.4.1
-
diff --git a/yocto-poky/meta/recipes-extended/grep/grep_2.21.bb b/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb
index c51147b57..13ff32dd8 100644
--- a/yocto-poky/meta/recipes-extended/grep/grep_2.21.bb
+++ b/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb
@@ -7,11 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://grep-fix-CVE-2015-1345.patch \
"
-SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a"
-SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
+SRC_URI[md5sum] = "f46aa9d0d2577b9212a104348a286787"
+SRC_URI[sha256sum] = "54fc478ee1ce17780109820ef30730c9e18715a949f7d5c6afc673adb2a56ecf"
inherit autotools gettext texinfo
diff --git a/yocto-poky/meta/recipes-extended/gzip/gzip.inc b/yocto-poky/meta/recipes-extended/gzip/gzip.inc
index 58e5e0c53..6e8188347 100644
--- a/yocto-poky/meta/recipes-extended/gzip/gzip.inc
+++ b/yocto-poky/meta/recipes-extended/gzip/gzip.inc
@@ -6,8 +6,10 @@ SECTION = "console/utils"
# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
inherit autotools texinfo
+export DEFS="NO_ASM"
EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep"
+EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes "
do_install_append () {
if [ "${base_bindir}" != "${bindir}" ]; then
@@ -20,6 +22,11 @@ do_install_append () {
fi
}
+do_install_append_libc-musl () {
+ rm ${D}${libdir}/charset.alias
+ rmdir ${D}${libdir}
+}
+
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb b/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
index 8267fd902..ec3d26f42 100644
--- a/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
+++ b/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
@@ -21,7 +21,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz "
SRC_URI[md5sum] = "213efdbe7471fad3408198918e164354"
SRC_URI[sha256sum] = "ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee"
-EXTRA_OEMAKE += 'STRIP="echo"'
+EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"'
inherit update-alternatives
diff --git a/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb b/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
index 6b636ed08..26b88c9e8 100644
--- a/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
+++ b/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -17,4 +17,4 @@ CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000"
# Let's define our own subset to test, we can later add a on-target kernel build even!
-DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date dmesg parselogs"
+DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date parselogs"
diff --git a/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
index 563260d3b..ad1407c7a 100644
--- a/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
+++ b/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
@@ -16,4 +16,5 @@ IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
index ab609e27e..b711b7aa3 100644
--- a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
+++ b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
@@ -1,47 +1,37 @@
-From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 17 Mar 2013 11:21:35 -0700
-Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
+[PATCH] configure: Add option to enable/disable libnfnetlink
This changes the configure behaviour from autodetecting
for libnfnetlink to having an option to disable it explicitly
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
Upstream-Status: Pending
----
- configure.ac | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index ba616ab..ce2d315 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq],
- AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
- [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
- [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur iptables-1.6.0-old/configure.ac iptables-1.6.0/configure.ac
+--- iptables-1.6.0-old/configure.ac 2015-12-28 18:40:35.255417976 +0200
++++ iptables-1.6.0/configure.ac 2015-12-29 13:01:12.388840200 +0200
+@@ -63,6 +63,9 @@
+ AC_ARG_ENABLE([nftables],
+ AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]),
+ [enable_nftables="$enableval"], [enable_nftables="yes"])
+AC_ARG_ENABLE([libnfnetlink],
-+ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
-+ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
++ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
++ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
libiptc_LDFLAGS2="";
AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
-@@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"])
- AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
- AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
+@@ -123,9 +126,10 @@
+ AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool))
+ fi
-PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
- [nfnetlink=1], [nfnetlink=0])
-AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
+AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
-+ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
-+ ])
-+
++ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
++ ])
+AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"])
- regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
- -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
---
-1.7.9.5
-
+ if test "x$enable_nftables" = "xyes"; then
+ PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
index 7a003d912..f1f85a6fa 100644
--- a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
+++ b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
@@ -1,81 +1,41 @@
-From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 6 Apr 2015 20:47:29 -0700
-Subject: [PATCH] fix build with musl
+[PATCH] fix build with musl
-Add needed headers they are just not needed for glibc6+ but also
-for musl
Define additional TCOPTS if not there
-
u_initX types are in sys/types.h be explicit about it
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
- extensions/libxt_TCPOPTSTRIP.c | 15 +++++++++++++++
- include/libiptc/ipt_kernel_headers.h | 12 ------------
- include/linux/netfilter_ipv4/ip_tables.h | 1 +
- 3 files changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
-index 6897857..8a170b2 100644
---- a/extensions/libxt_TCPOPTSTRIP.c
-+++ b/extensions/libxt_TCPOPTSTRIP.c
+diff -Naur iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c
+--- iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c 2015-12-09 14:55:06.000000000 +0200
++++ iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c 2015-12-29 14:44:32.585327077 +0200
@@ -12,6 +12,21 @@
#ifndef TCPOPT_MD5SIG
# define TCPOPT_MD5SIG 19
#endif
+#ifndef TCPOPT_MAXSEG
-+# define TCPOPT_MAXSEG 2
++#define TCPOPT_MAXSEG 2
+#endif
+#ifndef TCPOPT_WINDOW
-+# define TCPOPT_WINDOW 3
++#define TCPOPT_WINDOW 3
+#endif
+#ifndef TCPOPT_SACK_PERMITTED
-+# define TCPOPT_SACK_PERMITTED 4
++#define TCPOPT_SACK_PERMITTED 4
+#endif
+#ifndef TCPOPT_SACK
-+# define TCPOPT_SACK 5
++#define TCPOPT_SACK 5
+#endif
+#ifndef TCPOPT_TIMESTAMP
-+# define TCPOPT_TIMESTAMP 8
++#define TCPOPT_TIMESTAMP 8
+#endif
enum {
O_STRIP_OPTION = 0,
-diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
-index 18861fe..a5963e9 100644
---- a/include/libiptc/ipt_kernel_headers.h
-+++ b/include/libiptc/ipt_kernel_headers.h
-@@ -5,7 +5,6 @@
-
- #include <limits.h>
-
--#if defined(__GLIBC__) && __GLIBC__ == 2
- #include <netinet/ip.h>
- #include <netinet/in.h>
- #include <netinet/ip_icmp.h>
-@@ -13,15 +12,4 @@
- #include <netinet/udp.h>
- #include <net/if.h>
- #include <sys/types.h>
--#else /* libc5 */
--#include <sys/socket.h>
--#include <linux/ip.h>
--#include <linux/in.h>
--#include <linux/if.h>
--#include <linux/icmp.h>
--#include <linux/tcp.h>
--#include <linux/udp.h>
--#include <linux/types.h>
--#include <linux/in6.h>
--#endif
- #endif
-diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
-index 57fd82a..4807246 100644
---- a/include/linux/netfilter_ipv4/ip_tables.h
-+++ b/include/linux/netfilter_ipv4/ip_tables.h
+diff -Naur iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h
+--- iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h 2015-12-09 14:55:06.000000000 +0200
++++ iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h 2015-12-29 14:40:21.250469195 +0200
@@ -15,6 +15,7 @@
#ifndef _IPTABLES_H
#define _IPTABLES_H
@@ -84,6 +44,3 @@ index 57fd82a..4807246 100644
#include <linux/types.h>
#include <linux/netfilter_ipv4.h>
---
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables_1.4.21.bb b/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.0.bb
index deea5e514..fbbe4186b 100644
--- a/yocto-poky/meta/recipes-extended/iptables/iptables_1.4.21.bb
+++ b/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.0.bb
@@ -17,17 +17,16 @@ RRECOMMENDS_${PN} = "kernel-module-x-tables \
kernel-module-nf-nat \
kernel-module-ipt-masquerade"
FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
-FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
file://types.h-add-defines-that-are-required-for-if_packet.patch \
file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
- file://0001-fix-build-with-musl.patch \
file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
"
+SRC_URI_append_libc-musl = " file://0001-fix-build-with-musl.patch"
-SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0"
-SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0"
+SRC_URI[md5sum] = "27ba3451cb622467fc9267a176f19a31"
+SRC_URI[sha256sum] = "4bb72a0a0b18b5a9e79e87631ddc4084528e5df236bc7624472dcaa8480f1c60"
inherit autotools pkgconfig
@@ -41,6 +40,9 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
# libnfnetlink recipe is in meta-networking layer
PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
+# libnftnl recipe is in meta-networking layer(previously known as libnftables)
+PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
+
do_configure_prepend() {
# Remove some libtool m4 files
# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
new file mode 100644
index 000000000..20ef07e44
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
@@ -0,0 +1,92 @@
+From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jan 2016 14:14:22 -0800
+Subject: [PATCH] Fix header inclusion for musl
+
+Fix errors e.g.
+
+In file included from tracepath.c:17:0:
+/usr/include/linux/errqueue.h:33:18:
+error: array type has incomplete element type 'struct timespec'
+ struct timespec ts[3];
+ ^
+tracepath.c: In function 'main':
+tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
+function)
+ overhead, INT_MAX);
+ ^
+tracepath.c:329:16: note: each undeclared identifier is reported only
+once for each function it appears in
+Makefile:131: recipe for target 'tracepath.o' failed
+make: *** [tracepath.o] Error 1
+
+ping_common.c: In function 'main_loop':
+ping_common.c:756:15: error: 'HZ' undeclared (first use in this
+function)
+ if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
+next * HZ <= 1000)) {
+
+protocols/timed.h is not needed and is absent in musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ clockdiff.c | 1 -
+ ping_common.c | 1 +
+ tracepath.c | 2 ++
+ tracepath6.c | 1 +
+ 4 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/clockdiff.c b/clockdiff.c
+index 7c1ea1b..1d6341e 100644
+--- a/clockdiff.c
++++ b/clockdiff.c
+@@ -14,7 +14,6 @@
+ #include <netinet/ip.h>
+ #include <netinet/ip_icmp.h>
+ #define TSPTYPES
+-#include <protocols/timed.h>
+ #include <fcntl.h>
+ #include <netdb.h>
+ #include <arpa/inet.h>
+diff --git a/ping_common.c b/ping_common.c
+index 7f82851..3ce699d 100644
+--- a/ping_common.c
++++ b/ping_common.c
+@@ -2,6 +2,7 @@
+ #include <ctype.h>
+ #include <sched.h>
+ #include <math.h>
++#include <asm-generic/param.h>
+
+ int options;
+
+diff --git a/tracepath.c b/tracepath.c
+index 89e6d16..c9d6ddd 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -12,6 +12,8 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
++#include <time.h>
+ #include <sys/socket.h>
+ #include <linux/types.h>
+ #include <linux/errqueue.h>
+diff --git a/tracepath6.c b/tracepath6.c
+index 126fadf..9d5745c 100644
+--- a/tracepath6.c
++++ b/tracepath6.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netinet/icmp6.h>
+--
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
new file mode 100644
index 000000000..6da01dc61
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
@@ -0,0 +1,52 @@
+From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 08:50:50 +0000
+Subject: [PATCH] Intialize struct elements by name
+
+makes it portable across glibc and musl
+
+Fixes errors
+
+| ping.c: In function 'send_probe':
+| ping.c:735:19: warning: initialization makes integer from pointer
+without a cast [-Wint-conversion]
+| &iov, 1, &cmsg, 0, 0 };
+| ^
+| ping.c:735:19: note: (near initialization for 'm.__pad1')
+| ping.c:735:19: error: initializer element is not computable at load
+time
+| ping.c:735:19: note: (near initialization for 'm.__pad1')
+| make: *** [ping.o] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ ping.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/ping.c b/ping.c
+index 4989760..e67f381 100644
+--- a/ping.c
++++ b/ping.c
+@@ -731,8 +731,15 @@ int send_probe()
+
+ do {
+ static struct iovec iov = {outpack, 0};
+- static struct msghdr m = { &whereto, sizeof(whereto),
+- &iov, 1, &cmsg, 0, 0 };
++ static struct msghdr m = {
++ .msg_name = &whereto,
++ .msg_namelen = sizeof(whereto),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ .msg_control = &cmsg,
++ .msg_controllen = 0,
++ .msg_flags= 0,
++ };
+ m.msg_controllen = cmsg_len;
+ iov.iov_len = cc;
+
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
deleted file mode 100644
index b9cd82ee8..000000000
--- a/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Backport
-
-From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
-From: Arjan van de Ven <arjanvandeven@gmail.com>
-Date: Wed, 16 Jan 2013 03:12:15 +0900
-Subject: [PATCH] ping6: Fix build command line argument with gnutls.
-
-The ping6 command can use either openssl or gnutls...
-and the Makefile has a bunch of setup for defining which of the two to use.
-
-Unfortunately, the final -D define on the commandline to enable gnutls
-inside the ping6.c file didn't actually make it onto the gcc
-commandline.
-This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
-
-Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
-Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
----
- Makefile | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c62d9df..89249f5 100644
---- a/Makefile
-+++ b/Makefile
-@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
- DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
- DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
- LIB_ping = $(LIB_CAP) $(LIB_IDN)
--DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
-+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
- LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
-
- ping: ping_common.o
---
-1.7.2.5
-
diff --git a/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb b/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
index e87a32a7d..715045470 100644
--- a/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb
+++ b/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
@@ -11,18 +11,23 @@ LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f
file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
-DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap"
+DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap libgcrypt"
SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
file://debian/use_gethostbyname2.diff \
file://debian/targets.diff \
file://nsgmls-path-fix.patch \
- file://fix-build-command-line-argument-with-gnutls.patch \
+ file://0001-Fix-header-inclusion-for-musl.patch \
+ file://0001-Intialize-struct-elements-by-name.patch \
"
-SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171"
-SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f"
+SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
+SRC_URI[sha256sum] = "549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1"
+
+UPSTREAM_CHECK_REGEX = "iputils-(?P<pver>s\d+).tar"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
do_compile () {
oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
diff --git a/yocto-poky/meta/recipes-extended/less/less_479.bb b/yocto-poky/meta/recipes-extended/less/less_481.bb
index 618954b0f..0fcd81968 100644
--- a/yocto-poky/meta/recipes-extended/less/less_479.bb
+++ b/yocto-poky/meta/recipes-extended/less/less_481.bb
@@ -27,8 +27,10 @@ DEPENDS = "ncurses"
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
"
-SRC_URI[md5sum] = "049f51ccfe2686009c6ce943eeb4bbaf"
-SRC_URI[sha256sum] = "5bf06cb30ee2a2bd1f79f39aa91e46444e7cb19b48c95c4992fa63cfe4527a80"
+SRC_URI[md5sum] = "50ef46065c65257141a7340123527767"
+SRC_URI[sha256sum] = "3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5"
+
+UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
inherit autotools update-alternatives
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch b/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch
new file mode 100644
index 000000000..6d74e867e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch
@@ -0,0 +1,59 @@
+From 545ded56095c570426fe102ff2192889681ea75c Mon Sep 17 00:00:00 2001
+From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
+Date: Mon, 29 Feb 2016 14:38:25 +0200
+Subject: [PATCH] Set xattrs after setting times
+
+With Integrity Measurement Architecture (IMA) enabled in Linux
+kernel the security.ima extended attribute gets overwritten
+when setting times on a file with a futimens() call. So it's safer
+to set xattrs after times.
+
+Upstream-Status: Submitted [https://github.com/libarchive/libarchive/pull/664]
+
+Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
+
+---
+ libarchive/archive_write_disk_posix.c | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
+index 0fc6193..27c9c1e 100644
+--- a/libarchive/archive_write_disk_posix.c
++++ b/libarchive/archive_write_disk_posix.c
+@@ -1620,16 +1620,6 @@ _archive_write_disk_finish_entry(struct archive *_a)
+ }
+
+ /*
+- * Security-related extended attributes (such as
+- * security.capability on Linux) have to be restored last,
+- * since they're implicitly removed by other file changes.
+- */
+- if (a->todo & TODO_XATTR) {
+- int r2 = set_xattrs(a);
+- if (r2 < ret) ret = r2;
+- }
+-
+- /*
+ * Some flags prevent file modification; they must be restored after
+ * file contents are written.
+ */
+@@ -1648,6 +1638,17 @@ _archive_write_disk_finish_entry(struct archive *_a)
+ }
+
+ /*
++ * Security-related extended attributes (such as
++ * security.capability or security.ima on Linux) have to be restored last,
++ * since they're implicitly removed by other file changes like setting
++ * times.
++ */
++ if (a->todo & TODO_XATTR) {
++ int r2 = set_xattrs(a);
++ if (r2 < ret) ret = r2;
++ }
++
++ /*
+ * Mac extended metadata includes ACLs.
+ */
+ if (a->todo & TODO_MAC_METADATA) {
+--
+2.5.0
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
index 126f80e04..19523f4b8 100644
--- a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
@@ -6,6 +6,7 @@ Subject: [PATCH] Fix CVE-2013-0211
This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4
Upstream-Status: Backport
+CVE: CVE-2013-0211
Signed-off-by: Baogen shang <baogen.shang@windriver.com>
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
index 4ca779c40..5c2439635 100644
--- a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
@@ -7,6 +7,7 @@ This fixes a directory traversal in the cpio tool.
Upstream-Status: backport
+CVE: CVE-2015-2304
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
index 716db9aff..ed677ac31 100644
--- a/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
@@ -7,9 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841"
DEPENDS = "e2fsprogs-native"
-PACKAGECONFIG ?= "libxml2 zlib bz2"
+PACKAGECONFIG ?= "zlib bz2"
PACKAGECONFIG_append_class-target = "\
+ libxml2 \
${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
@@ -34,12 +35,13 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
file://pkgconfig.patch \
file://libarchive-CVE-2015-2304.patch \
file://mkdir.patch \
+ file://0001-Set-xattrs-after-setting-times.patch \
"
SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a"
SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e"
-inherit autotools lib_package pkgconfig
+inherit autotools update-alternatives pkgconfig
CPPFLAGS += "-I${WORKDIR}/extra-includes"
@@ -50,4 +52,20 @@ do_configure_prepend() {
cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
}
+ALTERNATIVE_PRIORITY = "100"
+
+PACKAGES =+ "bsdtar"
+FILES_bsdtar = "${bindir}/bsdtar"
+
+ALTERNATIVE_bsdtar = "tar"
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
+
+PACKAGES =+ "bsdcpio"
+FILES_bsdcpio = "${bindir}/bsdcpio"
+
+ALTERNATIVE_bsdcpio = "cpio"
+ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
+ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb b/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb
index 4df1d08d8..c681560d8 100644
--- a/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb
+++ b/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -31,3 +31,6 @@ do_install_append() {
rm -rf ${D}${libdir}/Libidn.dll
rm -rf ${D}${datadir}/emacs
}
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-extended/libidn/libidn_1.30.bb b/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb
index 723474715..4d6e88529 100644
--- a/yocto-poky/meta/recipes-extended/libidn/libidn_1.30.bb
+++ b/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb
@@ -19,8 +19,8 @@ SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
file://dont-depend-on-help2man.patch \
"
-SRC_URI[md5sum] = "b17edc8551cd31cc5f14c82a9dabf58e"
-SRC_URI[sha256sum] = "39b9fc94d74081c185757b12e0891ce5a22db55268e7d1bb24533ff4432eb053"
+SRC_URI[md5sum] = "4dd8356ba577287ea7076bfa1554b534"
+SRC_URI[sha256sum] = "ba5d5afee2beff703a34ee094668da5c6ea5afa38784cebba8924105e185c4f5"
# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
# so package command into a separate package
@@ -32,3 +32,6 @@ EXTRA_OECONF = "--disable-csharp"
do_install_append() {
rm -rf ${D}${datadir}/emacs
}
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch b/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch
new file mode 100644
index 000000000..972ecc9c5
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch
@@ -0,0 +1,37 @@
+From 280f0d37c642d68bad2a2e49ef437953474d99e6 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 6 Apr 2016 23:15:02 -0700
+Subject: [PATCH] CMakeLists.txt: fix MAN_INSTALL_DIR
+
+It checks ${CMAKE_INSTALL_PREFIX}/share/man when configure, but it may
+not exist when crosscompile, for example, when CMAKE_INSTALL_PREFIX="/",
+it is OK, but when CMAKE_INSTALL_PREFIX="/some/path/else", then it
+doesn't exist, and the man dir would be set to "/usr/man" which is
+incorrect.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ CMakeLists.txt | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fd1426b..747db22 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,10 +57,7 @@ else (DEFINED INCLUDE)
+ ENDIF (DEFINED INCLUDE)
+ MESSAGE (STATUS "Header files will be installed in ${INCLUDE_INSTALL_DIR}")
+ SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+-SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man")
+-IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man" AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
+- SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+-ENDIF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man" AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
++SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ MESSAGE(STATUS "Man pages will be installed in ${MAN_INSTALL_DIR}")
+
+ ####################################################################
+--
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb b/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb
new file mode 100644
index 000000000..fb81c8a5f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for solving packages and reading repositories"
+HOMEPAGE = "https://github.com/openSUSE/libsolv"
+BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "expat zlib"
+
+PV = "0.6.19"
+
+SRC_URI = "git://github.com/openSUSE/libsolv.git \
+ file://0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch \
+"
+SRCREV = "4c5af401a89858d4cebbfe40c59a0031ff9db5b0"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DLIB=${baselib}"
+
+PACKAGES =+ "${PN}-tools ${PN}ext"
+
+FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
+
+BBCLASSEXTEND =+ "native nativesdk"
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
new file mode 100644
index 000000000..50613ba31
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
@@ -0,0 +1,62 @@
+Subject: [PATCH] Add missing rwlock_unlocks in xprt_register
+
+It looks like in b2c9430f46c4ac848957fb8adaac176a3f6ac03f when svc_run
+switched to poll, an early return was added, but the rwlock was not
+unlocked.
+
+I observed that rpcbind built against libtirpc-1.0.1 would handle only
+one request before hanging, and tracked it down to a missing
+rwlock_unlock here.
+
+Fixes: b2c9430f46c4 ('Use poll() instead of select() in svc_run()')
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Forney <mforney@mforney.org>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/svc.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/svc.c b/src/svc.c
+index 9c41445..b59467b 100644
+--- a/src/svc.c
++++ b/src/svc.c
+@@ -99,7 +99,7 @@ xprt_register (xprt)
+ {
+ __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *));
+ if (__svc_xports == NULL)
+- return;
++ goto unlock;
+ }
+ if (sock < _rpc_dtablesize())
+ {
+@@ -120,14 +120,14 @@ xprt_register (xprt)
+ svc_pollfd[i].fd = sock;
+ svc_pollfd[i].events = (POLLIN | POLLPRI |
+ POLLRDNORM | POLLRDBAND);
+- return;
++ goto unlock;
+ }
+
+ new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd,
+ sizeof (struct pollfd)
+ * (svc_max_pollfd + 1));
+ if (new_svc_pollfd == NULL) /* Out of memory */
+- return;
++ goto unlock;
+ svc_pollfd = new_svc_pollfd;
+ ++svc_max_pollfd;
+
+@@ -135,6 +135,7 @@ xprt_register (xprt)
+ svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI |
+ POLLRDNORM | POLLRDBAND);
+ }
++unlock:
+ rwlock_unlock (&svc_fd_lock);
+ }
+
+--
+2.5.3
+
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch
new file mode 100644
index 000000000..f93223feb
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch
@@ -0,0 +1,878 @@
+musl does not provide sys/queue.h implementation. Borrow queue.h from
+the NetBSD project
+http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.68
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur libtirpc-1.0.1-orig/src/clnt_bcast.c libtirpc-1.0.1/src/clnt_bcast.c
+--- libtirpc-1.0.1-orig/src/clnt_bcast.c 2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/clnt_bcast.c 2015-12-21 17:03:52.066008311 +0200
+@@ -40,7 +40,6 @@
+ */
+ #include <sys/socket.h>
+ #include <sys/types.h>
+-#include <sys/queue.h>
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+@@ -62,6 +61,7 @@
+ #include <err.h>
+ #include <string.h>
+
++#include "queue.h"
+ #include "rpc_com.h"
+ #include "debug.h"
+
+diff -Naur libtirpc-1.0.1-orig/tirpc/queue.h libtirpc-1.0.1/tirpc/queue.h
+--- libtirpc-1.0.1-orig/tirpc/queue.h 1970-01-01 02:00:00.000000000 +0200
++++ libtirpc-1.0.1/tirpc/queue.h 2015-12-21 17:02:44.427853905 +0200
+@@ -0,0 +1,846 @@
++/* $NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $ */
++
++/*
++ * Copyright (c) 1991, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ * @(#)queue.h 8.5 (Berkeley) 8/20/94
++ */
++
++#ifndef _SYS_QUEUE_H_
++#define _SYS_QUEUE_H_
++
++/*
++ * This file defines five types of data structures: singly-linked lists,
++ * lists, simple queues, tail queues, and circular queues.
++ *
++ * A singly-linked list is headed by a single forward pointer. The
++ * elements are singly linked for minimum space and pointer manipulation
++ * overhead at the expense of O(n) removal for arbitrary elements. New
++ * elements can be added to the list after an existing element or at the
++ * head of the list. Elements being removed from the head of the list
++ * should use the explicit macro for this purpose for optimum
++ * efficiency. A singly-linked list may only be traversed in the forward
++ * direction. Singly-linked lists are ideal for applications with large
++ * datasets and few or no removals or for implementing a LIFO queue.
++ *
++ * A list is headed by a single forward pointer (or an array of forward
++ * pointers for a hash table header). The elements are doubly linked
++ * so that an arbitrary element can be removed without a need to
++ * traverse the list. New elements can be added to the list before
++ * or after an existing element or at the head of the list. A list
++ * may only be traversed in the forward direction.
++ *
++ * A simple queue is headed by a pair of pointers, one the head of the
++ * list and the other to the tail of the list. The elements are singly
++ * linked to save space, so elements can only be removed from the
++ * head of the list. New elements can be added to the list after
++ * an existing element, at the head of the list, or at the end of the
++ * list. A simple queue may only be traversed in the forward direction.
++ *
++ * A tail queue is headed by a pair of pointers, one to the head of the
++ * list and the other to the tail of the list. The elements are doubly
++ * linked so that an arbitrary element can be removed without a need to
++ * traverse the list. New elements can be added to the list before or
++ * after an existing element, at the head of the list, or at the end of
++ * the list. A tail queue may be traversed in either direction.
++ *
++ * A circle queue is headed by a pair of pointers, one to the head of the
++ * list and the other to the tail of the list. The elements are doubly
++ * linked so that an arbitrary element can be removed without a need to
++ * traverse the list. New elements can be added to the list before or after
++ * an existing element, at the head of the list, or at the end of the list.
++ * A circle queue may be traversed in either direction, but has a more
++ * complex end of list detection.
++ *
++ * For details on the use of these macros, see the queue(3) manual page.
++ */
++
++/*
++ * Include the definition of NULL only on NetBSD because sys/null.h
++ * is not available elsewhere. This conditional makes the header
++ * portable and it can simply be dropped verbatim into any system.
++ * The caveat is that on other systems some other header
++ * must provide NULL before the macros can be used.
++ */
++#ifdef __NetBSD__
++#include <sys/null.h>
++#endif
++
++#if defined(QUEUEDEBUG)
++# if defined(_KERNEL)
++# define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__)
++# else
++# include <err.h>
++# define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__)
++# endif
++#endif
++
++/*
++ * Singly-linked List definitions.
++ */
++#define SLIST_HEAD(name, type) \
++struct name { \
++ struct type *slh_first; /* first element */ \
++}
++
++#define SLIST_HEAD_INITIALIZER(head) \
++ { NULL }
++
++#define SLIST_ENTRY(type) \
++struct { \
++ struct type *sle_next; /* next element */ \
++}
++
++/*
++ * Singly-linked List access methods.
++ */
++#define SLIST_FIRST(head) ((head)->slh_first)
++#define SLIST_END(head) NULL
++#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
++#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
++
++#define SLIST_FOREACH(var, head, field) \
++ for((var) = (head)->slh_first; \
++ (var) != SLIST_END(head); \
++ (var) = (var)->field.sle_next)
++
++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
++ for ((var) = SLIST_FIRST((head)); \
++ (var) != SLIST_END(head) && \
++ ((tvar) = SLIST_NEXT((var), field), 1); \
++ (var) = (tvar))
++
++/*
++ * Singly-linked List functions.
++ */
++#define SLIST_INIT(head) do { \
++ (head)->slh_first = SLIST_END(head); \
++} while (/*CONSTCOND*/0)
++
++#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
++ (elm)->field.sle_next = (slistelm)->field.sle_next; \
++ (slistelm)->field.sle_next = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define SLIST_INSERT_HEAD(head, elm, field) do { \
++ (elm)->field.sle_next = (head)->slh_first; \
++ (head)->slh_first = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define SLIST_REMOVE_AFTER(slistelm, field) do { \
++ (slistelm)->field.sle_next = \
++ SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \
++} while (/*CONSTCOND*/0)
++
++#define SLIST_REMOVE_HEAD(head, field) do { \
++ (head)->slh_first = (head)->slh_first->field.sle_next; \
++} while (/*CONSTCOND*/0)
++
++#define SLIST_REMOVE(head, elm, type, field) do { \
++ if ((head)->slh_first == (elm)) { \
++ SLIST_REMOVE_HEAD((head), field); \
++ } \
++ else { \
++ struct type *curelm = (head)->slh_first; \
++ while(curelm->field.sle_next != (elm)) \
++ curelm = curelm->field.sle_next; \
++ curelm->field.sle_next = \
++ curelm->field.sle_next->field.sle_next; \
++ } \
++} while (/*CONSTCOND*/0)
++
++
++/*
++ * List definitions.
++ */
++#define LIST_HEAD(name, type) \
++struct name { \
++ struct type *lh_first; /* first element */ \
++}
++
++#define LIST_HEAD_INITIALIZER(head) \
++ { NULL }
++
++#define LIST_ENTRY(type) \
++struct { \
++ struct type *le_next; /* next element */ \
++ struct type **le_prev; /* address of previous next element */ \
++}
++
++/*
++ * List access methods.
++ */
++#define LIST_FIRST(head) ((head)->lh_first)
++#define LIST_END(head) NULL
++#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head))
++#define LIST_NEXT(elm, field) ((elm)->field.le_next)
++
++#define LIST_FOREACH(var, head, field) \
++ for ((var) = ((head)->lh_first); \
++ (var) != LIST_END(head); \
++ (var) = ((var)->field.le_next))
++
++#define LIST_FOREACH_SAFE(var, head, field, tvar) \
++ for ((var) = LIST_FIRST((head)); \
++ (var) != LIST_END(head) && \
++ ((tvar) = LIST_NEXT((var), field), 1); \
++ (var) = (tvar))
++
++#define LIST_MOVE(head1, head2) do { \
++ LIST_INIT((head2)); \
++ if (!LIST_EMPTY((head1))) { \
++ (head2)->lh_first = (head1)->lh_first; \
++ LIST_INIT((head1)); \
++ } \
++} while (/*CONSTCOND*/0)
++
++/*
++ * List functions.
++ */
++#if defined(QUEUEDEBUG)
++#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) \
++ if ((head)->lh_first && \
++ (head)->lh_first->field.le_prev != &(head)->lh_first) \
++ QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head), \
++ __FILE__, __LINE__);
++#define QUEUEDEBUG_LIST_OP(elm, field) \
++ if ((elm)->field.le_next && \
++ (elm)->field.le_next->field.le_prev != \
++ &(elm)->field.le_next) \
++ QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm), \
++ __FILE__, __LINE__); \
++ if (*(elm)->field.le_prev != (elm)) \
++ QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm), \
++ __FILE__, __LINE__);
++#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) \
++ (elm)->field.le_next = (void *)1L; \
++ (elm)->field.le_prev = (void *)1L;
++#else
++#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field)
++#define QUEUEDEBUG_LIST_OP(elm, field)
++#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field)
++#endif
++
++#define LIST_INIT(head) do { \
++ (head)->lh_first = LIST_END(head); \
++} while (/*CONSTCOND*/0)
++
++#define LIST_INSERT_AFTER(listelm, elm, field) do { \
++ QUEUEDEBUG_LIST_OP((listelm), field) \
++ if (((elm)->field.le_next = (listelm)->field.le_next) != \
++ LIST_END(head)) \
++ (listelm)->field.le_next->field.le_prev = \
++ &(elm)->field.le_next; \
++ (listelm)->field.le_next = (elm); \
++ (elm)->field.le_prev = &(listelm)->field.le_next; \
++} while (/*CONSTCOND*/0)
++
++#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
++ QUEUEDEBUG_LIST_OP((listelm), field) \
++ (elm)->field.le_prev = (listelm)->field.le_prev; \
++ (elm)->field.le_next = (listelm); \
++ *(listelm)->field.le_prev = (elm); \
++ (listelm)->field.le_prev = &(elm)->field.le_next; \
++} while (/*CONSTCOND*/0)
++
++#define LIST_INSERT_HEAD(head, elm, field) do { \
++ QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \
++ if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\
++ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
++ (head)->lh_first = (elm); \
++ (elm)->field.le_prev = &(head)->lh_first; \
++} while (/*CONSTCOND*/0)
++
++#define LIST_REMOVE(elm, field) do { \
++ QUEUEDEBUG_LIST_OP((elm), field) \
++ if ((elm)->field.le_next != NULL) \
++ (elm)->field.le_next->field.le_prev = \
++ (elm)->field.le_prev; \
++ *(elm)->field.le_prev = (elm)->field.le_next; \
++ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \
++} while (/*CONSTCOND*/0)
++
++#define LIST_REPLACE(elm, elm2, field) do { \
++ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
++ (elm2)->field.le_next->field.le_prev = \
++ &(elm2)->field.le_next; \
++ (elm2)->field.le_prev = (elm)->field.le_prev; \
++ *(elm2)->field.le_prev = (elm2); \
++ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \
++} while (/*CONSTCOND*/0)
++
++/*
++ * Simple queue definitions.
++ */
++#define SIMPLEQ_HEAD(name, type) \
++struct name { \
++ struct type *sqh_first; /* first element */ \
++ struct type **sqh_last; /* addr of last next element */ \
++}
++
++#define SIMPLEQ_HEAD_INITIALIZER(head) \
++ { NULL, &(head).sqh_first }
++
++#define SIMPLEQ_ENTRY(type) \
++struct { \
++ struct type *sqe_next; /* next element */ \
++}
++
++/*
++ * Simple queue access methods.
++ */
++#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
++#define SIMPLEQ_END(head) NULL
++#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head))
++#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
++
++#define SIMPLEQ_FOREACH(var, head, field) \
++ for ((var) = ((head)->sqh_first); \
++ (var) != SIMPLEQ_END(head); \
++ (var) = ((var)->field.sqe_next))
++
++#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \
++ for ((var) = ((head)->sqh_first); \
++ (var) != SIMPLEQ_END(head) && \
++ ((next = ((var)->field.sqe_next)), 1); \
++ (var) = (next))
++
++/*
++ * Simple queue functions.
++ */
++#define SIMPLEQ_INIT(head) do { \
++ (head)->sqh_first = NULL; \
++ (head)->sqh_last = &(head)->sqh_first; \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
++ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
++ (head)->sqh_last = &(elm)->field.sqe_next; \
++ (head)->sqh_first = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
++ (elm)->field.sqe_next = NULL; \
++ *(head)->sqh_last = (elm); \
++ (head)->sqh_last = &(elm)->field.sqe_next; \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
++ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
++ (head)->sqh_last = &(elm)->field.sqe_next; \
++ (listelm)->field.sqe_next = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
++ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
++ (head)->sqh_last = &(head)->sqh_first; \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
++ if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
++ == NULL) \
++ (head)->sqh_last = &(elm)->field.sqe_next; \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
++ if ((head)->sqh_first == (elm)) { \
++ SIMPLEQ_REMOVE_HEAD((head), field); \
++ } else { \
++ struct type *curelm = (head)->sqh_first; \
++ while (curelm->field.sqe_next != (elm)) \
++ curelm = curelm->field.sqe_next; \
++ if ((curelm->field.sqe_next = \
++ curelm->field.sqe_next->field.sqe_next) == NULL) \
++ (head)->sqh_last = &(curelm)->field.sqe_next; \
++ } \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_CONCAT(head1, head2) do { \
++ if (!SIMPLEQ_EMPTY((head2))) { \
++ *(head1)->sqh_last = (head2)->sqh_first; \
++ (head1)->sqh_last = (head2)->sqh_last; \
++ SIMPLEQ_INIT((head2)); \
++ } \
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_LAST(head, type, field) \
++ (SIMPLEQ_EMPTY((head)) ? \
++ NULL : \
++ ((struct type *)(void *) \
++ ((char *)((head)->sqh_last) - offsetof(struct type, field))))
++
++/*
++ * Tail queue definitions.
++ */
++#define _TAILQ_HEAD(name, type, qual) \
++struct name { \
++ qual type *tqh_first; /* first element */ \
++ qual type *qual *tqh_last; /* addr of last next element */ \
++}
++#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
++
++#define TAILQ_HEAD_INITIALIZER(head) \
++ { TAILQ_END(head), &(head).tqh_first }
++
++#define _TAILQ_ENTRY(type, qual) \
++struct { \
++ qual type *tqe_next; /* next element */ \
++ qual type *qual *tqe_prev; /* address of previous next element */\
++}
++#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
++
++/*
++ * Tail queue access methods.
++ */
++#define TAILQ_FIRST(head) ((head)->tqh_first)
++#define TAILQ_END(head) (NULL)
++#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
++#define TAILQ_LAST(head, headname) \
++ (*(((struct headname *)((head)->tqh_last))->tqh_last))
++#define TAILQ_PREV(elm, headname, field) \
++ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
++#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head))
++
++
++#define TAILQ_FOREACH(var, head, field) \
++ for ((var) = ((head)->tqh_first); \
++ (var) != TAILQ_END(head); \
++ (var) = ((var)->field.tqe_next))
++
++#define TAILQ_FOREACH_SAFE(var, head, field, next) \
++ for ((var) = ((head)->tqh_first); \
++ (var) != TAILQ_END(head) && \
++ ((next) = TAILQ_NEXT(var, field), 1); (var) = (next))
++
++#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
++ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\
++ (var) != TAILQ_END(head); \
++ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
++
++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \
++ for ((var) = TAILQ_LAST((head), headname); \
++ (var) != TAILQ_END(head) && \
++ ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev))
++
++/*
++ * Tail queue functions.
++ */
++#if defined(QUEUEDEBUG)
++#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \
++ if ((head)->tqh_first && \
++ (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \
++ QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head), \
++ __FILE__, __LINE__);
++#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \
++ if (*(head)->tqh_last != NULL) \
++ QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head), \
++ __FILE__, __LINE__);
++#define QUEUEDEBUG_TAILQ_OP(elm, field) \
++ if ((elm)->field.tqe_next && \
++ (elm)->field.tqe_next->field.tqe_prev != \
++ &(elm)->field.tqe_next) \
++ QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm), \
++ __FILE__, __LINE__); \
++ if (*(elm)->field.tqe_prev != (elm)) \
++ QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm), \
++ __FILE__, __LINE__);
++#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \
++ if ((elm)->field.tqe_next == NULL && \
++ (head)->tqh_last != &(elm)->field.tqe_next) \
++ QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\
++ (head), (elm), __FILE__, __LINE__);
++#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \
++ (elm)->field.tqe_next = (void *)1L; \
++ (elm)->field.tqe_prev = (void *)1L;
++#else
++#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)
++#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)
++#define QUEUEDEBUG_TAILQ_OP(elm, field)
++#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)
++#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)
++#endif
++
++#define TAILQ_INIT(head) do { \
++ (head)->tqh_first = TAILQ_END(head); \
++ (head)->tqh_last = &(head)->tqh_first; \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_INSERT_HEAD(head, elm, field) do { \
++ QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \
++ if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\
++ (head)->tqh_first->field.tqe_prev = \
++ &(elm)->field.tqe_next; \
++ else \
++ (head)->tqh_last = &(elm)->field.tqe_next; \
++ (head)->tqh_first = (elm); \
++ (elm)->field.tqe_prev = &(head)->tqh_first; \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_INSERT_TAIL(head, elm, field) do { \
++ QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \
++ (elm)->field.tqe_next = TAILQ_END(head); \
++ (elm)->field.tqe_prev = (head)->tqh_last; \
++ *(head)->tqh_last = (elm); \
++ (head)->tqh_last = &(elm)->field.tqe_next; \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
++ QUEUEDEBUG_TAILQ_OP((listelm), field) \
++ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \
++ TAILQ_END(head)) \
++ (elm)->field.tqe_next->field.tqe_prev = \
++ &(elm)->field.tqe_next; \
++ else \
++ (head)->tqh_last = &(elm)->field.tqe_next; \
++ (listelm)->field.tqe_next = (elm); \
++ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
++ QUEUEDEBUG_TAILQ_OP((listelm), field) \
++ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
++ (elm)->field.tqe_next = (listelm); \
++ *(listelm)->field.tqe_prev = (elm); \
++ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_REMOVE(head, elm, field) do { \
++ QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \
++ QUEUEDEBUG_TAILQ_OP((elm), field) \
++ if (((elm)->field.tqe_next) != TAILQ_END(head)) \
++ (elm)->field.tqe_next->field.tqe_prev = \
++ (elm)->field.tqe_prev; \
++ else \
++ (head)->tqh_last = (elm)->field.tqe_prev; \
++ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
++ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_REPLACE(head, elm, elm2, field) do { \
++ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \
++ TAILQ_END(head)) \
++ (elm2)->field.tqe_next->field.tqe_prev = \
++ &(elm2)->field.tqe_next; \
++ else \
++ (head)->tqh_last = &(elm2)->field.tqe_next; \
++ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
++ *(elm2)->field.tqe_prev = (elm2); \
++ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_CONCAT(head1, head2, field) do { \
++ if (!TAILQ_EMPTY(head2)) { \
++ *(head1)->tqh_last = (head2)->tqh_first; \
++ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
++ (head1)->tqh_last = (head2)->tqh_last; \
++ TAILQ_INIT((head2)); \
++ } \
++} while (/*CONSTCOND*/0)
++
++/*
++ * Singly-linked Tail queue declarations.
++ */
++#define STAILQ_HEAD(name, type) \
++struct name { \
++ struct type *stqh_first; /* first element */ \
++ struct type **stqh_last; /* addr of last next element */ \
++}
++
++#define STAILQ_HEAD_INITIALIZER(head) \
++ { NULL, &(head).stqh_first }
++
++#define STAILQ_ENTRY(type) \
++struct { \
++ struct type *stqe_next; /* next element */ \
++}
++
++/*
++ * Singly-linked Tail queue access methods.
++ */
++#define STAILQ_FIRST(head) ((head)->stqh_first)
++#define STAILQ_END(head) NULL
++#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
++#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head))
++
++/*
++ * Singly-linked Tail queue functions.
++ */
++#define STAILQ_INIT(head) do { \
++ (head)->stqh_first = NULL; \
++ (head)->stqh_last = &(head)->stqh_first; \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_INSERT_HEAD(head, elm, field) do { \
++ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
++ (head)->stqh_last = &(elm)->field.stqe_next; \
++ (head)->stqh_first = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_INSERT_TAIL(head, elm, field) do { \
++ (elm)->field.stqe_next = NULL; \
++ *(head)->stqh_last = (elm); \
++ (head)->stqh_last = &(elm)->field.stqe_next; \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
++ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
++ (head)->stqh_last = &(elm)->field.stqe_next; \
++ (listelm)->field.stqe_next = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_REMOVE_HEAD(head, field) do { \
++ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
++ (head)->stqh_last = &(head)->stqh_first; \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_REMOVE(head, elm, type, field) do { \
++ if ((head)->stqh_first == (elm)) { \
++ STAILQ_REMOVE_HEAD((head), field); \
++ } else { \
++ struct type *curelm = (head)->stqh_first; \
++ while (curelm->field.stqe_next != (elm)) \
++ curelm = curelm->field.stqe_next; \
++ if ((curelm->field.stqe_next = \
++ curelm->field.stqe_next->field.stqe_next) == NULL) \
++ (head)->stqh_last = &(curelm)->field.stqe_next; \
++ } \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_FOREACH(var, head, field) \
++ for ((var) = ((head)->stqh_first); \
++ (var); \
++ (var) = ((var)->field.stqe_next))
++
++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
++ for ((var) = STAILQ_FIRST((head)); \
++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
++ (var) = (tvar))
++
++#define STAILQ_CONCAT(head1, head2) do { \
++ if (!STAILQ_EMPTY((head2))) { \
++ *(head1)->stqh_last = (head2)->stqh_first; \
++ (head1)->stqh_last = (head2)->stqh_last; \
++ STAILQ_INIT((head2)); \
++ } \
++} while (/*CONSTCOND*/0)
++
++#define STAILQ_LAST(head, type, field) \
++ (STAILQ_EMPTY((head)) ? \
++ NULL : \
++ ((struct type *)(void *) \
++ ((char *)((head)->stqh_last) - offsetof(struct type, field))))
++
++
++#ifndef _KERNEL
++/*
++ * Circular queue definitions. Do not use. We still keep the macros
++ * for compatibility but because of pointer aliasing issues their use
++ * is discouraged!
++ */
++
++/*
++ * __launder_type(): We use this ugly hack to work around the the compiler
++ * noticing that two types may not alias each other and elide tests in code.
++ * We hit this in the CIRCLEQ macros when comparing 'struct name *' and
++ * 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC
++ * 4.8) declare these comparisons as always false, causing the code to
++ * not run as designed.
++ *
++ * This hack is only to be used for comparisons and thus can be fully const.
++ * Do not use for assignment.
++ *
++ * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix
++ * this by changing the head/tail sentinal values, but see the note above
++ * this one.
++ */
++static __inline const void * __launder_type(const void *);
++static __inline const void *
++__launder_type(const void *__x)
++{
++ __asm __volatile("" : "+r" (__x));
++ return __x;
++}
++
++#if defined(QUEUEDEBUG)
++#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \
++ if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \
++ (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \
++ QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head), \
++ __FILE__, __LINE__); \
++ if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \
++ (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \
++ QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head), \
++ __FILE__, __LINE__);
++#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \
++ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \
++ if ((head)->cqh_last != (elm)) \
++ QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d", \
++ (elm), __FILE__, __LINE__); \
++ } else { \
++ if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \
++ QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d", \
++ (elm), __FILE__, __LINE__); \
++ } \
++ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \
++ if ((head)->cqh_first != (elm)) \
++ QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d", \
++ (elm), __FILE__, __LINE__); \
++ } else { \
++ if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \
++ QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d", \
++ (elm), __FILE__, __LINE__); \
++ }
++#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \
++ (elm)->field.cqe_next = (void *)1L; \
++ (elm)->field.cqe_prev = (void *)1L;
++#else
++#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)
++#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field)
++#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field)
++#endif
++
++#define CIRCLEQ_HEAD(name, type) \
++struct name { \
++ struct type *cqh_first; /* first element */ \
++ struct type *cqh_last; /* last element */ \
++}
++
++#define CIRCLEQ_HEAD_INITIALIZER(head) \
++ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
++
++#define CIRCLEQ_ENTRY(type) \
++struct { \
++ struct type *cqe_next; /* next element */ \
++ struct type *cqe_prev; /* previous element */ \
++}
++
++/*
++ * Circular queue functions.
++ */
++#define CIRCLEQ_INIT(head) do { \
++ (head)->cqh_first = CIRCLEQ_END(head); \
++ (head)->cqh_last = CIRCLEQ_END(head); \
++} while (/*CONSTCOND*/0)
++
++#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
++ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \
++ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
++ (elm)->field.cqe_prev = (listelm); \
++ if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
++ (head)->cqh_last = (elm); \
++ else \
++ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
++ (listelm)->field.cqe_next = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
++ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \
++ (elm)->field.cqe_next = (listelm); \
++ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
++ if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
++ (head)->cqh_first = (elm); \
++ else \
++ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
++ (listelm)->field.cqe_prev = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
++ (elm)->field.cqe_next = (head)->cqh_first; \
++ (elm)->field.cqe_prev = CIRCLEQ_END(head); \
++ if ((head)->cqh_last == CIRCLEQ_ENDC(head)) \
++ (head)->cqh_last = (elm); \
++ else \
++ (head)->cqh_first->field.cqe_prev = (elm); \
++ (head)->cqh_first = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
++ (elm)->field.cqe_next = CIRCLEQ_END(head); \
++ (elm)->field.cqe_prev = (head)->cqh_last; \
++ if ((head)->cqh_first == CIRCLEQ_ENDC(head)) \
++ (head)->cqh_first = (elm); \
++ else \
++ (head)->cqh_last->field.cqe_next = (elm); \
++ (head)->cqh_last = (elm); \
++} while (/*CONSTCOND*/0)
++
++#define CIRCLEQ_REMOVE(head, elm, field) do { \
++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
++ QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \
++ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
++ (head)->cqh_last = (elm)->field.cqe_prev; \
++ else \
++ (elm)->field.cqe_next->field.cqe_prev = \
++ (elm)->field.cqe_prev; \
++ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
++ (head)->cqh_first = (elm)->field.cqe_next; \
++ else \
++ (elm)->field.cqe_prev->field.cqe_next = \
++ (elm)->field.cqe_next; \
++ QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field) \
++} while (/*CONSTCOND*/0)
++
++#define CIRCLEQ_FOREACH(var, head, field) \
++ for ((var) = ((head)->cqh_first); \
++ (var) != CIRCLEQ_ENDC(head); \
++ (var) = ((var)->field.cqe_next))
++
++#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
++ for ((var) = ((head)->cqh_last); \
++ (var) != CIRCLEQ_ENDC(head); \
++ (var) = ((var)->field.cqe_prev))
++
++/*
++ * Circular queue access methods.
++ */
++#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
++#define CIRCLEQ_LAST(head) ((head)->cqh_last)
++/* For comparisons */
++#define CIRCLEQ_ENDC(head) (__launder_type(head))
++/* For assignments */
++#define CIRCLEQ_END(head) ((void *)(head))
++#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
++#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
++#define CIRCLEQ_EMPTY(head) \
++ (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head))
++
++#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
++ (((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
++ ? ((head)->cqh_first) \
++ : (elm->field.cqe_next))
++#define CIRCLEQ_LOOP_PREV(head, elm, field) \
++ (((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
++ ? ((head)->cqh_last) \
++ : (elm->field.cqe_prev))
++#endif /* !_KERNEL */
++
++#endif /* !_SYS_QUEUE_H_ */
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
new file mode 100644
index 000000000..512e93497
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
@@ -0,0 +1,144 @@
+uclibc and musl does not provide des functionality. Lets disable it.
+
+Upstream-Status: Inappropriate [uclibc and musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur libtirpc-1.0.1-orig/src/Makefile.am libtirpc-1.0.1/src/Makefile.am
+--- libtirpc-1.0.1-orig/src/Makefile.am 2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/Makefile.am 2015-12-21 15:56:17.094702429 +0200
+@@ -22,9 +22,8 @@
+ pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
+ rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
+ rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
+- svc_auth_des.c \
+ svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+- auth_time.c auth_des.c authdes_prot.c debug.c
++ debug.c
+
+ ## XDR
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
+@@ -41,8 +40,8 @@
+ libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
+ endif
+
+-libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
+-libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
++#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
++#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
+
+ CLEANFILES = cscope.* *~
+ DISTCLEANFILES = Makefile.in
+diff -Naur libtirpc-1.0.1-orig/src/rpc_soc.c libtirpc-1.0.1/src/rpc_soc.c
+--- libtirpc-1.0.1-orig/src/rpc_soc.c 2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/rpc_soc.c 2015-12-21 15:56:17.095702416 +0200
+@@ -61,7 +61,6 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <rpcsvc/nis.h>
+
+ #include "rpc_com.h"
+
+@@ -522,86 +521,6 @@
+ }
+
+ /*
+- * Create the client des authentication object. Obsoleted by
+- * authdes_seccreate().
+- */
+-AUTH *
+-authdes_create(servername, window, syncaddr, ckey)
+- char *servername; /* network name of server */
+- u_int window; /* time to live */
+- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
+- des_block *ckey; /* optional conversation key to use */
+-{
+- AUTH *nauth;
+- char hostname[NI_MAXHOST];
+-
+- if (syncaddr) {
+- /*
+- * Change addr to hostname, because that is the way
+- * new interface takes it.
+- */
+- switch (syncaddr->sa_family) {
+- case AF_INET:
+- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
+- sizeof hostname, NULL, 0, 0) != 0)
+- goto fallback;
+- break;
+- case AF_INET6:
+- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
+- sizeof hostname, NULL, 0, 0) != 0)
+- goto fallback;
+- break;
+- default:
+- goto fallback;
+- }
+- nauth = authdes_seccreate(servername, window, hostname, ckey);
+- return (nauth);
+- }
+-fallback:
+- return authdes_seccreate(servername, window, NULL, ckey);
+-}
+-
+-/*
+- * Create the client des authentication object. Obsoleted by
+- * authdes_pk_seccreate().
+- */
+-extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
+- const des_block *, nis_server *);
+-
+-AUTH *
+-authdes_pk_create(servername, pkey, window, syncaddr, ckey)
+- char *servername; /* network name of server */
+- netobj *pkey; /* public key */
+- u_int window; /* time to live */
+- struct sockaddr *syncaddr; /* optional hostaddr to sync with */
+- des_block *ckey; /* optional conversation key to use */
+-{
+- AUTH *nauth;
+- char hostname[NI_MAXHOST];
+-
+- if (syncaddr) {
+- /*
+- * Change addr to hostname, because that is the way
+- * new interface takes it.
+- */
+- switch (syncaddr->sa_family) {
+- case AF_INET:
+- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
+- sizeof hostname, NULL, 0, 0) != 0)
+- goto fallback;
+- break;
+- default:
+- goto fallback;
+- }
+- nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
+- return (nauth);
+- }
+-fallback:
+- return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
+-}
+-
+-
+-/*
+ * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
+ */
+ CLIENT *
+diff -Naur libtirpc-1.0.1-orig/src/svc_auth.c libtirpc-1.0.1/src/svc_auth.c
+--- libtirpc-1.0.1-orig/src/svc_auth.c 2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/svc_auth.c 2015-12-21 15:56:17.095702416 +0200
+@@ -114,9 +114,6 @@
+ case AUTH_SHORT:
+ dummy = _svcauth_short(rqst, msg);
+ return (dummy);
+- case AUTH_DES:
+- dummy = _svcauth_des(rqst, msg);
+- return (dummy);
+ #ifdef HAVE_RPCSEC_GSS
+ case RPCSEC_GSS:
+ dummy = _svcauth_gss(rqst, msg, no_dispatch);
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
deleted file mode 100644
index 553b1ffb8..000000000
--- a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-uclibc does not provide des functionality unlike eglibc so lets disable ssl support
-
-Upstream-Status: Inappropriate [uclibc specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libtirpc-0.2.5/src/rpc_soc.c
-===================================================================
---- libtirpc-0.2.5.orig/src/rpc_soc.c
-+++ libtirpc-0.2.5/src/rpc_soc.c
-@@ -520,6 +520,7 @@ clnt_broadcast(prog, vers, proc, xargs,
- (resultproc_t) rpc_wrap_bcast, "udp");
- }
-
-+#if 0
- /*
- * Create the client des authentication object. Obsoleted by
- * authdes_seccreate().
-@@ -551,6 +552,7 @@ fallback:
- dummy = authdes_seccreate(servername, window, NULL, ckey);
- return (dummy);
- }
-+#endif
-
- /*
- * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
-Index: libtirpc-0.2.5/src/Makefile.am
-===================================================================
---- libtirpc-0.2.5.orig/src/Makefile.am
-+++ libtirpc-0.2.5/src/Makefile.am
-@@ -51,7 +51,7 @@ libtirpc_la_SOURCES = auth_none.c auth_u
- rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
- rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
- svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-- auth_time.c auth_des.c authdes_prot.c debug.c
-+ auth_time.c debug.c
-
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch
deleted file mode 100644
index 855d15b58..000000000
--- a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This patch is fixing build with uclibc where compiler ( gcc5 ) says it cant find va_list
-the patch is right for upstreaming as well
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: libtirpc-0.2.5/src/debug.h
-===================================================================
---- libtirpc-0.2.5.orig/src/debug.h
-+++ libtirpc-0.2.5/src/debug.h
-@@ -22,6 +22,7 @@
- #ifndef _DEBUG_H
- #define _DEBUG_H
- #include <syslog.h>
-+#include <stdarg.h>
-
- extern int libtirpc_debug_level;
- extern int log_stderr;
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb
index 330b82991..e321d479e 100644
--- a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb
@@ -7,20 +7,23 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
-DEPENDS += "xz-native"
PROVIDES = "virtual/librpc"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
file://libtirpc-0.2.1-fortify.patch \
+ file://0001-Add-missing-rwlock_unlocks-in-xprt_register.patch \
"
-SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch \
- file://va_list.patch \
+SRC_URI_append_libc-uclibc = " file://remove-des-functionality.patch \
"
-SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368"
-SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db"
+SRC_URI_append_libc-musl = " file://remove-des-functionality.patch \
+ file://Use-netbsd-queue.h.patch \
+ "
+
+SRC_URI[libtirpc.md5sum] = "36ce1c0ff80863bb0839d54aa0b94014"
+SRC_URI[libtirpc.sha256sum] = "5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e"
SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
diff --git a/yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch b/yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
new file mode 100644
index 000000000..79756b9a0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
@@ -0,0 +1,62 @@
+From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 02:22:51 +0000
+Subject: [PATCH 1/2] Check for issetugid()
+
+If secure version of getenv is not there then we can use
+issetugid() as aid to call getenv()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 1 +
+ lib/config.c | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1ded1a2..ee19e1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -125,6 +125,7 @@ AC_TYPE_OFF_T
+ AC_TYPE_SIZE_T
+
+ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
++AC_CHECK_FUNCS([issetugid])
+
+ # Modify CFLAGS after all tests are run (some of them could fail because
+ # of the -Werror).
+diff --git a/lib/config.c b/lib/config.c
+index 29e7120..30f9daf 100644
+--- a/lib/config.c
++++ b/lib/config.c
+@@ -44,8 +44,10 @@
+ # define safe_getenv(string) secure_getenv(string)
+ #elif defined(HAVE___SECURE_GETENV)
+ # define safe_getenv(string) __secure_getenv(string)
++#elif defined(HAVE_ISSETUGID)
++# define safe_getenv(string) safe_getenv_issetugid(string)
+ #else
+-# error Neither secure_getenv not __secure_getenv are available
++# error None of secure_getenv, __secure_getenv, or issetugid is available
+ #endif
+
+ struct config_config {
+@@ -59,6 +61,14 @@ struct config_key {
+ GList *values;
+ };
+
++static const char*
++safe_getenv_issetugid(const char* name)
++{
++ if (issetugid ())
++ return 0;
++ return getenv (name);
++}
++
+ /* Compare two section names */
+ static int
+ compare_section_names(gconstpointer a, gconstpointer b)
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch b/yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
new file mode 100644
index 000000000..4bc0219f1
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
@@ -0,0 +1,27 @@
+From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 02:26:00 +0000
+Subject: [PATCH 2/2] remove unused execinfo.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ lib/error.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/lib/error.c b/lib/error.c
+index a5ec30a..443e601 100644
+--- a/lib/error.c
++++ b/lib/error.c
+@@ -18,7 +18,6 @@
+ #include <config.h>
+ #include <sys/types.h>
+ #include <errno.h>
+-#include <execinfo.h>
+ #include <libintl.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb b/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
index c4ed45959..1369ae8f2 100644
--- a/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
+++ b/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
@@ -12,12 +12,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
SECTION = "base"
SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
- "
+ file://0001-Check-for-issetugid.patch \
+ file://0002-remove-unused-execinfo.h.patch \
+ "
SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
-DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python"
+DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python"
inherit autotools gettext pythonnative python-dir pkgconfig
@@ -25,6 +27,5 @@ EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}"
PACKAGES += "${PN}-python "
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
diff --git a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
deleted file mode 100644
index a9df1744a..000000000
--- a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
+++ /dev/null
@@ -1,387 +0,0 @@
-From e6ccbab5d42b110ac4f6ce1f72cb1e9ccbe4400a Mon Sep 17 00:00:00 2001
-From: Li xin <lixin.fnst@cn.fujitsu.com>
-Date: Tue, 16 Jun 2015 19:02:38 +0900
-Subject: [PATCH] mod_cgi buffers data without bound so fix it
-
-Upstream-Status: Submitted [http://redmine.lighttpd.net/issues/1264]
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-
-Update context for 1.4.36.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- doc/config/lighttpd.conf | 8 ++
- src/mod_cgi.c | 188 ++++++++++++++++++++++++++++++++++++++++++++---
- 2 files changed, 187 insertions(+), 9 deletions(-)
-
-diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
-index 60b0ae1..9c101a7 100644
---- a/doc/config/lighttpd.conf
-+++ b/doc/config/lighttpd.conf
-@@ -375,6 +375,14 @@ server.upload-dirs = ( "/var/tmp" )
- ##
- #######################################################################
-
-+#######################################################################
-+##
-+##
-+## maximum bytes in send_raw before backing off [KByte]
-+## cgi.high-waterlevel = 10240
-+## minimum bytes in send_raw to disable backoff [KByte]
-+## cgi.low-waterlevel = 5120
-+#######################################################################
-
- #######################################################################
- ##
-diff --git a/src/mod_cgi.c b/src/mod_cgi.c
-index 01b1877..7c67eb5 100644
---- a/src/mod_cgi.c
-+++ b/src/mod_cgi.c
-@@ -38,6 +38,10 @@
-
- #include "version.h"
-
-+/* for output logs */
-+char msgbuf[2048];
-+
-+
- enum {EOL_UNSET, EOL_N, EOL_RN};
-
- typedef struct {
-@@ -53,9 +57,19 @@ typedef struct {
- size_t size;
- } buffer_pid_t;
-
-+struct handler_ctx;
-+
-+typedef struct {
-+ struct handler_ctx **hctx;
-+ size_t used;
-+ size_t size;
-+} buffer_ctx_t;
-+
- typedef struct {
- array *cgi;
- unsigned short execute_x_only;
-+ unsigned int high_waterlevel; /* maximum bytes in send_raw before backing off */
-+ unsigned int low_waterlevel; /* minimum bytes in send_raw to disable backoff */
- } plugin_config;
-
- typedef struct {
-@@ -68,9 +82,11 @@ typedef struct {
- plugin_config **config_storage;
-
- plugin_config conf;
-+
-+ buffer_ctx_t cgi_ctx;
- } plugin_data;
-
--typedef struct {
-+typedef struct handler_ctx {
- pid_t pid;
- int fd;
- int fde_ndx; /* index into the fd-event buffer */
-@@ -78,11 +94,16 @@ typedef struct {
- connection *remote_conn; /* dumb pointer */
- plugin_data *plugin_data; /* dumb pointer */
-
-+ int throttling; /* 1=waiting for send_raw buffer to drain */
-+ off_t high_waterlevel; /* maximum bytes in send_raw before backing off */
-+ off_t low_waterlevel; /* minimum bytes in send_raw to disable backoff */
-+ off_t bytes_in_buffer;
-+
- buffer *response;
- buffer *response_header;
- } handler_ctx;
-
--static handler_ctx * cgi_handler_ctx_init(void) {
-+static handler_ctx * cgi_handler_ctx_init(plugin_data *p) {
- handler_ctx *hctx = calloc(1, sizeof(*hctx));
-
- force_assert(hctx);
-@@ -90,13 +111,26 @@ static handler_ctx * cgi_handler_ctx_init(void) {
- hctx->response = buffer_init();
- hctx->response_header = buffer_init();
-
-+ hctx->throttling = 0;
-+ hctx->high_waterlevel = (off_t)p->conf.high_waterlevel * 1024;
-+ hctx->low_waterlevel = (off_t)p->conf.low_waterlevel * 1024;
-+ if (hctx->low_waterlevel >= hctx->high_waterlevel) {
-+ hctx->low_waterlevel = hctx->high_waterlevel * 3 / 4; /* 75% */
-+ }
-+ hctx->bytes_in_buffer = 0;
-+
- return hctx;
- }
-
--static void cgi_handler_ctx_free(handler_ctx *hctx) {
-+static void cgi_handler_ctx_free(server *srv, handler_ctx *hctx) {
- buffer_free(hctx->response);
- buffer_free(hctx->response_header);
-
-+ /* to avoid confusion */
-+ if (hctx->throttling) {
-+ log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
-+ }
-+
- free(hctx);
- }
-
-@@ -154,6 +188,8 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- config_values_t cv[] = {
- { "cgi.assign", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION }, /* 0 */
- { "cgi.execute-x-only", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 1 */
-+ { "cgi.high-waterlevel", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_CONNECTION }, /* 2 */
-+ { "cgi.low-waterlevel", NULL, T_CONFIG_INT, T_CONFIG_SCOPE_CONNECTION }, /* 3 */
- { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET}
- };
-
-@@ -169,9 +205,13 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
-
- s->cgi = array_init();
- s->execute_x_only = 0;
-+ s->high_waterlevel = 0; /* 0 == disabled */
-+ s->low_waterlevel = 0;
-
- cv[0].destination = s->cgi;
- cv[1].destination = &(s->execute_x_only);
-+ cv[2].destination = &(s->high_waterlevel);
-+ cv[3].destination = &(s->low_waterlevel);
-
- p->config_storage[i] = s;
-
-@@ -184,6 +224,51 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- }
-
-
-+static void cgi_recount_bytes_in_buffer(handler_ctx *hctx)
-+{
-+ chunkqueue *cq = hctx->remote_conn->write_queue;
-+ hctx->bytes_in_buffer = chunkqueue_length(cq) - chunkqueue_written(cq);
-+}
-+
-+
-+static void cgi_throttling_control(server *srv, handler_ctx *hctx)
-+{
-+ cgi_recount_bytes_in_buffer(hctx);
-+
-+#ifdef DEBUG
-+ sprintf(msgbuf, "throttling=%d, chars=%llu, high=%llu, low=%llu",
-+ hctx->throttling, hctx->bytes_in_buffer,
-+ hctx->high_waterlevel, hctx->low_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) throttling control,", msgbuf);
-+#endif
-+
-+ if (hctx->throttling) {
-+ sprintf(msgbuf, "throttling; chars in queue=%llu,"
-+ " low-waterlevel=%llu, high-waterlevel=%llu",
-+ hctx->bytes_in_buffer,
-+ hctx->low_waterlevel, hctx->high_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
-+ if (hctx->bytes_in_buffer <= hctx->low_waterlevel) {
-+ fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
-+ hctx->throttling = 0;
-+ log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
-+ }
-+ } else {
-+ if (hctx->high_waterlevel != 0 &&
-+ hctx->high_waterlevel <= hctx->bytes_in_buffer) {
-+ fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd);
-+ hctx->throttling = 1;
-+ sprintf(msgbuf, "throttled; chars in queue=%llu,"
-+ " low-waterlevel=%llu, high-waterlevel=%llu",
-+ hctx->bytes_in_buffer,
-+ hctx->low_waterlevel, hctx->high_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
-+ }
-+ }
-+}
-+
-+
- static int cgi_pid_add(server *srv, plugin_data *p, pid_t pid) {
- int m = -1;
- size_t i;
-@@ -230,6 +315,39 @@ static int cgi_pid_del(server *srv, plugin_data *p, pid_t pid) {
- return 0;
- }
-
-+
-+static void cgi_ctx_add(plugin_data *p, handler_ctx *hctx) {
-+ buffer_ctx_t *r = &(p->cgi_ctx);
-+
-+ if (r->size == 0) {
-+ r->size = 16;
-+ r->hctx = malloc(sizeof(*r->hctx) * r->size);
-+ } else if (r->used == r->size) {
-+ r->size += 16;
-+ r->hctx = realloc(r->hctx, sizeof(*r->hctx) * r->size);
-+ }
-+
-+ r->hctx[r->used++] = hctx;
-+}
-+
-+static void cgi_ctx_del(plugin_data *p, handler_ctx *hctx) {
-+ size_t i;
-+ buffer_ctx_t *r = &(p->cgi_ctx);
-+
-+ for (i = 0; i < r->used; i++) {
-+ if (r->hctx[i] == hctx) break;
-+ }
-+
-+ if (i != r->used) {
-+ /* found */
-+
-+ if (i != r->used - 1) {
-+ r->hctx[i] = r->hctx[r->used - 1];
-+ }
-+ r->used--;
-+ }
-+}
-+
- static int cgi_response_parse(server *srv, connection *con, plugin_data *p, buffer *in) {
- char *ns;
- const char *s;
-@@ -380,6 +498,14 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
-
- buffer_commit(hctx->response, n);
-
-+#ifdef DEBUG
-+ sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu", n,
-+ (unsigned long long)con->write_queue->bytes_out,
-+ (unsigned long long)con->write_queue->bytes_in);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) read,", msgbuf);
-+#endif
-+
- /* split header from body */
-
- if (con->file_started == 0) {
-@@ -503,7 +629,20 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
- }
- } else {
- http_chunk_append_buffer(srv, con, hctx->response);
-+#ifdef DEBUG
-+ sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu, limit=%llu", n,
-+ (unsigned long long)con->write_queue->bytes_out,
-+ (unsigned long long)con->write_queue->bytes_in,
-+ (unsigned long long)hctx->high_waterlevel);
-+ log_error_write(srv, __FILE__, __LINE__,
-+ "ss", "(debug) append,", msgbuf);
-+#endif
- joblist_append(srv, con);
-+
-+ cgi_throttling_control(srv, hctx);
-+ if (hctx->throttling) {
-+ return FDEVENT_HANDLED_NOT_FINISHED;
-+ }
- }
-
- #if 0
-@@ -553,8 +692,9 @@ static handler_t cgi_connection_close(server *srv, handler_ctx *hctx) {
- con->plugin_ctx[p->id] = NULL;
-
- /* is this a good idea ? */
-- cgi_handler_ctx_free(hctx);
--
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-+
- /* if waitpid hasn't been called by response.c yet, do it here */
- if (pid) {
- /* check if the CGI-script is already gone */
-@@ -1105,7 +1245,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- con->mode = p->id;
- buffer_reset(con->physical.path);
-
-- hctx = cgi_handler_ctx_init();
-+ hctx = cgi_handler_ctx_init(p);
-+ cgi_ctx_add(p, hctx);
-
- hctx->remote_conn = con;
- hctx->plugin_data = p;
-@@ -1114,6 +1255,11 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- hctx->fde_ndx = -1;
-
- con->plugin_ctx[p->id] = hctx;
-+#ifdef DEBUG
-+ sprintf(msgbuf, "hctx=%p, con=%p", (void*)hctx, (void*)con);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) hctx generated, ", msgbuf);
-+#endif
-
- fdevent_register(srv->ev, hctx->fd, cgi_handle_fdevent, hctx);
- fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
-@@ -1128,7 +1274,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
-
- close(hctx->fd);
-
-- cgi_handler_ctx_free(hctx);
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-
- con->plugin_ctx[p->id] = NULL;
-
-@@ -1153,6 +1300,8 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
-
- PATCH(cgi);
- PATCH(execute_x_only);
-+ PATCH(high_waterlevel);
-+ PATCH(low_waterlevel);
-
- /* skip the first, the global context */
- for (i = 1; i < srv->config_context->used; i++) {
-@@ -1170,6 +1319,10 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
- PATCH(cgi);
- } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.execute-x-only"))) {
- PATCH(execute_x_only);
-+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.high-waterlevel"))) {
-+ PATCH(high_waterlevel);
-+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.low-waterlevel"))) {
-+ PATCH(low_waterlevel);
- }
- }
- }
-@@ -1222,6 +1375,21 @@ URIHANDLER_FUNC(cgi_is_handled) {
- TRIGGER_FUNC(cgi_trigger) {
- plugin_data *p = p_d;
- size_t ndx;
-+
-+ for (ndx = 0; ndx < p->cgi_ctx.used; ndx++) {
-+ handler_ctx *hctx = p->cgi_ctx.hctx[ndx];
-+#ifdef DEBUG
-+ connection *con = hctx->remote_conn;
-+
-+ sprintf(msgbuf, "hctx=%p, con=%p, bytes_in_buffer=%llu",
-+ (void*)hctx, (void*)con,
-+ (unsigned long long)hctx->bytes_in_buffer);
-+ log_error_write(srv, __FILE__, __LINE__, "ss",
-+ "(debug) found using ctx,", msgbuf);
-+#endif
-+ cgi_throttling_control(srv, hctx);
-+ }
-+
- /* the trigger handle only cares about lonely PID which we have to wait for */
- #ifndef __WIN32
-
-@@ -1330,7 +1498,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
- log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
- }
-
-- cgi_handler_ctx_free(hctx);
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-
- con->plugin_ctx[p->id] = NULL;
-
-@@ -1362,7 +1531,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
- log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
- }
-
-- cgi_handler_ctx_free(hctx);
-+ cgi_ctx_del(p, hctx);
-+ cgi_handler_ctx_free(srv, hctx);
-
- con->plugin_ctx[p->id] = NULL;
- return HANDLER_FINISHED;
diff --git a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb
index 67b6e3749..378accbf1 100644
--- a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
+++ b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb
@@ -21,11 +21,10 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
file://lighttpd \
file://lighttpd.service \
file://pkgconfig.patch \
- file://0001-mod_cgi-buffers-data-without-bound.patch \
"
-SRC_URI[md5sum] = "1843daffcb018aa528f6d15d43544654"
-SRC_URI[sha256sum] = "897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53"
+SRC_URI[md5sum] = "63c7563be1c7a7a9819a51f07f1af8b2"
+SRC_URI[sha256sum] = "7eb9a1853c3d6dd5851682b0733a729ba4158d6bdff80974d5ef5f1f6887365b"
PACKAGECONFIG ??= "openssl"
PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
diff --git a/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb b/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
index c9f6a8bd9..ece0eab0f 100644
--- a/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -24,6 +24,10 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar
SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
+UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
+
S = "${WORKDIR}/lsb-release-1.4"
CLEANBROKEN = "1"
@@ -121,6 +125,7 @@ do_install_append(){
fi
}
FILES_${PN} += "/lib64 \
+ ${base_libdir} \
/usr/lib/lsb \
${base_libdir}/lsb/* \
/lib/lsb/* \
diff --git a/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb b/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
index 150f6f230..727305015 100644
--- a/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
+++ b/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
@@ -30,5 +30,4 @@ do_compile[noexec] = "1"
do_install(){
install -d ${D}${sysconfdir}/init.d/
install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
- sed -i 's,${base_bindir}/mountpoint,${bindir}/mountpoint,g' ${D}${sysconfdir}/init.d/functions
}
diff --git a/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb b/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
index 9b7de9aad..c10337beb 100644
--- a/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
+++ b/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
@@ -9,6 +9,8 @@ SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386"
SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718"
+UPSTREAM_CHECK_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof"
+
LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
S = "${WORKDIR}/lsof_${PV}_src"
@@ -44,7 +46,8 @@ do_configure () {
export I = "${STAGING_INCDIR}"
export L = "${STAGING_INCDIR}"
-export EXTRA_OEMAKE = ""
+
+EXTRA_OEMAKE = ""
do_compile () {
oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
deleted file mode 100644
index 1b4d2324a..000000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 7 Dec 2013 18:24:32 +0100
-Subject: [PATCH] Rename runtests_noltp.sh script so have unique name
-
-* they are installed in the same target path
- /opt/ltp/testcases/bin/runtests_noltp.sh
- and overwrite each other in non-deterministic way
- when multiple processes are used in "make install"
-
- ./temp/log.do_install:install -m 00775
- "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
- "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
- ./temp/log.do_install:install -m 00775
- "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
- "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++
- .../kernel/containers/sysvipc/runtests_noltp.sh | 31 ----------------
- .../kernel/containers/utsname/runtests_noltp.sh | 41 ----------------------
- .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++
- 4 files changed, 72 insertions(+), 72 deletions(-)
- create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh
- delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh
- delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh
- create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh
-
-diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
-new file mode 100644
-index 0000000..84f398f
---- /dev/null
-+++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
-@@ -0,0 +1,31 @@
-+#!/bin/sh
-+################################################################################
-+## ##
-+## Copyright (c) International Business Machines Corp., 2007 ##
-+## ##
-+## This program is free software; you can redistribute it and#or modify ##
-+## it under the terms of the GNU General Public License as published by ##
-+## the Free Software Foundation; either version 2 of the License, or ##
-+## (at your option) any later version. ##
-+## ##
-+## This program is distributed in the hope that it will be useful, but ##
-+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
-+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
-+## for more details. ##
-+## ##
-+## You should have received a copy of the GNU General Public License ##
-+## along with this program; if not, write to the Free Software ##
-+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
-+## ##
-+################################################################################
-+
-+exit_code=0
-+echo "sysvipc tests"
-+for type in none clone unshare; do
-+ echo "**sysvipc $type"
-+ ./shmnstest_noltp $type
-+ if [ $? -ne 0 ]; then
-+ exit_code=$?
-+ fi
-+done
-+exit $exit_code
-diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh
-deleted file mode 100644
-index 84f398f..0000000
---- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh
-+++ /dev/null
-@@ -1,31 +0,0 @@
--#!/bin/sh
--################################################################################
--## ##
--## Copyright (c) International Business Machines Corp., 2007 ##
--## ##
--## This program is free software; you can redistribute it and#or modify ##
--## it under the terms of the GNU General Public License as published by ##
--## the Free Software Foundation; either version 2 of the License, or ##
--## (at your option) any later version. ##
--## ##
--## This program is distributed in the hope that it will be useful, but ##
--## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
--## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
--## for more details. ##
--## ##
--## You should have received a copy of the GNU General Public License ##
--## along with this program; if not, write to the Free Software ##
--## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
--## ##
--################################################################################
--
--exit_code=0
--echo "sysvipc tests"
--for type in none clone unshare; do
-- echo "**sysvipc $type"
-- ./shmnstest_noltp $type
-- if [ $? -ne 0 ]; then
-- exit_code=$?
-- fi
--done
--exit $exit_code
-diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh
-deleted file mode 100755
-index 43cb7e2..0000000
---- a/testcases/kernel/containers/utsname/runtests_noltp.sh
-+++ /dev/null
-@@ -1,41 +0,0 @@
--#!/bin/sh
--################################################################################
--## ##
--## Copyright (c) International Business Machines Corp., 2007 ##
--## ##
--## This program is free software; you can redistribute it and#or modify ##
--## it under the terms of the GNU General Public License as published by ##
--## the Free Software Foundation; either version 2 of the License, or ##
--## (at your option) any later version. ##
--## ##
--## This program is distributed in the hope that it will be useful, but ##
--## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
--## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
--## for more details. ##
--## ##
--## You should have received a copy of the GNU General Public License ##
--## along with this program; if not, write to the Free Software ##
--## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
--## ##
--################################################################################
--
--oldhostname=`hostname`
--exit_code=0
--echo "unshare tests"
--for i in `seq 1 5`; do
-- echo "test $i (unshare)"
-- ./utstest_noltp unshare $i
-- if [ $? -ne 0 ]; then
-- exit_code=$?
-- fi
--done
--echo "clone tests"
--for i in `seq 1 5`; do
-- echo "test $i (clone)"
-- ./utstest_noltp clone $i
-- if [ $? -ne 0 ]; then
-- exit_code=$?
-- fi
--done
--hostname "$oldhostname"
--exit $exit_code
-diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh
-new file mode 100755
-index 0000000..43cb7e2
---- /dev/null
-+++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh
-@@ -0,0 +1,41 @@
-+#!/bin/sh
-+################################################################################
-+## ##
-+## Copyright (c) International Business Machines Corp., 2007 ##
-+## ##
-+## This program is free software; you can redistribute it and#or modify ##
-+## it under the terms of the GNU General Public License as published by ##
-+## the Free Software Foundation; either version 2 of the License, or ##
-+## (at your option) any later version. ##
-+## ##
-+## This program is distributed in the hope that it will be useful, but ##
-+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
-+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
-+## for more details. ##
-+## ##
-+## You should have received a copy of the GNU General Public License ##
-+## along with this program; if not, write to the Free Software ##
-+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
-+## ##
-+################################################################################
-+
-+oldhostname=`hostname`
-+exit_code=0
-+echo "unshare tests"
-+for i in `seq 1 5`; do
-+ echo "test $i (unshare)"
-+ ./utstest_noltp unshare $i
-+ if [ $? -ne 0 ]; then
-+ exit_code=$?
-+ fi
-+done
-+echo "clone tests"
-+for i in `seq 1 5`; do
-+ echo "test $i (clone)"
-+ ./utstest_noltp clone $i
-+ if [ $? -ne 0 ]; then
-+ exit_code=$?
-+ fi
-+done
-+hostname "$oldhostname"
-+exit $exit_code
---
-1.8.4.3
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
index 20fd4c369..585b7cbc6 100644
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
@@ -1,16 +1,15 @@
-From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001
+From 14985fccf7428eaa0b45decc22bfd20fd780f621 Mon Sep 17 00:00:00 2001
From: Chong Lu <Chong.Lu@windriver.com>
Date: Tue, 11 Mar 2014 14:47:22 +0800
-Subject: [PATCH] ltp: Don't link against libfl
+Subject: [PATCH 01/32] ltp: Don't link against libfl
We have already defined yywrap function in scan.l file. After this, we no longer need to
link against libfl and so no longer get errors about undefined references to yylex.
-Upstream-Status: Pending
-
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- pan/Makefile | 2 +-
+ pan/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pan/Makefile b/pan/Makefile
@@ -27,5 +26,5 @@ index 4cc6466..a4b575b 100644
LFLAGS += -l
--
-1.7.9.5
+2.7.0
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
deleted file mode 100644
index 0b594dc55..000000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Upstream-Status: Backport [From https://github.com/linux-test-project/ltp/commit/40a2457cb8ec42a05a2f96b0810057efdb2a55f5]
-
-gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which causes
-semantics for inline functions changes.
-
-The standalone 'inline' causes error with gcc 5 such as:
-
-git/testcases/kernel/syscalls/kill/kill10.c:355: undefined reference to `k_sigaction'
-
-Replace inline with static inline to be compatible with both gcc 4 and 5.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- testcases/kernel/controllers/libcontrollers/libcontrollers.c | 2 +-
- testcases/kernel/controllers/libcontrollers/libcontrollers.h | 2 +-
- testcases/kernel/syscalls/kill/kill10.c | 4 ++--
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.c b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
-index b01e1b8..8857bc9 100644
---- a/testcases/kernel/controllers/libcontrollers/libcontrollers.c
-+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
-@@ -146,7 +146,7 @@ int read_file(char *filepath, int action, unsigned int *value)
- * Prints error message and returns -1
- */
-
--inline int error_function(char *msg1, char *msg2)
-+static inline int error_function(char *msg1, char *msg2)
- {
- fprintf(stdout, "ERROR: %s ", msg1);
- fprintf(stdout, "%s\n", msg2);
-diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.h b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
-index 4001555..a1a0dfa 100644
---- a/testcases/kernel/controllers/libcontrollers/libcontrollers.h
-+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
-@@ -70,7 +70,7 @@ enum{
- GET_TASKS
- };
-
--inline int error_function(char *msg1, char *msg2);
-+static inline int error_function(char *msg1, char *msg2);
-
- unsigned int read_shares_file (char *filepath);
-
-diff --git a/testcases/kernel/syscalls/kill/kill10.c b/testcases/kernel/syscalls/kill/kill10.c
-index 982d9da..33dbcd3 100644
---- a/testcases/kernel/syscalls/kill/kill10.c
-+++ b/testcases/kernel/syscalls/kill/kill10.c
-@@ -185,7 +185,7 @@ int child_checklist_total = 0;
- int checklist_cmp(const void *a, const void *b);
- void checklist_reset(int bit);
-
--inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
-+static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
-
- char *TCID = "kill10";
- int TST_TOTAL = 1;
-@@ -756,7 +756,7 @@ void checklist_reset(int bit)
-
- }
-
--inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
-+static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
- {
- int ret;
- if ((ret = sigaction(sig, sa, osa)) == -1) {
----
--1.9.1
--
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
new file mode 100644
index 000000000..68725dc7a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
@@ -0,0 +1,43 @@
+From 867ad5d5d64b9b27ee32148027532db0a00f6433 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Thu, 7 Jan 2016 17:33:26 +0000
+Subject: [PATCH 02/32] Add knob to control whether numa support should be
+ checked
+
+otherwise undeterministic dependency will be generated
+during build depending upong numa being staged or not
+
+signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ m4/ltp-numa.m4 | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
+index 60ae07b..ed7078d 100644
+--- a/m4/ltp-numa.m4
++++ b/m4/ltp-numa.m4
+@@ -24,7 +24,13 @@ dnl ----------------------------
+ dnl
+ AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
+ [dnl
+-AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
++AC_MSG_CHECKING([for numa])
++AC_ARG_WITH(
++ [numa],
++ AC_HELP_STRING([--without-numa],
++ [without numa support]),
++ [],
++ [AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
+ LTP_SYSCALL_NUMA_HEADERS=yes
+ AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
+ if test "x$have_numa_alloc_onnode" = "xyes"; then
+@@ -48,3 +54,5 @@ if test "x$have_mpol_constants" = "xyes"; then
+ AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
+ fi
+ )])
++AC_MSG_RESULT([$with_numa])
++])
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
index 36ff4c775..bf1176fc4 100644
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
@@ -1,14 +1,19 @@
-[PATCH] add knob to control whether tirpc support should be checked
+From b193011da301b3d944e8fddcf4817513c31c5b88 Mon Sep 17 00:00:00 2001
+From: Fathi Boudra <fathi.boudra@linaro.org>
+Date: Thu, 7 Jan 2016 17:36:19 +0000
+Subject: [PATCH 03/32] Add knob to control tirpc support
-Upstream-Status: Pending
-
-tirpc support is broken upstream. in the meantime, allow to disable tirpc.
+allow to disable tirpc. Helps to disable it at top level for eg. musl it
+does not yet work.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- configure.ac | 9 +++++++++
+ configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
+diff --git a/configure.ac b/configure.ac
+index cc50397..9e2936b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then
@@ -25,7 +30,7 @@ Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
# END tools knobs
# Testsuites knobs
-@@ -182,7 +189,9 @@ LTP_CHECK_RENAMEAT
+@@ -169,7 +176,9 @@ LTP_CHECK_RENAMEAT2
LTP_CHECK_FALLOCATE
LTP_CHECK_SYSCALL_FCNTL
LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
@@ -35,3 +40,6 @@ Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
LTP_CHECK_TEE
LTP_CHECK_SPLICE
LTP_CHECK_VMSPLICE
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
new file mode 100644
index 000000000..2de936304
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
@@ -0,0 +1,147 @@
+From 53acddddf1b324e06af886ee4639b774e5c8c8bc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 18:19:03 +0000
+Subject: [PATCH 04/32] build: Add option to select libc implementation
+
+There are more than glibc for C library implementation available on
+linux now a days, uclibc cloaked like glibc but musl e.g. is very
+different and does not implement all GNU extentions
+
+Disable tests specifically not building _yet_ on musl based systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 5 +++++
+ testcases/kernel/Makefile | 5 ++++-
+ testcases/kernel/sched/Makefile | 4 +++-
+ testcases/kernel/syscalls/Makefile | 5 +++++
+ testcases/network/nfsv4/acl/Makefile | 4 ++++
+ testcases/network/rpc/basic_tests/Makefile | 5 +++++
+ testcases/realtime/func/pi-tests/Makefile | 4 ++++
+ testcases/realtime/stress/pi-tests/Makefile | 5 +++++
+ 8 files changed, 35 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 297f8e7..906b280 100644
+--- a/Makefile
++++ b/Makefile
+@@ -49,6 +49,11 @@ SKIP_IDCHECK ?= 0
+ UCLINUX ?= 0
+ export UCLINUX
+
++# System C library implementation (glibc,uclibc,musl etc.)
++# default to glibc if not set
++LIBC ?= glibc
++export LIBC
++
+ # CLEAN_TARGETS: Targets which exist solely in clean.
+ # COMMON_TARGETS: Targets which exist in all, clean, and install.
+ # INSTALL_TARGETS: Targets which exist in clean and install (contains
+diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
+index 50a12fa..4f1987f 100644
+--- a/testcases/kernel/Makefile
++++ b/testcases/kernel/Makefile
+@@ -47,13 +47,16 @@ SUBDIRS += connectors \
+ logging \
+ mem \
+ numa \
+- pty \
+ sched \
+ security \
+ timers \
+ tracing \
+ module \
+
++ifneq ($(LIBC),musl)
++SUBDIRS += pty
++endif
++
+ ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
+ SUBDIRS += power_management
+ endif
+diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
+index 6245ed0..aa4eb7f 100644
+--- a/testcases/kernel/sched/Makefile
++++ b/testcases/kernel/sched/Makefile
+@@ -23,5 +23,7 @@
+ top_srcdir ?= ../../..
+
+ include $(top_srcdir)/include/mk/env_pre.mk
+-
++ifeq ($(LIBC),musl)
++ FILTER_OUT_DIRS += process_stress
++endif
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
+index 8acb395..b749126 100644
+--- a/testcases/kernel/syscalls/Makefile
++++ b/testcases/kernel/syscalls/Makefile
+@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
+ FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
+ mincore mprotect nftw profil remap_file_pages sbrk
+ endif
++ifeq ($(LIBC),musl)
++FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
++ rt_sigsuspend setdomainname sethostname sigsuspend \
++ ustat
++endif
+
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
+index 8bc78c2..c36cf50 100644
+--- a/testcases/network/nfsv4/acl/Makefile
++++ b/testcases/network/nfsv4/acl/Makefile
+@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
+
+ LDLIBS += $(ACL_LIBS)
+
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS := acl1
++endif
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
+index 3160813..9bdf5d0 100644
+--- a/testcases/network/rpc/basic_tests/Makefile
++++ b/testcases/network/rpc/basic_tests/Makefile
+@@ -23,4 +23,9 @@
+ top_srcdir ?= ../../../..
+
+ include $(top_srcdir)/include/mk/env_pre.mk
++
++ifeq ($(LIBC),musl)
++FILTER_OUT_DIRS += rpc01
++endif
++
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
+index 7a7a57a..5808866 100644
+--- a/testcases/realtime/func/pi-tests/Makefile
++++ b/testcases/realtime/func/pi-tests/Makefile
+@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
+ include $(abs_srcdir)/../../config.mk
+
+ MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex
++endif
++
+
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
+index 5edc3b4..aa5987a 100644
+--- a/testcases/realtime/stress/pi-tests/Makefile
++++ b/testcases/realtime/stress/pi-tests/Makefile
+@@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
+
+ include $(top_srcdir)/include/mk/env_pre.mk
+ include $(abs_srcdir)/../../config.mk
++
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS := testpi-3
++endif
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
new file mode 100644
index 000000000..8dab1ed2e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
@@ -0,0 +1,45 @@
+From 6e3058521b50d91d4b0569c4d491c5af5ff798b2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 18:22:38 +0000
+Subject: [PATCH 05/32] kernel/controllers: Link with libfts explicitly on musl
+
+musl does not implement fts like glibc and therefore it depends on
+external implementation for all fts APIs
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/controllers/Makefile.inc | 3 +++
+ testcases/kernel/controllers/cpuset/Makefile.inc | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/testcases/kernel/controllers/Makefile.inc b/testcases/kernel/controllers/Makefile.inc
+index b106283..ef5fc0c 100644
+--- a/testcases/kernel/controllers/Makefile.inc
++++ b/testcases/kernel/controllers/Makefile.inc
+@@ -36,6 +36,9 @@ MAKE_DEPS := $(LIB)
+ CPPFLAGS += -I$(abs_srcdir)/../$(LIBDIR)
+
+ LDFLAGS += -L$(abs_builddir)/../$(LIBDIR)
++ifeq ($(LIBC),musl)
++LDLIBS += -lfts
++endif
+
+ INSTALL_TARGETS ?= *.sh
+
+diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
+index 9e002f4..e0fcb9c 100644
+--- a/testcases/kernel/controllers/cpuset/Makefile.inc
++++ b/testcases/kernel/controllers/cpuset/Makefile.inc
+@@ -42,6 +42,9 @@ MAKE_DEPS := $(LIBCONTROLLERS) $(LIBCPUSET)
+ LDFLAGS += -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
+
+ LDLIBS += -lcpu_set -lcontrollers -lltp
++ifeq ($(LIBC),musl)
++LDLIBS += -lfts
++endif
+
+ INSTALL_TARGETS ?= *.sh
+
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
new file mode 100644
index 000000000..56a48abcc
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
@@ -0,0 +1,31 @@
+From fb8b895385a641d74f2186fe5f20a872209692ed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 18:24:20 +0000
+Subject: [PATCH 06/32] sendfile: Use off64_t instead of __off64_t
+
+__off64_t is specific to glibc where as off64_t is widely available
+Add _GNU_SOURCE for off64_t defines from sys/types.h
+Fixes
+<command-line>:0:7: error: unknown type name 'off64_t'
+sendfile02.c:97:18: note: in expansion of macro 'OFF_T'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/sendfile/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/sendfile/Makefile b/testcases/kernel/syscalls/sendfile/Makefile
+index df7b63f..1bd1b57 100644
+--- a/testcases/kernel/syscalls/sendfile/Makefile
++++ b/testcases/kernel/syscalls/sendfile/Makefile
+@@ -21,6 +21,6 @@ top_srcdir ?= ../../../..
+ include $(top_srcdir)/include/mk/testcases.mk
+ include $(abs_srcdir)/../utils/newer_64.mk
+
+-%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=__off64_t
++%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=off64_t -D_GNU_SOURCE
+
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
new file mode 100644
index 000000000..4be906ec7
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
@@ -0,0 +1,394 @@
+From 405c03171e4bf0edd698cb602cf7bd7fe1d0401a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:33:53 +0000
+Subject: [PATCH 07/32] replace SIGCLD with SIGCHLD
+
+its defined to use SIGCHLD anyway in
+
+bits/signum.h:#define SIGCLD SIGCHLD /* Same as SIGCHLD
+(System V). */
+
+plus it helps these tests compile with musl which adheres to posix
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/tst_sig.c | 8 ++++----
+ testcases/kernel/connectors/pec/pec_listener.c | 1 +
+ testcases/kernel/fs/doio/doio.c | 4 ++--
+ testcases/kernel/fs/doio/growfiles.c | 2 +-
+ testcases/kernel/syscalls/fcntl/fcntl11.c | 8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl17.c | 8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl19.c | 8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl20.c | 8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl21.c | 8 ++++----
+ testcases/kernel/syscalls/kill/kill02.c | 6 +++---
+ testcases/kernel/syscalls/kill/kill12.c | 8 ++++----
+ testcases/kernel/syscalls/mkdir/mkdir09.c | 12 ++++++------
+ testcases/kernel/syscalls/sighold/sighold02.c | 2 +-
+ testcases/network/tcp_cmds/perf_lan/pingpong.c | 2 +-
+ testcases/network/tcp_cmds/perf_lan/pingpong6.c | 2 +-
+ 15 files changed, 44 insertions(+), 43 deletions(-)
+
+diff --git a/lib/tst_sig.c b/lib/tst_sig.c
+index 3af5ffd..36565e1 100644
+--- a/lib/tst_sig.c
++++ b/lib/tst_sig.c
+@@ -49,7 +49,7 @@
+ fork_flag - set to FORK or NOFORK depending upon whether the
+ calling program executes a fork() system call. It
+ is normally the case that the calling program treats
+- SIGCLD as an expected signal if fork() is being used.
++ SIGCHLD as an expected signal if fork() is being used.
+
+ handler - a pointer to the unexpected signal handler to
+ be executed after an unexpected signal has been
+@@ -82,7 +82,7 @@ static void (*tst_setup_signal(int, void (*)(int))) (int);
+
+ /****************************************************************************
+ * tst_sig() : set-up to catch unexpected signals. fork_flag is set to NOFORK
+- * if SIGCLD is to be an "unexpected signal", otherwise it is set to
++ * if SIGCHLD is to be an "unexpected signal", otherwise it is set to
+ * FORK. cleanup points to a cleanup routine to be executed before
+ * tst_exit is called (cleanup is set to NULL if no cleanup is desired).
+ * handler is a pointer to the signal handling routine (if handler is
+@@ -117,7 +117,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
+ for (sig = 1; sig < NSIG; sig++) {
+ /*
+ * SIGKILL is never unexpected.
+- * SIGCLD is only unexpected when
++ * SIGCHLD is only unexpected when
+ * no forking is being done.
+ * SIGINFO is used for file quotas and should be expected
+ */
+@@ -205,7 +205,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
+ #endif
+ break;
+
+- case SIGCLD:
++ case SIGCHLD:
+ if (fork_flag == FORK)
+ continue;
+
+diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
+index a1beb13..002750a 100644
+--- a/testcases/kernel/connectors/pec/pec_listener.c
++++ b/testcases/kernel/connectors/pec/pec_listener.c
+@@ -20,6 +20,7 @@
+ /* */
+ /******************************************************************************/
+
++#define _GNU_SOURCE
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <sys/types.h>
+diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
+index 4b0dec5..5f65ef9 100644
+--- a/testcases/kernel/fs/doio/doio.c
++++ b/testcases/kernel/fs/doio/doio.c
+@@ -573,7 +573,7 @@ int main(int argc, char **argv)
+ case SIGTSTP:
+ case SIGSTOP:
+ case SIGCONT:
+- case SIGCLD:
++ case SIGCHLD:
+ case SIGBUS:
+ case SIGSEGV:
+ case SIGQUIT:
+@@ -615,7 +615,7 @@ int main(int argc, char **argv)
+ }
+
+ sigemptyset(&block_mask);
+- sigaddset(&block_mask, SIGCLD);
++ sigaddset(&block_mask, SIGCHLD);
+ sigprocmask(SIG_BLOCK, &block_mask, &omask);
+
+ /*
+diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c
+index 09e7f35..bbad230 100644
+--- a/testcases/kernel/fs/doio/growfiles.c
++++ b/testcases/kernel/fs/doio/growfiles.c
+@@ -1640,7 +1640,7 @@ int set_sig(void)
+ #ifdef SIGRESTART
+ case SIGRESTART:
+ #endif /* SIGRESTART */
+- case SIGCLD:
++ case SIGCHLD:
+ break;
+
+ default:
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl11.c b/testcases/kernel/syscalls/fcntl/fcntl11.c
+index fa6ce53..2de2b6c 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl11.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl11.c
+@@ -105,10 +105,10 @@ void setup(void)
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = catch_child;
+ sigemptyset(&act.sa_mask);
+- sigaddset(&act.sa_mask, SIGCLD);
+- if ((sigaction(SIGCLD, &act, NULL)) < 0)
++ sigaddset(&act.sa_mask, SIGCHLD);
++ if ((sigaction(SIGCHLD, &act, NULL)) < 0)
+ tst_brkm(TBROK | TERRNO, cleanup,
+- "sigaction(SIGCLD, ..) failed");
++ "sigaction(SIGCHLD, ..) failed");
+ }
+
+ void do_child(void)
+@@ -227,7 +227,7 @@ void stop_child(void)
+ {
+ struct flock fl;
+
+- signal(SIGCLD, SIG_DFL);
++ signal(SIGCHLD, SIG_DFL);
+ fl.l_type = STOP;
+ parent_put(&fl);
+ wait(0);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl17.c b/testcases/kernel/syscalls/fcntl/fcntl17.c
+index 5b03e39..6598b20 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl17.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl17.c
+@@ -150,9 +150,9 @@ int setup(void)
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = catch_child;
+ sigemptyset(&act.sa_mask);
+- sigaddset(&act.sa_mask, SIGCLD);
+- if (sigaction(SIGCLD, &act, NULL) < 0) {
+- tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
++ sigaddset(&act.sa_mask, SIGCHLD);
++ if (sigaction(SIGCHLD, &act, NULL) < 0) {
++ tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
+ return 1;
+ }
+ return 0;
+@@ -381,7 +381,7 @@ void stop_children(void)
+ {
+ int arg;
+
+- signal(SIGCLD, SIG_DFL);
++ signal(SIGCHLD, SIG_DFL);
+ arg = STOP;
+ child_free(child_pipe1[1], arg);
+ child_free(child_pipe2[1], arg);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl19.c b/testcases/kernel/syscalls/fcntl/fcntl19.c
+index a542cfc..88c91d6 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl19.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl19.c
+@@ -112,9 +112,9 @@ void setup(void)
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = catch_child;
+ sigemptyset(&act.sa_mask);
+- sigaddset(&act.sa_mask, SIGCLD);
+- if ((sigaction(SIGCLD, &act, NULL)) < 0) {
+- tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
++ sigaddset(&act.sa_mask, SIGCHLD);
++ if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
++ tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
+ fail = 1;
+ }
+ }
+@@ -265,7 +265,7 @@ void stop_child(void)
+ {
+ struct flock fl;
+
+- signal(SIGCLD, SIG_DFL);
++ signal(SIGCHLD, SIG_DFL);
+ fl.l_type = STOP;
+ parent_put(&fl);
+ wait(0);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl20.c b/testcases/kernel/syscalls/fcntl/fcntl20.c
+index aa06bab..99fd783 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl20.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl20.c
+@@ -109,9 +109,9 @@ void setup(void)
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = catch_child;
+ sigemptyset(&act.sa_mask);
+- sigaddset(&act.sa_mask, SIGCLD);
+- if (sigaction(SIGCLD, &act, NULL) == -1)
+- tst_brkm(TFAIL | TERRNO, cleanup, "SIGCLD signal setup failed");
++ sigaddset(&act.sa_mask, SIGCHLD);
++ if (sigaction(SIGCHLD, &act, NULL) == -1)
++ tst_brkm(TFAIL | TERRNO, cleanup, "SIGCHLD signal setup failed");
+ }
+
+ void cleanup(void)
+@@ -264,7 +264,7 @@ void stop_child(void)
+ {
+ struct flock fl;
+
+- signal(SIGCLD, SIG_DFL);
++ signal(SIGCHLD, SIG_DFL);
+ fl.l_type = STOP;
+ parent_put(&fl);
+ wait(0);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl21.c b/testcases/kernel/syscalls/fcntl/fcntl21.c
+index 5307021..8f1a67c 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl21.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl21.c
+@@ -110,9 +110,9 @@ void setup(void)
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = catch_child;
+ sigemptyset(&act.sa_mask);
+- sigaddset(&act.sa_mask, SIGCLD);
+- if ((sigaction(SIGCLD, &act, NULL)) < 0) {
+- tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
++ sigaddset(&act.sa_mask, SIGCHLD);
++ if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
++ tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
+ fail = 1;
+ }
+ }
+@@ -272,7 +272,7 @@ void stop_child(void)
+ {
+ struct flock fl;
+
+- signal(SIGCLD, SIG_DFL);
++ signal(SIGCHLD, SIG_DFL);
+ fl.l_type = STOP;
+ parent_put(&fl);
+ wait(0);
+diff --git a/testcases/kernel/syscalls/kill/kill02.c b/testcases/kernel/syscalls/kill/kill02.c
+index 9d6cc68..08360dd 100644
+--- a/testcases/kernel/syscalls/kill/kill02.c
++++ b/testcases/kernel/syscalls/kill/kill02.c
+@@ -701,7 +701,7 @@ void setup(void)
+
+ /*
+ * Set to catch unexpected signals.
+- * SIGCLD is set to be ignored because we do not wait for termination status.
++ * SIGCHLD is set to be ignored because we do not wait for termination status.
+ * SIGUSR1 is set to be ignored because this is the signal we are using for
+ * the test and we are not concerned with the parent getting it.
+ */
+@@ -713,9 +713,9 @@ void setup(void)
+ "signal(SIGUSR1, SIG_IGN) failed");
+ }
+
+- if (signal(SIGCLD, SIG_IGN) == SIG_ERR) {
++ if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
+ tst_brkm(TBROK | TERRNO, NULL,
+- "signal(SIGCLD, SIG_IGN) failed");
++ "signal(SIGCHLD, SIG_IGN) failed");
+ }
+
+ TEST_PAUSE;
+diff --git a/testcases/kernel/syscalls/kill/kill12.c b/testcases/kernel/syscalls/kill/kill12.c
+index 7a47a4a..d7c4147 100644
+--- a/testcases/kernel/syscalls/kill/kill12.c
++++ b/testcases/kernel/syscalls/kill/kill12.c
+@@ -98,7 +98,7 @@ int main(int argc, char **argv)
+
+ exno = 1;
+
+- if (sigset(SIGCLD, chsig) == SIG_ERR) {
++ if (sigset(SIGCHLD, chsig) == SIG_ERR) {
+ fprintf(temp, "\tsigset failed, errno = %d\n", errno);
+ fail_exit();
+ }
+@@ -128,7 +128,7 @@ int main(int argc, char **argv)
+ sleep(1);
+
+ kill(pid, sig); /* child should ignroe this sig */
+- kill(pid, SIGCLD); /* child should exit */
++ kill(pid, SIGCHLD); /* child should exit */
+
+ #ifdef BCS
+ while ((npid = wait(&status)) != pid
+@@ -222,14 +222,14 @@ void do_child(void)
+ int exno = 1;
+
+ #ifdef UCLINUX
+- if (sigset(SIGCLD, chsig) == SIG_ERR) {
++ if (sigset(SIGCHLD, chsig) == SIG_ERR) {
+ fprintf(temp, "\tsigset failed, errno = %d\n", errno);
+ fail_exit();
+ }
+ #endif
+
+ sigset(sig, SIG_IGN); /* set to ignore signal */
+- kill(getppid(), SIGCLD); /* tell parent we are ready */
++ kill(getppid(), SIGCHLD); /* tell parent we are ready */
+ while (!chflag)
+ sleep(1); /* wait for parent */
+
+diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
+index 41c20e9..07b4fb8 100644
+--- a/testcases/kernel/syscalls/mkdir/mkdir09.c
++++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
+@@ -122,10 +122,10 @@ int main(int argc, char *argv[])
+
+ }
+
+- /* Set up to catch SIGCLD signal */
+- if (signal(SIGCLD, chld) == SIG_ERR) {
++ /* Set up to catch SIGCHLD signal */
++ if (signal(SIGCHLD, chld) == SIG_ERR) {
+ tst_brkm(TFAIL, cleanup,
+- "Error setting up SIGCLD signal, ERRNO = %d", errno);
++ "Error setting up SIGCHLD signal, ERRNO = %d", errno);
+
+ }
+
+@@ -236,9 +236,9 @@ int runtest(void)
+ tst_brkm(TFAIL, cleanup,
+ "Error resetting SIGTERM signal, ERRNO = %d", errno);
+ }
+- if (signal(SIGCLD, SIG_DFL) == SIG_ERR) {
++ if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) {
+ tst_brkm(TFAIL, cleanup,
+- "Error resetting SIGCLD signal, ERRNO = %d", errno);
++ "Error resetting SIGCHLD signal, ERRNO = %d", errno);
+ }
+
+ if (test_time) {
+@@ -372,7 +372,7 @@ void term(int sig)
+
+ void chld(int sig)
+ {
+- /* Routine to handle SIGCLD signal. */
++ /* Routine to handle SIGCHLD signal. */
+
+ sigchld++;
+ if (jump) {
+diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
+index e3076fb..be01874 100644
+--- a/testcases/kernel/syscalls/sighold/sighold02.c
++++ b/testcases/kernel/syscalls/sighold/sighold02.c
+@@ -77,7 +77,7 @@ static int sigs_map[NUMSIGS];
+ static int skip_sig(int sig)
+ {
+ switch (sig) {
+- case SIGCLD:
++ case SIGCHLD:
+ case SIGKILL:
+ case SIGALRM:
+ case SIGSTOP:
+diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong.c b/testcases/network/tcp_cmds/perf_lan/pingpong.c
+index 1196312..5b06798 100644
+--- a/testcases/network/tcp_cmds/perf_lan/pingpong.c
++++ b/testcases/network/tcp_cmds/perf_lan/pingpong.c
+@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
+
+ /* Setup traps */
+ signal(SIGINT, finish);
+- signal(SIGCLD, finish);
++ signal(SIGCHLD, finish);
+
+ /* Fork a child process to continue sending packets */
+ tst_resm(TINFO, "Create a child process to continue to send packets");
+diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong6.c b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
+index 9747f58..0a0fb1d 100644
+--- a/testcases/network/tcp_cmds/perf_lan/pingpong6.c
++++ b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
+@@ -153,7 +153,7 @@ char *argv[];
+
+ /* Setup traps */
+ signal(SIGINT, finish);
+- signal(SIGCLD, finish);
++ signal(SIGCHLD, finish);
+
+ /* Fork a child process to continue sending packets */
+ printf("Create a child process to continue to send packets \n");
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
new file mode 100644
index 000000000..d12307420
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
@@ -0,0 +1,285 @@
+From a3cbee31daae2466bc8dcac36b33a01352693346 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:40:08 +0000
+Subject: [PATCH 01/26] Check if __GLIBC_PREREQ is defined before using it
+
+__GLIBC_PREREQ is specific to glibc so it should be checked if it is
+defined or not.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ testcases/kernel/syscalls/accept4/accept4_01.c | 9 ++++-
+ testcases/kernel/syscalls/getcpu/getcpu01.c | 40 +++++++++++++++++++++-
+ .../sched_getaffinity/sched_getaffinity01.c | 26 ++++++++++++++
+ 3 files changed, 73 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
+index 6072bfa..2b090cb 100644
+--- a/testcases/kernel/syscalls/accept4/accept4_01.c
++++ b/testcases/kernel/syscalls/accept4/accept4_01.c
+@@ -64,6 +64,7 @@ static void cleanup(void)
+ tst_rmdir();
+ }
+
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 10))
+ static int
+ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+@@ -82,7 +83,6 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+ }
+ tst_resm(TINFO, "\n");
+ #endif
+-
+ #if USE_SOCKETCALL
+ long args[6];
+
+@@ -97,6 +97,7 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+ #endif
+ }
+ #endif
++#endif
+
+ static void
+ do_test(int lfd, struct sockaddr_in *conn_addr,
+@@ -119,9 +120,15 @@ do_test(int lfd, struct sockaddr_in *conn_addr,
+ die("Connect Error");
+
+ addrlen = sizeof(struct sockaddr_in);
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 10))
+ acceptfd = accept4_01(lfd, (struct sockaddr *)&claddr, &addrlen,
+ closeonexec_flag | nonblock_flag);
++
++#else
++ acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
++ closeonexec_flag | nonblock_flag);
++#endif
+ #else
+ acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
+ closeonexec_flag | nonblock_flag);
+diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
+index c927512..921b107 100644
+--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
++++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
+@@ -62,6 +62,7 @@
+ #include <dirent.h>
+
+ #if defined(__i386__) || defined(__x86_64__)
++#if defined(__GLIBC__)
+ #if __GLIBC_PREREQ(2,6)
+ #if defined(__x86_64__)
+ #include <utmpx.h>
+@@ -75,10 +76,17 @@ int sys_support = 0;
+ #else
+ int sys_support = 0;
+ #endif
++#else
++int sys_support = 0;
++#endif
+
++#if defined(__GLIBC__)
+ #if !(__GLIBC_PREREQ(2, 7))
+ #define CPU_FREE(ptr) free(ptr)
+ #endif
++#else
++#define CPU_FREE(ptr) free(ptr)
++#endif
+
+ void cleanup(void);
+ void setup(void);
+@@ -164,9 +172,14 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
+ {
+ #if defined(__i386__)
+ return syscall(318, cpu_id, node_id, cache_struct);
+-#elif __GLIBC_PREREQ(2,6)
++#if defined(__GLIBC__)
++#if __GLIBC_PREREQ(2,6)
++ *cpu_id = sched_getcpu();
++#endif
++#else
+ *cpu_id = sched_getcpu();
+ #endif
++#endif
+ return 0;
+ }
+
+@@ -191,15 +204,20 @@ unsigned int set_cpu_affinity(void)
+ cpu_set_t *set;
+ size_t size;
+ int nrcpus = 1024;
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ realloc:
+ set = CPU_ALLOC(nrcpus);
+ #else
+ set = malloc(sizeof(cpu_set_t));
+ #endif
++#else
++ set = malloc(sizeof(cpu_set_t));
++#endif
+ if (set == NULL) {
+ tst_brkm(TFAIL, NULL, "CPU_ALLOC:errno:%d", errno);
+ }
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ size = CPU_ALLOC_SIZE(nrcpus);
+ CPU_ZERO_S(size, set);
+@@ -207,8 +225,13 @@ realloc:
+ size = sizeof(cpu_set_t);
+ CPU_ZERO(set);
+ #endif
++#else
++ size = sizeof(cpu_set_t);
++ CPU_ZERO(set);
++#endif
+ if (sched_getaffinity(0, size, set) < 0) {
+ CPU_FREE(set);
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ if (errno == EINVAL && nrcpus < (1024 << 8)) {
+ nrcpus = nrcpus << 2;
+@@ -220,10 +243,17 @@ realloc:
+ "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
+ else
+ #endif
++#else
++ if (errno == EINVAL)
++ tst_resm(TFAIL,
++ "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
++ else
++#endif
+ tst_resm(TFAIL, "sched_getaffinity:errno:%d", errno);
+ tst_exit();
+ }
+ cpu_max = max_cpuid(size, set);
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ CPU_ZERO_S(size, set);
+ CPU_SET_S(cpu_max, size, set);
+@@ -231,6 +261,10 @@ realloc:
+ CPU_ZERO(set);
+ CPU_SET(cpu_max, set);
+ #endif
++#else
++ CPU_ZERO(set);
++ CPU_SET(cpu_max, set);
++#endif
+ if (sched_setaffinity(0, size, set) < 0) {
+ CPU_FREE(set);
+ tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno);
+@@ -247,11 +281,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set)
+ {
+ unsigned int index, max = 0;
+ for (index = 0; index < size * BITS_PER_BYTE; index++)
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ if (CPU_ISSET_S(index, size, set))
+ #else
+ if (CPU_ISSET(index, set))
+ #endif
++#else
++ if (CPU_ISSET(index, set))
++#endif
+ max = index;
+ return max;
+ }
+diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+index 9d6a81a..4ed13b2 100644
+--- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
++++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+@@ -66,9 +66,11 @@ do { \
+ tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \
+ } while (0)
+
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 7))
+ #define CPU_FREE(ptr) free(ptr)
+ #endif
++#endif
+
+ int main(int ac, char **av)
+ {
+@@ -95,14 +97,19 @@ static void do_test(void)
+ pid_t unused_pid;
+ unsigned len;
+
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ realloc:
+ mask = CPU_ALLOC(nrcpus);
+ #else
+ mask = malloc(sizeof(cpu_set_t));
+ #endif
++#else
++ mask = malloc(sizeof(cpu_set_t));
++#endif
+ if (mask == NULL)
+ tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory");
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ len = CPU_ALLOC_SIZE(nrcpus);
+ CPU_ZERO_S(len, mask);
+@@ -110,10 +117,15 @@ realloc:
+ len = sizeof(cpu_set_t);
+ CPU_ZERO(mask);
+ #endif
++#else
++ len = sizeof(cpu_set_t);
++ CPU_ZERO(mask);
++#endif
+ /* positive test */
+ TEST(sched_getaffinity(0, len, mask));
+ if (TEST_RETURN == -1) {
+ CPU_FREE(mask);
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ if (errno == EINVAL && nrcpus < (1024 << 8)) {
+ nrcpus = nrcpus << 2;
+@@ -125,17 +137,27 @@ realloc:
+ "newer glibc(>= 2.7)");
+ else
+ #endif
++#else
++ if (errno == EINVAL)
++ tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a "
++ "newer glibc(>= 2.7)");
++ else
++#endif
+ tst_resm(TFAIL | TTERRNO, "fail to get cpu affinity");
+ cleanup();
+ } else {
+ tst_resm(TINFO, "cpusetsize is %d", len);
+ tst_resm(TINFO, "mask.__bits[0] = %lu ", mask->__bits[0]);
+ for (i = 0; i < num; i++) {
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ TEST(CPU_ISSET_S(i, len, mask));
+ #else
+ TEST(CPU_ISSET(i, mask));
+ #endif
++#else
++ TEST(CPU_ISSET(i, mask));
++#endif
+ if (TEST_RETURN != -1)
+ tst_resm(TPASS, "sched_getaffinity() succeed, "
+ "this process %d is running "
+@@ -143,11 +165,15 @@ realloc:
+ }
+ }
+
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ CPU_ZERO_S(len, mask);
+ #else
+ CPU_ZERO(mask);
+ #endif
++#else
++ CPU_ZERO(mask);
++#endif
+ /* negative tests */
+ QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *) - 1));
+ QUICK_TEST(sched_getaffinity(0, 0, mask));
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
new file mode 100644
index 000000000..e58e5a96b
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
@@ -0,0 +1,270 @@
+From 4ba19d64e95a874995d0b554b891b5ec35bd9495 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:45:35 +0000
+Subject: [PATCH 09/32] Guard error.h with __GLIBC__
+
+error API is specific to glibc so use the guard to make it conditional
+on glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/faccessat/faccessat01.c | 2 ++
+ testcases/kernel/syscalls/fallocate/fallocate01.c | 2 ++
+ testcases/kernel/syscalls/fchmodat/fchmodat01.c | 2 ++
+ testcases/kernel/syscalls/fchownat/fchownat01.c | 2 ++
+ testcases/kernel/syscalls/fchownat/fchownat02.c | 2 ++
+ testcases/kernel/syscalls/fstatat/fstatat01.c | 2 ++
+ testcases/kernel/syscalls/futimesat/futimesat01.c | 2 ++
+ testcases/kernel/syscalls/linkat/linkat01.c | 2 ++
+ testcases/kernel/syscalls/linkat/linkat02.c | 2 ++
+ testcases/kernel/syscalls/mkdirat/mkdirat01.c | 2 ++
+ testcases/kernel/syscalls/mknodat/mknodat01.c | 2 ++
+ testcases/kernel/syscalls/mknodat/mknodat02.c | 2 ++
+ testcases/kernel/syscalls/openat/openat01.c | 2 ++
+ testcases/kernel/syscalls/readlinkat/readlinkat01.c | 2 ++
+ testcases/kernel/syscalls/renameat/renameat01.c | 2 ++
+ testcases/kernel/syscalls/symlinkat/symlinkat01.c | 2 ++
+ testcases/kernel/syscalls/unlinkat/unlinkat01.c | 2 ++
+ 17 files changed, 34 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
+index 7f0e87a..c72dcf0 100644
+--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
++++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
+index e72b123..643c0e2 100644
+--- a/testcases/kernel/syscalls/fallocate/fallocate01.c
++++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
+@@ -96,7 +96,9 @@
+ #include <fcntl.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <inttypes.h>
+ #include <sys/utsname.h>
+
+diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+index 19e9ad5..ae6d807 100644
+--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
++++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
+index b361253..a5218af 100644
+--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
++++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
+@@ -28,7 +28,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c
+index 6b0304c..8d2863f 100644
+--- a/testcases/kernel/syscalls/fchownat/fchownat02.c
++++ b/testcases/kernel/syscalls/fchownat/fchownat02.c
+@@ -26,7 +26,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
+index 61531c6..e99fbd2 100644
+--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
++++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
+@@ -48,7 +48,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
+index ae8d4fe..316dd78 100644
+--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
++++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
+index fc0687b..83cbfe7 100644
+--- a/testcases/kernel/syscalls/linkat/linkat01.c
++++ b/testcases/kernel/syscalls/linkat/linkat01.c
+@@ -49,7 +49,9 @@
+ #include <sys/time.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
+index e9a752a..8d7e431 100644
+--- a/testcases/kernel/syscalls/linkat/linkat02.c
++++ b/testcases/kernel/syscalls/linkat/linkat02.c
+@@ -23,7 +23,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+index 7e15947..1dbc038 100644
+--- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c
++++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+@@ -30,7 +30,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
+index 26e5538..f034f05 100644
+--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
++++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
+@@ -29,7 +29,9 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
+index f6368fa..7d0f7c0 100644
+--- a/testcases/kernel/syscalls/mknodat/mknodat02.c
++++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
+@@ -29,7 +29,9 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c
+index 85f9a91..4ee0117 100644
+--- a/testcases/kernel/syscalls/openat/openat01.c
++++ b/testcases/kernel/syscalls/openat/openat01.c
+@@ -29,7 +29,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+index 97a49e8..b162853 100644
+--- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
++++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+@@ -29,7 +29,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
+index f4cd51b..105a05b 100644
+--- a/testcases/kernel/syscalls/renameat/renameat01.c
++++ b/testcases/kernel/syscalls/renameat/renameat01.c
+@@ -42,7 +42,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+index 5c238d8..cb7a7e8 100644
+--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
++++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+index 31fe4e7..26f6d9a 100644
+--- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
++++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
new file mode 100644
index 000000000..5b0c444be
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
@@ -0,0 +1,73 @@
+From 0130f4146ced320aadb01b22e36b13d269a8ebba Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:48:14 +0000
+Subject: [PATCH 10/32] replace __BEGIN_DECLS and __END_DECLS
+
+They are not portable across libc implementations
+therefore replace them with expanded macros
+
+Include <asm-generic/types.h> to get __s32 definitions
+its not a generally available typedef
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/epoll2/include/epoll.h | 8 ++++++--
+ utils/sctp/include/netinet/sctp.h | 9 +++++++--
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/epoll2/include/epoll.h b/testcases/kernel/syscalls/epoll2/include/epoll.h
+index be599c7..8cc5e7e 100644
+--- a/testcases/kernel/syscalls/epoll2/include/epoll.h
++++ b/testcases/kernel/syscalls/epoll2/include/epoll.h
+@@ -85,7 +85,9 @@ struct epoll_event
+ } EPOLL_PACKED;
+
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Creates an epoll instance. Returns an fd for the new instance.
+ The "size" parameter is a hint specifying the number of file
+@@ -114,6 +116,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
+ extern int epoll_wait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout) __THROW;
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* sys/epoll.h */
+diff --git a/utils/sctp/include/netinet/sctp.h b/utils/sctp/include/netinet/sctp.h
+index 51f5bfb..c61aef3 100644
+--- a/utils/sctp/include/netinet/sctp.h
++++ b/utils/sctp/include/netinet/sctp.h
+@@ -35,9 +35,12 @@
+
+ #include <stdint.h>
+ #include <linux/types.h>
++#include <asm-generic/types.h>
+ #include <sys/socket.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ typedef __s32 sctp_assoc_t;
+
+@@ -862,6 +865,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
+ /* Return the address length for an address family. */
+ int sctp_getaddrlen(sa_family_t family);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* __linux_sctp_h__ */
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
new file mode 100644
index 000000000..945280c62
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
@@ -0,0 +1,136 @@
+From aff0e2a8f011fa80b472355355a7e8cdacd50189 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:53:30 +0000
+Subject: [PATCH 11/32] Rename sigset variable to sigset1
+
+sigset API from signal.h is shadowed by this name conflict
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/mem/shmt/shmt04.c | 10 +++++-----
+ testcases/kernel/mem/shmt/shmt06.c | 10 +++++-----
+ testcases/kernel/syscalls/sigprocmask/sigprocmask01.c | 10 +++++-----
+ 3 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
+index 7203e9e..fce87d6 100644
+--- a/testcases/kernel/mem/shmt/shmt04.c
++++ b/testcases/kernel/mem/shmt/shmt04.c
+@@ -56,7 +56,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
+ /**************/
+
+ key_t key;
+-sigset_t sigset;
++sigset_t sigset1;
+
+ #define SIZE 16*1024
+
+@@ -71,9 +71,9 @@ int main(void)
+
+ key = (key_t) getpid();
+
+- sigemptyset(&sigset);
+- sigaddset(&sigset, SIGUSR1);
+- sigprocmask(SIG_BLOCK, &sigset, NULL);
++ sigemptyset(&sigset1);
++ sigaddset(&sigset1, SIGUSR1);
++ sigprocmask(SIG_BLOCK, &sigset1, NULL);
+
+ pid = fork();
+ switch (pid) {
+@@ -148,7 +148,7 @@ int child(void)
+ char *cp;
+ int sig;
+
+- sigwait(&sigset, &sig);
++ sigwait(&sigset1, &sig);
+ chld_pid = getpid();
+ /*--------------------------------------------------------*/
+
+diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
+index a3c9ca3..77b0fc9 100644
+--- a/testcases/kernel/mem/shmt/shmt06.c
++++ b/testcases/kernel/mem/shmt/shmt06.c
+@@ -57,7 +57,7 @@ int TST_TOTAL = 2; /* Total number of test cases. */
+ /**************/
+
+ key_t key;
+-sigset_t sigset;
++sigset_t sigset1;
+
+ int child();
+ static int rm_shm(int);
+@@ -70,9 +70,9 @@ int main(void)
+
+ key = (key_t) getpid();
+
+- sigemptyset(&sigset);
+- sigaddset(&sigset, SIGUSR1);
+- sigprocmask(SIG_BLOCK, &sigset, NULL);
++ sigemptyset(&sigset1);
++ sigaddset(&sigset1, SIGUSR1);
++ sigprocmask(SIG_BLOCK, &sigset1, NULL);
+
+ pid = fork();
+ switch (pid) {
+@@ -147,7 +147,7 @@ int child(void)
+ char *cp;
+ int sig;
+
+- sigwait(&sigset, &sig);
++ sigwait(&sigset1, &sig);
+ chld_pid = getpid();
+
+ if ((shmid = shmget(key, SIZE, 0)) < 0) {
+diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+index 20fca52..6fb1d57 100644
+--- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
++++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+@@ -91,7 +91,7 @@ int TST_TOTAL = 1;
+ int sig_catch = 0; /* variable to blocked/unblocked signals */
+
+ struct sigaction sa_new; /* struct to hold signal info */
+-sigset_t sigset; /* signal set to hold signal lists */
++sigset_t sigset1; /* signal set to hold signal lists */
+ sigset_t sigset2;
+
+ int main(int ac, char **av)
+@@ -112,7 +112,7 @@ int main(int ac, char **av)
+ * so that, signal will not be delivered to
+ * the test process.
+ */
+- TEST(sigprocmask(SIG_BLOCK, &sigset, 0));
++ TEST(sigprocmask(SIG_BLOCK, &sigset1, 0));
+
+ /* Get the process id of test process */
+ my_pid = getpid();
+@@ -165,7 +165,7 @@ int main(int ac, char **av)
+ */
+ errno = 0;
+ if (sigprocmask(SIG_UNBLOCK,
+- &sigset, 0) == -1) {
++ &sigset1, 0) == -1) {
+ tst_brkm(TFAIL, cleanup,
+ "sigprocmask() failed "
+ "to unblock signal, "
+@@ -212,7 +212,7 @@ void setup(void)
+ * Initialise the signal sets with the list that
+ * excludes/includes all system-defined signals.
+ */
+- if (sigemptyset(&sigset) == -1) {
++ if (sigemptyset(&sigset1) == -1) {
+ tst_brkm(TFAIL, cleanup,
+ "sigemptyset() failed, errno=%d : %s",
+ errno, strerror(errno));
+@@ -235,7 +235,7 @@ void setup(void)
+ * Add specified signal (SIGINT) to the signal set
+ * which excludes system-defined signals.
+ */
+- if (sigaddset(&sigset, SIGINT) == -1) {
++ if (sigaddset(&sigset1, SIGINT) == -1) {
+ tst_brkm(TFAIL, cleanup,
+ "sigaddset() failed, errno=%d : %s",
+ errno, strerror(errno));
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
new file mode 100644
index 000000000..e1532c1fc
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
@@ -0,0 +1,351 @@
+From 54e098a366a1d773c4d7d4124f2f5aab976681c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:58:08 +0000
+Subject: [PATCH 12/32] fsstress.c: Replace __int64_t with int64_t
+
+int64_t is defined in ISO C99
+include limits.h to get defintions of PATH_MAX
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/fs/fsstress/fsstress.c | 31 +++++++++---------
+ testcases/network/nfs/nfs_fsstress/fsstress.c | 47 ++++++++++++++-------------
+ 2 files changed, 40 insertions(+), 38 deletions(-)
+
+diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c
+index 2f89903..89f0b19 100644
+--- a/testcases/kernel/fs/fsstress/fsstress.c
++++ b/testcases/kernel/fs/fsstress/fsstress.c
+@@ -36,6 +36,7 @@
+ #ifdef HAVE_SYS_PRCTL_H
+ # include <sys/prctl.h>
+ #endif
++#include <limits.h>
+
+ #define XFS_ERRTAG_MAX 17
+
+@@ -1572,7 +1573,7 @@ void bulkstat_f(int opno, long r)
+ __u64 last;
+ __s32 nent;
+ xfs_bstat_t *t;
+- __int64_t total;
++ int64_t total;
+ xfs_fsop_bulkreq_t bsr;
+
+ last = 0;
+@@ -1764,14 +1765,14 @@ int setdirect(int fd)
+
+ void dread_f(int opno, long r)
+ {
+- __int64_t align;
++ int64_t align;
+ char *buf = NULL;
+ struct dioattr diob;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -1835,8 +1836,8 @@ void dread_f(int opno, long r)
+ return;
+ }
+ #endif
+- align = (__int64_t) diob.d_miniosz;
+- lr = ((__int64_t) random() << 32) + random();
++ align = (int64_t) diob.d_miniosz;
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % stb.st_size);
+ off -= (off % align);
+ lseek64(fd, off, SEEK_SET);
+@@ -1865,14 +1866,14 @@ void dread_f(int opno, long r)
+
+ void dwrite_f(int opno, long r)
+ {
+- __int64_t align;
++ int64_t align;
+ char *buf = NULL;
+ struct dioattr diob;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -1925,8 +1926,8 @@ void dwrite_f(int opno, long r)
+ return;
+ }
+ #endif
+- align = (__int64_t) diob.d_miniosz;
+- lr = ((__int64_t) random() << 32) + random();
++ align = (int64_t) diob.d_miniosz;
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off -= (off % align);
+ lseek64(fd, off, SEEK_SET);
+@@ -2224,7 +2225,7 @@ void read_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2262,7 +2263,7 @@ void read_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % stb.st_size);
+ lseek64(fd, off, SEEK_SET);
+ len = (random() % (getpagesize() * 32)) + 1;
+@@ -2509,7 +2510,7 @@ void truncate_f(int opno, long r)
+ {
+ int e;
+ pathname_t f;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2530,7 +2531,7 @@ void truncate_f(int opno, long r)
+ free_pathname(&f);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ off %= maxfsize;
+ e = truncate64_path(&f, off) < 0 ? errno : 0;
+@@ -2626,7 +2627,7 @@ void write_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2656,7 +2657,7 @@ void write_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ lseek64(fd, off, SEEK_SET);
+diff --git a/testcases/network/nfs/nfs_fsstress/fsstress.c b/testcases/network/nfs/nfs_fsstress/fsstress.c
+index ac91262..a34c416 100644
+--- a/testcases/network/nfs/nfs_fsstress/fsstress.c
++++ b/testcases/network/nfs/nfs_fsstress/fsstress.c
+@@ -31,6 +31,7 @@
+ */
+
+ #include "global.h"
++#include <limits.h>
+
+ #define XFS_ERRTAG_MAX 17
+
+@@ -1368,7 +1369,7 @@ void allocsp_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ struct flock64 fl;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -1398,7 +1399,7 @@ void allocsp_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ fl.l_whence = SEEK_SET;
+@@ -1519,7 +1520,7 @@ void bulkstat_f(int opno, long r)
+ __uint64_t last;
+ int nent;
+ xfs_bstat_t *t;
+- __int64_t total;
++ int64_t total;
+ xfs_fsop_bulkreq_t bsr;
+
+ last = 0;
+@@ -1708,14 +1709,14 @@ int setdirect(int fd)
+
+ void dread_f(int opno, long r)
+ {
+- __int64_t align;
++ int64_t align;
+ char *buf;
+ struct dioattr diob;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -1775,8 +1776,8 @@ void dread_f(int opno, long r)
+ return;
+ }
+ #endif
+- align = (__int64_t) diob.d_miniosz;
+- lr = ((__int64_t) random() << 32) + random();
++ align = (int64_t) diob.d_miniosz;
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % stb.st_size);
+ off -= (off % align);
+ lseek64(fd, off, SEEK_SET);
+@@ -1798,14 +1799,14 @@ void dread_f(int opno, long r)
+
+ void dwrite_f(int opno, long r)
+ {
+- __int64_t align;
++ int64_t align;
+ char *buf;
+ struct dioattr diob;
+ int e;
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -1854,8 +1855,8 @@ void dwrite_f(int opno, long r)
+ return;
+ }
+ #endif
+- align = (__int64_t) diob.d_miniosz;
+- lr = ((__int64_t) random() << 32) + random();
++ align = (int64_t) diob.d_miniosz;
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off -= (off % align);
+ lseek64(fd, off, SEEK_SET);
+@@ -1917,7 +1918,7 @@ void freesp_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ struct flock64 fl;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -1947,7 +1948,7 @@ void freesp_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ fl.l_whence = SEEK_SET;
+@@ -2145,7 +2146,7 @@ void read_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2183,7 +2184,7 @@ void read_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % stb.st_size);
+ lseek64(fd, off, SEEK_SET);
+ len = (random() % (getpagesize() * 32)) + 1;
+@@ -2281,7 +2282,7 @@ void resvsp_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ struct flock64 fl;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2311,7 +2312,7 @@ void resvsp_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ fl.l_whence = SEEK_SET;
+@@ -2428,7 +2429,7 @@ void truncate_f(int opno, long r)
+ {
+ int e;
+ pathname_t f;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2449,7 +2450,7 @@ void truncate_f(int opno, long r)
+ free_pathname(&f);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ e = truncate64_path(&f, off) < 0 ? errno : 0;
+@@ -2491,7 +2492,7 @@ void unresvsp_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ struct flock64 fl;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2521,7 +2522,7 @@ void unresvsp_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ fl.l_whence = SEEK_SET;
+@@ -2543,7 +2544,7 @@ void write_f(int opno, long r)
+ pathname_t f;
+ int fd;
+ size_t len;
+- __int64_t lr;
++ int64_t lr;
+ off64_t off;
+ struct stat64 stb;
+ int v;
+@@ -2573,7 +2574,7 @@ void write_f(int opno, long r)
+ close(fd);
+ return;
+ }
+- lr = ((__int64_t) random() << 32) + random();
++ lr = ((int64_t) random() << 32) + random();
+ off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ off %= maxfsize;
+ lseek64(fd, off, SEEK_SET);
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
new file mode 100644
index 000000000..4266e4fc3
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
@@ -0,0 +1,67 @@
+From 1ef8c32317064438ec3b37a114f5d82957f4e0c6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:05:54 +0000
+Subject: [PATCH 13/32] include fcntl.h for getting O_* definitions
+
+musl exposes this issue, with glibc fcntl.h is included via some other
+header and this problem remained latent
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/ipc/ipc_stress/shmem_test_03.c | 1 +
+ testcases/kernel/syscalls/mq_notify/mq_notify01.c | 1 +
+ testcases/network/tcp_cmds/sendfile/testsf_c.c | 1 +
+ testcases/network/tcp_cmds/sendfile/testsf_s.c | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
+index c1b11fd..8be156f 100644
+--- a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
++++ b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
+@@ -72,6 +72,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <limits.h>
++#include <fcntl.h>
+ #include <sys/file.h>
+ #include <sys/ipc.h>
+ #include <sys/mman.h>
+diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify01.c b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
+index 4728c70..5c7846c 100644
+--- a/testcases/kernel/syscalls/mq_notify/mq_notify01.c
++++ b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
+@@ -41,6 +41,7 @@
+ #include <mqueue.h>
+ #include <signal.h>
+ #include <stdlib.h>
++#include <fcntl.h>
+
+ #include "../utils/include_j_h.h"
+
+diff --git a/testcases/network/tcp_cmds/sendfile/testsf_c.c b/testcases/network/tcp_cmds/sendfile/testsf_c.c
+index 449784f..38d3274 100644
+--- a/testcases/network/tcp_cmds/sendfile/testsf_c.c
++++ b/testcases/network/tcp_cmds/sendfile/testsf_c.c
+@@ -9,6 +9,7 @@
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <fcntl.h>
+ #include <sys/file.h>
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
+diff --git a/testcases/network/tcp_cmds/sendfile/testsf_s.c b/testcases/network/tcp_cmds/sendfile/testsf_s.c
+index 17e98ad..bce8dd1 100644
+--- a/testcases/network/tcp_cmds/sendfile/testsf_s.c
++++ b/testcases/network/tcp_cmds/sendfile/testsf_s.c
+@@ -6,6 +6,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <sys/file.h>
+ #include <errno.h>
+ #include <sys/signal.h>
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
new file mode 100644
index 000000000..84d81e9f9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
@@ -0,0 +1,56 @@
+From d63fefa86dac437c47b9ebbea0a82a1240aaba2c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:09:56 +0000
+Subject: [PATCH 14/32] hyperthreading: Include sys/types.h for pid_t
+ definition
+
+If sys/types.h is not included then it will not define pid_t_needed
+and therefore typedef wont be included and we get errors about pid_t
+being not known
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h | 1 +
+ testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h | 1 +
+ testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
+index 1ec9794..9084aa7 100644
+--- a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
++++ b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
+@@ -3,6 +3,7 @@
+ #define _HTUTILS_H_
+
+ #include <stdlib.h>
++#include <sys/types.h>
+
+ int is_cmdline_para(const char *para);
+
+diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
+index 1ec9794..c03a124 100644
+--- a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
++++ b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
+@@ -2,6 +2,7 @@
+ #ifndef _HTUTILS_H_
+ #define _HTUTILS_H_
+
++#include <sys/types.h>
+ #include <stdlib.h>
+
+ int is_cmdline_para(const char *para);
+diff --git a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
+index 2977ad0..6b484e1 100644
+--- a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
++++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
+@@ -3,6 +3,7 @@
+ #define _HTUTILS_H_
+
+ #include <stdlib.h>
++#include <sys/types.h>
+
+ int is_cmdline_para(const char *para);
+
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
new file mode 100644
index 000000000..963536f99
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
@@ -0,0 +1,64 @@
+From f091839532f3afe0a58e8ba0b45615c899a43a47 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:12:09 +0000
+Subject: [PATCH 15/32] mincore01: Rename PAGESIZE to pagesize
+
+PAGESIZE conflicts with system headers on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/mincore/mincore01.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c
+index 97a3d95..fa426d1 100644
+--- a/testcases/kernel/syscalls/mincore/mincore01.c
++++ b/testcases/kernel/syscalls/mincore/mincore01.c
+@@ -45,7 +45,7 @@
+ #include "test.h"
+ #include "safe_macros.h"
+
+-static int PAGESIZE;
++static int pagesize;
+ static rlim_t STACK_LIMIT = 10485760;
+
+ static void cleanup(void);
+@@ -146,7 +146,7 @@ static void setup4(struct test_case_t *tc)
+ }
+
+ tc->addr = global_pointer;
+- tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + PAGESIZE;
++ tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + pagesize;
+ tc->vector = global_vec;
+
+ /*
+@@ -161,7 +161,7 @@ static void setup(void)
+ char *buf;
+ int fd;
+
+- PAGESIZE = getpagesize();
++ pagesize = getpagesize();
+
+ tst_sig(NOFORK, DEF_HANDLER, cleanup);
+
+@@ -170,7 +170,7 @@ static void setup(void)
+ TEST_PAUSE;
+
+ /* global_pointer will point to a mmapped area of global_len bytes */
+- global_len = PAGESIZE * 2;
++ global_len = pagesize * 2;
+
+ buf = SAFE_MALLOC(cleanup, global_len);
+ memset(buf, 42, global_len);
+@@ -186,7 +186,7 @@ static void setup(void)
+ PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+
+ global_vec = SAFE_MALLOC(cleanup,
+- (global_len + PAGESIZE - 1) / PAGESIZE);
++ (global_len + pagesize - 1) / pagesize);
+
+ SAFE_CLOSE(cleanup, fd);
+ }
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
new file mode 100644
index 000000000..1b5b93a4e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
@@ -0,0 +1,45 @@
+From 2b9be924bbad8a1f84ae553fdd1aa8391aa8d2f4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:15:07 +0000
+Subject: [PATCH 16/32] ustat: Change header from ustat.h to sys/ustat.h
+
+makes it portable for musl, on glibc ustat.h is just including
+sys/ustat.h too
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/ustat/ustat01.c | 2 +-
+ testcases/kernel/syscalls/ustat/ustat02.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
+index 01b7688..494647b 100644
+--- a/testcases/kernel/syscalls/ustat/ustat01.c
++++ b/testcases/kernel/syscalls/ustat/ustat01.c
+@@ -20,8 +20,8 @@
+ */
+
+ #include <unistd.h>
+-#include <ustat.h>
+ #include <errno.h>
++#include <sys/ustat.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include "test.h"
+diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
+index 4e66236..edada31 100644
+--- a/testcases/kernel/syscalls/ustat/ustat02.c
++++ b/testcases/kernel/syscalls/ustat/ustat02.c
+@@ -21,8 +21,8 @@
+ */
+
+ #include <unistd.h>
+-#include <ustat.h>
+ #include <errno.h>
++#include <sys/ustat.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include "test.h"
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
new file mode 100644
index 000000000..ed25802a0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
@@ -0,0 +1,88 @@
+From c882bcd18820b44a685f0d5edd7aaff77a88c912 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:17:55 +0000
+Subject: [PATCH 17/32] replace sigval_t with union sigval
+
+This makes it compatible across musl and glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c | 2 +-
+ testcases/kernel/syscalls/timer_gettime/timer_gettime01.c | 2 +-
+ testcases/kernel/timers/timer_create/timer_create02.c | 4 ++--
+ testcases/kernel/timers/timer_create/timer_create03.c | 4 ++--
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+index d186c1f..bc03544 100644
+--- a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
++++ b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+@@ -54,7 +54,7 @@ int main(int ac, char **av)
+
+ setup();
+
+- ev.sigev_value = (sigval_t) 0;
++ ev.sigev_value = (union sigval) 0;
+ ev.sigev_signo = SIGALRM;
+ ev.sigev_notify = SIGEV_SIGNAL;
+ TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
+diff --git a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+index b583aee..9371a6a 100644
+--- a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
++++ b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+@@ -55,7 +55,7 @@ int main(int ac, char **av)
+
+ setup();
+
+- ev.sigev_value = (sigval_t) 0;
++ ev.sigev_value = (union sigval) 0;
+ ev.sigev_signo = SIGALRM;
+ ev.sigev_notify = SIGEV_SIGNAL;
+ TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
+diff --git a/testcases/kernel/timers/timer_create/timer_create02.c b/testcases/kernel/timers/timer_create/timer_create02.c
+index 7f528ed..1127400 100644
+--- a/testcases/kernel/timers/timer_create/timer_create02.c
++++ b/testcases/kernel/timers/timer_create/timer_create02.c
+@@ -142,7 +142,7 @@ void setup_test(int option)
+ {
+ switch (option) {
+ case 0:
+- evp.sigev_value = (sigval_t) 0;
++ evp.sigev_value = (union sigval) 0;
+ evp.sigev_signo = SIGALRM;
+ evp.sigev_notify = SIGEV_SIGNAL;
+ evp_ptr = &evp;
+@@ -151,7 +151,7 @@ void setup_test(int option)
+ evp_ptr = NULL;
+ break;
+ case 2:
+- evp.sigev_value = (sigval_t) 0;
++ evp.sigev_value = (union sigval) 0;
+ evp.sigev_signo = SIGALRM; /* any will do */
+ evp.sigev_notify = SIGEV_NONE;
+ evp_ptr = &evp;
+diff --git a/testcases/kernel/timers/timer_create/timer_create03.c b/testcases/kernel/timers/timer_create/timer_create03.c
+index 291fcfa..8b01bf7 100644
+--- a/testcases/kernel/timers/timer_create/timer_create03.c
++++ b/testcases/kernel/timers/timer_create/timer_create03.c
+@@ -129,7 +129,7 @@ void setup_test(int option)
+ {
+ switch (option) {
+ case 0:
+- evp.sigev_value = (sigval_t) 0;
++ evp.sigev_value = (union sigval) 0;
+ evp.sigev_signo = SIGALRM;
+ evp.sigev_notify = SIGEV_SIGNAL;
+ evp_ptr = &evp;
+@@ -138,7 +138,7 @@ void setup_test(int option)
+ evp_ptr = NULL;
+ break;
+ case 2:
+- evp.sigev_value = (sigval_t) 0;
++ evp.sigev_value = (union sigval) 0;
+ evp.sigev_signo = SIGALRM; /* any will do */
+ evp.sigev_notify = SIGEV_NONE;
+ evp_ptr = &evp;
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
new file mode 100644
index 000000000..5198fe9f4
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
@@ -0,0 +1,32 @@
+From f42b060e80c9f40627c712d4d56d45221bd7d9fa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 06:51:20 +0000
+Subject: [PATCH 18/32] guard mallocopt() with __GLIBC__
+
+mallocopt is not available on non glibc implementations
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
+index 5bb8eff..934d951 100644
+--- a/utils/benchmark/ebizzy-0.3/ebizzy.c
++++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
+@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[])
+ "\"never mmap\" option specified\n");
+ usage();
+ }
+-
++#ifdef __GLIBC__
+ if (never_mmap)
+ mallopt(M_MMAP_MAX, 0);
+-
++#endif
+ if (chunk_size < record_size) {
+ fprintf(stderr, "Chunk size %u smaller than record size %u\n",
+ chunk_size, record_size);
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
new file mode 100644
index 000000000..0a4c5f0b3
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
@@ -0,0 +1,32 @@
+From 721e94985b9cff3e2724af7ea5be7d005bc12dec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 06:55:27 +0000
+Subject: [PATCH 19/32] tomoyo: Replace canonicalize_file_name() with
+ realpath()
+
+canonicalize_file_name() API is specific to glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
+index da4af0f..5c1a3ca 100644
+--- a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
++++ b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
+@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
+ /* Test mount(). */
+ {
+ static char buf[4096];
+- char *dev_ram_path = canonicalize_file_name("/dev/ram0");
++ char *dev_ram_path = realpath("/dev/ram0", NULL);
+ if (!dev_ram_path)
+- dev_ram_path = canonicalize_file_name("/dev/ram");
++ dev_ram_path = realpath("/dev/ram", NULL);
+ if (!dev_ram_path) {
+ dev_ram_path = "/dev/ram0";
+ mknod(dev_ram_path, S_IFBLK, MKDEV(1, 0));
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
new file mode 100644
index 000000000..0e4e4586c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
@@ -0,0 +1,48 @@
+From aa3568e6ac28f377e75ce16b11e3c7738a373e53 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 06:57:04 +0000
+Subject: [PATCH 20/32] getdents: define getdents/getdents64 only for glibc
+
+getdents/getdents64 are implemented in musl and when we define static
+functions with same name, it errors out.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/getdents/getdents.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/getdents/getdents.h b/testcases/kernel/syscalls/getdents/getdents.h
+index abea655..db63d89 100644
+--- a/testcases/kernel/syscalls/getdents/getdents.h
++++ b/testcases/kernel/syscalls/getdents/getdents.h
+@@ -34,12 +34,13 @@ struct linux_dirent {
+ char d_name[];
+ };
+
++#ifdef __GLIBC__
+ static inline int
+ getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size)
+ {
+ return ltp_syscall(__NR_getdents, fd, dirp, size);
+ }
+-
++#endif
+ struct linux_dirent64 {
+ uint64_t d_ino;
+ int64_t d_off;
+@@ -48,10 +49,11 @@ struct linux_dirent64 {
+ char d_name[];
+ };
+
++#ifdef __GLIBC__
+ static inline int
+ getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size)
+ {
+ return ltp_syscall(__NR_getdents64, fd, dirp64, size);
+ }
+-
++#endif
+ #endif /* GETDENTS_H */
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
new file mode 100644
index 000000000..c8cbe580c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
@@ -0,0 +1,71 @@
+From b216435bb362df10c45f544b78d8c884eaa901fd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:01:02 +0000
+Subject: [PATCH 21/32] Define _GNU_SOURCE for MREMAP_MAYMOVE definition
+
+musl guards MREMAP_MAYMOVE with _GNU_SOURCE unlike glibc which uses
+__USE_GNU
+
+Fixes errors like
+error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/mremap/mremap01.c | 4 +++-
+ testcases/kernel/syscalls/mremap/mremap02.c | 2 ++
+ testcases/kernel/syscalls/mremap/mremap03.c | 2 ++
+ 3 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
+index d63d1e4..24ca174 100644
+--- a/testcases/kernel/syscalls/mremap/mremap01.c
++++ b/testcases/kernel/syscalls/mremap/mremap01.c
+@@ -76,10 +76,12 @@
+ */
+ #include <unistd.h>
+ #include <errno.h>
++#include <fcntl.h>
++#define _GNU_SOURCE
+ #define __USE_GNU
+ #include <sys/mman.h>
+ #undef __USE_GNU
+-#include <fcntl.h>
++#undef _GNU_SOURCE
+
+ #include "test.h"
+
+diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
+index 5a51b9a..a530a6b 100644
+--- a/testcases/kernel/syscalls/mremap/mremap02.c
++++ b/testcases/kernel/syscalls/mremap/mremap02.c
+@@ -75,9 +75,11 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#define _GNU_SOURCE
+ #define __USE_GNU
+ #include <sys/mman.h>
+ #undef __USE_GNU
++#undef _GNU_SOURCE
+
+ #include "test.h"
+
+diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
+index 12e3829..9b39f8b 100644
+--- a/testcases/kernel/syscalls/mremap/mremap03.c
++++ b/testcases/kernel/syscalls/mremap/mremap03.c
+@@ -76,9 +76,11 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#define _GNU_SOURCE
+ #define __USE_GNU
+ #include <sys/mman.h>
+ #undef __USE_GNU
++#undef _GNU_SOURCE
+
+ #include "test.h"
+
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
new file mode 100644
index 000000000..413b44ac7
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
@@ -0,0 +1,29 @@
+From 7ac6fd51991ac61d1d7594f601d87842060ee284 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:06:11 +0000
+Subject: [PATCH 22/32] include sys/types.h
+
+Fixes
+
+error: unknown type name 'uint'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/ipc/ipc_stress/shmem_test_04.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+index 72c2e60..e7e5f61 100644
+--- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
++++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+@@ -65,6 +65,7 @@
+ #include <signal.h>
+ #include <stdint.h>
+ #include <sys/mman.h>
++#include <sys/types.h>
+
+ #ifdef _LINUX_
+ typedef unsigned long ulong_t;
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
new file mode 100644
index 000000000..4680c03d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
@@ -0,0 +1,48 @@
+From 560347f77236616a635b4a997a0596b8da4d0799 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:08:25 +0000
+Subject: [PATCH 23/32] ptrace: Use int instead of enum __ptrace_request
+
+__ptrace_request is only available with glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/ptrace/ptrace03.c | 4 ++++
+ testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
+index a4028fc..f1880cd 100644
+--- a/testcases/kernel/syscalls/ptrace/ptrace03.c
++++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
+@@ -102,7 +102,11 @@ static pid_t unused_pid;
+ static pid_t zero_pid;
+
+ struct test_case_t {
++#ifdef __GLIBC__
+ enum __ptrace_request request;
++#else
++ int request;
++#endif
+ pid_t *pid;
+ int exp_errno;
+ } test_cases[] = {
+diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
+index ae538e9..85aa89d 100644
+--- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
++++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
+@@ -130,7 +130,11 @@ static char *strings[] = {
+ SPT(KILL)
+ SPT(SINGLESTEP)
+ };
++#ifdef __GLIBC__
+ static inline char *strptrace(enum __ptrace_request request)
++#else
++static inline char *strptrace(int request)
++#endif
+ {
+ return strings[request];
+ }
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
new file mode 100644
index 000000000..03c67a52f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
@@ -0,0 +1,68 @@
+From e01e9862c248dc90a8ec6f2d06f8469d7a50cd8e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:14:58 +0000
+Subject: [PATCH 24/32] rt_sigaction/rt_sigprocmark: Define _GNU_SOURCE
+
+Fixes musl build failure e.g.
+error: 'SA_NOMASK' undeclared here (not in a function)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c | 1 +
+ testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c | 2 +-
+ testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c | 1 +
+ testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c | 1 +
+ 4 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
+index 5cf89cc..bdcb91a 100644
+--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
++++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
+@@ -28,6 +28,7 @@
+ /* sigset_t type. */
+ /******************************************************************************/
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
+index a1da743..8a27a0f 100644
+--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
++++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
+@@ -23,7 +23,7 @@
+ /* Description: This tests the rt_sigaction() syscall */
+ /* rt_sigaction Expected EFAULT error check */
+ /******************************************************************************/
+-
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
+index 175d220..e7627cd 100644
+--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
++++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
+@@ -24,6 +24,7 @@
+ /* rt_sigaction Expected EINVAL error check */
+ /******************************************************************************/
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
+index 74e5a61..75c57fc 100644
+--- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
++++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
+@@ -39,6 +39,7 @@
+ /* sigsetsize should indicate the size of a sigset_t type. */
+ /******************************************************************************/
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <signal.h>
+ #include <errno.h>
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
new file mode 100644
index 000000000..aad3cb037
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
@@ -0,0 +1,28 @@
+From 9d14edfc12eefac900dd54729a88b3ccf91c1c43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:18:15 +0000
+Subject: [PATCH 25/32] mc_gethost: include sys/types.h
+
+Fix build on musl
+error: unknown type name 'u_char'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/network/multicast/mc_gethost/mc_gethost.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
+index 5b9a790..c799e2a 100644
+--- a/testcases/network/multicast/mc_gethost/mc_gethost.c
++++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
+@@ -6,6 +6,7 @@
+
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
new file mode 100644
index 000000000..58b8ed4d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
@@ -0,0 +1,29 @@
+From 0133a2b29d6f48d8e2bba6a3be581cdfa91311a6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:21:05 +0000
+Subject: [PATCH 26/32] crash01: Define _GNU_SOURCE
+
+Fixes musl build errors like
+error: 'SA_NOMASK' undeclared (first use in this function)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/misc/crash/crash01.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/misc/crash/crash01.c b/testcases/misc/crash/crash01.c
+index 0574521..08a02e7 100644
+--- a/testcases/misc/crash/crash01.c
++++ b/testcases/misc/crash/crash01.c
+@@ -49,7 +49,7 @@ stress test at the same time you run other tests, like a multi-user
+ benchmark.
+
+ */
+-
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
new file mode 100644
index 000000000..b47d0977e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
@@ -0,0 +1,29 @@
+From 4a74b275acc8158850f2500928a1467c3482c986 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:23:11 +0000
+Subject: [PATCH 27/32] sysconf01: Use _SC_2_C_VERSION conditionally
+
+_SC_2_C_VERSION is not available on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
+index 8542e77..e806943 100644
+--- a/testcases/kernel/syscalls/sysconf/sysconf01.c
++++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
+@@ -102,7 +102,9 @@ int main(void)
+ test_sysconf(_SC_ATEXIT_MAX);
+ test_sysconf(_SC_2_C_BIND);
+ test_sysconf(_SC_2_C_DEV);
++#ifdef __GLIBC__
+ test_sysconf(_SC_2_C_VERSION);
++#endif
+ /* 21 - 25 */
+ test_sysconf(_SC_2_CHAR_TERM);
+ test_sysconf(_SC_2_FORT_DEV);
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
new file mode 100644
index 000000000..fc82ff923
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
@@ -0,0 +1,43 @@
+From 94557fb7e1293c61145c959b8c5ffecf4a2b1069 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:24:44 +0000
+Subject: [PATCH 28/32] rt_sigaction.h: Use sighandler_t instead of
+ __sighandler_t
+
+When _GNU_SOURCE is used then both typedefs are same and using
+sighandler_t makes it work on musl too
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/lapi/rt_sigaction.h | 2 +-
+ testcases/kernel/syscalls/rt_sigsuspend/Makefile | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/include/lapi/rt_sigaction.h b/include/lapi/rt_sigaction.h
+index 3a5a763..870918c 100644
+--- a/include/lapi/rt_sigaction.h
++++ b/include/lapi/rt_sigaction.h
+@@ -34,7 +34,7 @@
+ #define INVAL_SA_PTR ((void *)-1)
+
+ struct kernel_sigaction {
+- __sighandler_t k_sa_handler;
++ sighandler_t k_sa_handler;
+ unsigned long sa_flags;
+ void (*sa_restorer) (void);
+ sigset_t sa_mask;
+diff --git a/testcases/kernel/syscalls/rt_sigsuspend/Makefile b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
+index 37bc3a9..2ca7f7c 100644
+--- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile
++++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
+@@ -19,4 +19,7 @@
+ top_srcdir ?= ../../../..
+
+ include $(top_srcdir)/include/mk/testcases.mk
++
++CFLAGS += -D_GNU_SOURCE
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
new file mode 100644
index 000000000..f7ece9e18
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
@@ -0,0 +1,32 @@
+From 2f8a57f66a94210d34dd0361659a8297cf3d813f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:29:24 +0000
+Subject: [PATCH 29/32] trace_shed: Fix build with musl
+
+Errors on musl are
+
+trace_sched.c:425:16: error: invalid operands to binary & (have
+'thread_sched_t * {aka struct <anonymous> *}' and 'int')
+ thrd_ndx, WEXITSTATUS(status));
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/sched/tool/trace_sched.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
+index 7815686..30dca5f 100644
+--- a/testcases/kernel/sched/tool/trace_sched.c
++++ b/testcases/kernel/sched/tool/trace_sched.c
+@@ -422,7 +422,7 @@ int main(int argc, /* number of input parameters. */
+ if (status == (thread_sched_t *) - 1) {
+ fprintf(stderr,
+ "thread [%d] - process exited with errors %d\n",
+- thrd_ndx, WEXITSTATUS(status));
++ thrd_ndx, WEXITSTATUS((int)status));
+ exit(-1);
+ } else {
+ exp_prio[thrd_ndx] = status->exp_prio;
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
new file mode 100644
index 000000000..d2d6d76fd
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
@@ -0,0 +1,33 @@
+From 77c95dacffe90382a1f131c801ac569120d95949 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:32:24 +0000
+Subject: [PATCH 30/32] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
+
+e.g. musl does not implement the _NP mutex types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/tst_res.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/tst_res.c b/lib/tst_res.c
+index 5c1c58c..3244b5e 100644
+--- a/lib/tst_res.c
++++ b/lib/tst_res.c
+@@ -104,8 +104,11 @@ int TEST_ERRNO;
+ assert(strlen(buf) > 0); \
+ } while (0)
+
++#ifdef __GLIBC__
+ static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+-
++#else
++static pthread_mutex_t tmutex = { PTHREAD_MUTEX_RECURSIVE };
++#endif
+ /*
+ * Define local function prototypes.
+ */
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
index 905eafb99..473ca4c65 100644
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
@@ -1,7 +1,7 @@
-From 243881d71d2d49027c3dc15fe27ebe7f4ee68700 Mon Sep 17 00:00:00 2001
-From: Chuang Dong <Chuang.Dong@windriver.com>
-Date: Wed, 10 Jun 2015 09:51:09 +0800
-Subject: [PATCH] ltp: vma03 fix the alginment of page size
+From 293ff1da06748ed4c69be6ece262d42e562e7298 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:36:19 +0000
+Subject: [PATCH 31/32] vma03: fix page size offset as per page size alignment
the offset the param of mmap2() doesn't align the page size, but,
this param allow must be a multiple of the page size as returned
@@ -9,18 +9,17 @@ by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
multiple of the system page size, so modify the input param of offset
pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
-Upstream-Status: Submitted
-
Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
testcases/kernel/mem/vma/vma03.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
-index 6af9960..b86d7ce 100644
+index ad8a7b4..a539233 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
-@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
+@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
if (fd == -1)
tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
@@ -30,5 +29,5 @@ index 6af9960..b86d7ce 100644
fd, pgoff);
if (map == MAP_FAILED)
--
-1.8.5.2.233.g932f7e4
+2.7.0
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch
new file mode 100644
index 000000000..5c6bf919f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch
@@ -0,0 +1,30 @@
+From 4f1905ff09c730091674818bd1b48ee221347101 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 08:30:29 +0000
+Subject: [PATCH 32/32] regen.sh: Include asm/unistd.h explicitly
+
+on musl this is not included indirectly and it results in errors like
+testcases/kernel/include/linux_syscall_numbers.h:1035:25: error:
+'__NR_SYSCALL_BASE' undeclared (first use in this function)
+| # define __NR_readdir (__NR_SYSCALL_BASE+ 89)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/include/regen.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/include/regen.sh b/testcases/kernel/include/regen.sh
+index f93f49b..ee790af 100755
+--- a/testcases/kernel/include/regen.sh
++++ b/testcases/kernel/include/regen.sh
+@@ -32,6 +32,7 @@ cat << EOF > "${output_pid}"
+
+ #include <errno.h>
+ #include <sys/syscall.h>
++#include <asm/unistd.h>
+ #include "cleanup.c"
+
+ #define ltp_syscall(NR, ...) ({ \\
+--
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
new file mode 100644
index 000000000..868e1cf1f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
@@ -0,0 +1,41 @@
+From 5e3dea669e5b0b769f322d54a3bb9f320b5327da Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 15:47:14 +0000
+Subject: [PATCH 26/26] shmat1: Cover GNU specific code under __USE_GNU
+
+on x86, we use uc_mcontext element from sigcontext
+which is marked gnu-specific in glibc, this patch
+adds this condition around the code
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ testcases/kernel/mem/mtest06/shmat1.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
+index 0d6d7a4..bee69f6 100644
+--- a/testcases/kernel/mem/mtest06/shmat1.c
++++ b/testcases/kernel/mem/mtest06/shmat1.c
+@@ -111,7 +111,7 @@ int done_shmat = 0; /* disallow read and writes before shmat */
+ static void sig_handler(int signal, /* signal number, set to handle SIGALRM */
+ int code, struct ucontext *ut)
+ { /* contains pointer to sigcontext structure */
+-#ifdef __i386__
++#if defined(__i386__) && defined(__USE_GNU)
+ unsigned long except; /* exception type. */
+ int ret = 0; /* exit code from signal handler. */
+ struct sigcontext *scp = /* pointer to sigcontext structure */
+@@ -122,7 +122,7 @@ static void sig_handler(int signal, /* signal number, set to handle SIGALRM
+ fprintf(stdout, "Test ended, success\n");
+ exit(0);
+ }
+-#ifdef __i386__
++#if defined(__i386__) && defined(__USE_GNU)
+ else {
+ except = scp->trapno;
+ fprintf(stderr, "signal caught - [%d] ", signal);
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
new file mode 100644
index 000000000..59caefe43
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
@@ -0,0 +1,43 @@
+Add periodic output for long time test.
+
+This is needed in context of having scripts running ltp tests and
+waiting with a timeout for the output of the tests.
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+
+diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
+--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100
++++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100
+@@ -37,7 +37,8 @@
+ exit 0
+ fi
+
+-RUN_TIME=$(( 60 * 60 ))
++ONE_MINUTE=60
++RUN_TIME=60
+
+ cleanup()
+ {
+@@ -62,7 +63,7 @@
+ # $1 - Number of cgroups
+ # $2 - Allocated how much memory in one process? in MB
+ # $3 - The interval to touch memory in a process
+-# $4 - How long does this test run ? in second
++# $4 - How long does this test run ? in minutes
+ run_stress()
+ {
+ do_mount;
+@@ -81,7 +82,11 @@
+ eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
+ done
+
+- sleep $4
++ for i in $(seq 0 $(($4-1)))
++ do
++ eval echo "Started $i min ago. Still alive... "
++ sleep $ONE_MINUTE
++ done
+
+ for i in $(seq 0 $(($1-1)))
+ do
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
new file mode 100644
index 000000000..32ae8aa27
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
@@ -0,0 +1,23 @@
+Fix test_proc_kill hanging
+
+Sometimes the signal is delivered to memcg_process before the framework took
+into consideration its pid entered in the tasks. Fixed by delaying the signal
+send command.
+
+Signed-off-by: George Nita <george.nita@enea.com>
+Upstream-Status: Pending
+
+diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+index ffbe006..e81bf74 100755
+--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
++++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+@@ -220,8 +220,8 @@ test_proc_kill()
+
+ $TEST_PATH/memcg_process $2 -s $3 &
+ pid=$!
+- sleep 1
+ echo $pid > tasks
++ sleep 1
+
+ kill -s USR1 $pid 2> /dev/null
+ sleep 1
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
deleted file mode 100644
index 064f00ae3..000000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-[PATCH] add knob to control whether numa support should be checked
-
-Upstream-Status: Pending
-
-otherwise the random dependency will be generated
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- configure.ac | 10 +-
-diff --git a/configure.ac b/configure.ac
-index 9f397e7..1357256 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -142,6 +142,12 @@ else
- AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
- fi
-
-+AC_ARG_WITH([numa],
-+ AC_HELP_STRING([--without-numa],
-+ [without the numa support]),
-+ [],[with_numa=yes],
-+)
-+
- AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
-
- # END testsuites knobs
-@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL
- LTP_CHECK_SYSCALL_EVENTFD
- LTP_CHECK_SYSCALL_KEYCTL
- LTP_CHECK_SYSCALL_MODIFY_LDT
-+if test "x$with_numa" = xyes; then
- LTP_CHECK_SYSCALL_NUMA
-+fi
- LTP_CHECK_SYSCALL_QUOTACTL
- LTP_CHECK_SYSCALL_SIGNALFD
- LTP_CHECK_SYSCALL_UNSHARE
---
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
deleted file mode 100644
index 4836010bd..000000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-[PATCH] make setregid02 work
-
-Upstream-Status: Inappropriate [configuration]
-
-there is no "nobody" group in oe-core, the user "nobody" belongs to
-"nogroup" group, so replace nobody with nogroup to make the test pass
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
-index 8058627..866bee4 100644
---- a/testcases/kernel/syscalls/setregid/setregid02.c
-+++ b/testcases/kernel/syscalls/setregid/setregid02.c
-@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
-
- static struct passwd *ltpuser;
-
--static struct group nobody, root, bin;
-+static struct group nogroup, root, bin;
-
- /*
- * The following structure contains all test data. Each structure in the array
-@@ -57,17 +57,17 @@ struct test_data_t {
- char *test_msg;
- } test_data[] = {
- {
-- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
-+ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
- "After setregid(-1, root),"}, {
-- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
-+ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
- "After setregid(-1, bin)"}, {
-- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
-+ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
- "After setregid(root,-1),"}, {
-- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
-+ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
- "After setregid(bin, -1),"}, {
-- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
-+ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
- "After setregid(root, bin)"}, {
-- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
-+ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
- "After setregid(bin, root),"}
- };
-
-@@ -165,7 +165,7 @@ static void setup(void)
- } while (0)
-
- GET_GID(root);
-- GET_GID(nobody);
-+ GET_GID(nogroup);
- GET_GID(bin);
-
- TEST_PAUSE;
---
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp_20150420.bb b/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
index ed46b5e09..097c16d57 100644
--- a/yocto-poky/meta/recipes-extended/ltp/ltp_20150420.bb
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -20,17 +20,49 @@ LIC_FILES_CHKSUM = "\
"
DEPENDS = "attr libaio libcap acl openssl zip-native"
-SRCREV = "77d0b7fd0148ce657c5a25060667e978c07662a0"
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
+CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
+SRCREV = "fce797676b14f50406718e7ef640b50da66c9b36"
SRC_URI = "git://github.com/linux-test-project/ltp.git \
- file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
- file://ltp-Do-not-link-against-libfl.patch \
- file://make-setregid02-work.patch \
- file://add-knob-for-numa.patch \
- file://add-knob-for-tirpc.patch \
- file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \
- file://0001-replace-inline-with-static-inline-for-gcc-5.x.patch \
-"
+ file://0001-ltp-Don-t-link-against-libfl.patch \
+ file://0002-Add-knob-to-control-whether-numa-support-should-be-c.patch \
+ file://0003-Add-knob-to-control-tirpc-support.patch \
+ file://0004-build-Add-option-to-select-libc-implementation.patch \
+ file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
+ file://0006-sendfile-Use-off64_t-instead-of-__off64_t.patch \
+ file://0007-replace-SIGCLD-with-SIGCHLD.patch \
+ file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
+ file://0009-Guard-error.h-with-__GLIBC__.patch \
+ file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+ file://0011-Rename-sigset-variable-to-sigset1.patch \
+ file://0012-fsstress.c-Replace-__int64_t-with-int64_t.patch \
+ file://0013-include-fcntl.h-for-getting-O_-definitions.patch \
+ file://0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch \
+ file://0015-mincore01-Rename-PAGESIZE-to-pagesize.patch \
+ file://0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch \
+ file://0017-replace-sigval_t-with-union-sigval.patch \
+ file://0018-guard-mallocopt-with-__GLIBC__.patch \
+ file://0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch \
+ file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
+ file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
+ file://0022-include-sys-types.h.patch \
+ file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
+ file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
+ file://0025-mc_gethost-include-sys-types.h.patch \
+ file://0026-crash01-Define-_GNU_SOURCE.patch \
+ file://0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch \
+ file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
+ file://0029-trace_shed-Fix-build-with-musl.patch \
+ file://0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch \
+ file://0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch \
+ file://0032-regen.sh-Include-asm-unistd.h-explicitly.patch \
+ file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
+ file://0034-periodic_output.patch \
+ file://0035-fix-test_proc_kill-hang.patch \
+ "
S = "${WORKDIR}/git"
@@ -63,17 +95,7 @@ do_install(){
cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
}
-RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect"
-
-FILES_${PN}-dbg += "\
- /opt/ltp/runtest/.debug \
- /opt/ltp/testcases/*/.debug \
- /opt/ltp/testcases/*/*/.debug \
- /opt/ltp/testcases/*/*/*/.debug \
- /opt/ltp/scenario_groups/.debug \
- /opt/ltp/testscripts/.debug \
- /opt/ltp/testscripts/open_posix_testsuite/.debug \
-"
+RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect ldd"
FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
diff --git a/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch b/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
index 5d616458b..13b955c4b 100644
--- a/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
+++ b/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
@@ -13,6 +13,7 @@ This patch is taken from
ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
Upstream-Status: Inappropriate [upstream is dead]
+CVE: CVE-2014-7844
---
mailx.1 | 14 ++++++++++++++
names.c | 3 +++
diff --git a/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch b/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
index f65cfa8ca..ae14b8acf 100644
--- a/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
+++ b/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
@@ -7,6 +7,7 @@ This patch is taken from
ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
Upstream-Status: Inappropriate [upstream is dead]
+CVE: CVE-2004-2771
---
fio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb b/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
index c87c58258..4a32d2f68 100644
--- a/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
+++ b/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
@@ -26,6 +26,10 @@ SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.g
SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2"
SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad"
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
+
S = "${WORKDIR}/heirloom-mailx-12.5"
inherit autotools-brokensep
diff --git a/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.02.bb b/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb
index 1b90a44f9..65df0aad3 100644
--- a/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.02.bb
+++ b/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb
@@ -7,8 +7,8 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-SRC_URI[md5sum] = "93df3279798a3345bb2c709584c83639"
-SRC_URI[sha256sum] = "42324f9ed47c89a43cb37b6bb0d5fbcad44838eee45cd394e181c98d038c49ff"
+SRC_URI[md5sum] = "901cd52e0ee2a9d7508ae1ab15d5e835"
+SRC_URI[sha256sum] = "bff072462baea8d1b8e4568759324c5ed6c760716fe830bca71129cc09e00668"
RDEPENDS_${PN} = "man"
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
deleted file mode 100644
index fe66d7599..000000000
--- a/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100
-+++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100
-@@ -34,6 +34,15 @@
- for i in $(MAN8); \
- do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
-
-+install-l10n: $(ALL)
-+ mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8
-+ for i in $(MAN1); \
-+ do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done
-+ for i in $(MAN5); \
-+ do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done
-+ for i in $(MAN8); \
-+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done
-+
- clean:
- rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
-
-@@ -49,7 +58,7 @@
- @for i in @languages@; do if test -d $$i; then echo; \
- echo "==== Installing the `cat $$i.txt` man pages. ===="; \
- cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
-- export SLANG; make -f ../Makefile install; cd ..; \
-+ export SLANG; make -f ../Makefile install-l10n; cd ..; \
- else echo "==== No $$i man pages found. ===="; fi; done
-
- cleansubdirs:
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
new file mode 100644
index 000000000..4631d2d06
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
@@ -0,0 +1,105 @@
+Fix a build error when building man.config.5 (a remnant of a long
+ago previous patch). Optimized the manpages Makefile for parallel
+builds. Also, fix compile warnings in a couple other files.
+
+Upstream-Status: Pending
+
+Signed-off-by: Bill Randle <william.c.randle@intel.com>
+
+--- man-1.6g/man/Makefile.in.orig 2016-03-28 17:31:08.723949180 -0700
++++ man-1.6g/man/Makefile.in 2016-03-28 17:46:12.866910386 -0700
+@@ -5,6 +5,13 @@
+ ALL = man.1 whatis.1 apropos.1 man.config.5
+ MAYBE8 = makewhatis
+
++SUBDIRS := $(shell echo @languages@)
++
++.PHONY: subdirs $(SUBDIRS)
++
++man.config.man: man.conf.man
++ @cp $< $@
++
+ .SUFFIXES: .man .1 .5 .8
+
+ .man.1:
+@@ -19,11 +26,11 @@
+ INSTALL = @INSTALL@ -c -m 644
+
+ # Where to put the manual pages.
+-mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
++mandir := $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
+
+ all: $(ALL)
+ for i in $(MAYBE8); \
+- do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
++ do if test -f $$i.man; then $(MAKE) -f ../Makefile $$i.8; fi; done
+
+ install: $(ALL)
+ mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
+@@ -38,24 +45,27 @@
+ rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
+
+ spotless:
++ rm -f man.config.man
+
+ subdirs:
+- @for i in @languages@; do if test -d $$i; then echo; \
+- echo "==== Making the `cat $$i.txt` man pages. ===="; \
+- cd $$i; make -f ../Makefile; cd ..; \
+- else echo "==== No $$i man pages found. ===="; fi; done
++subdirs: $(SUBDIRS)
++$(SUBDIRS):
++ if test -d $@; then echo; \
++ echo "==== Making the `cat $@.txt` man pages. ===="; \
++ $(MAKE) -C $@ -f ../Makefile all; \
++ else echo "==== No $@ man pages found. ===="; fi
+
+ installsubdirs:
+ @for i in @languages@; do if test -d $$i; then echo; \
+ echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+ cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+- export SLANG; make -f ../Makefile install; cd ..; \
++ export SLANG; $(MAKE) -f ../Makefile install; cd ..; \
+ else echo "==== No $$i man pages found. ===="; fi; done
+
+ cleansubdirs:
+- @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
++ @for i in ??; do $(MAKE) -C $$i -f ../Makefile clean; done
+ rm -f core *~
+
+ spotlesssubdirs:
+- for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
++ for i in ??; do $(MAKE) -C $$i -f ../Makefile spotless; done
+ rm -f Makefile
+
+--- man-1.6g/src/gripes.c.orig 2006-11-21 11:53:44.000000000 -0800
++++ man-1.6g/src/gripes.c 2016-03-30 16:32:31.601103487 -0700
+@@ -7,8 +7,6 @@
+
+ extern char *msg[];
+
+-static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
+-
+ #ifdef NONLS
+
+ static char *
+@@ -30,6 +28,8 @@
+ #include <nl_types.h>
+ #include "../catopen/catopen.c"
+
++static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
++
+ nl_catd catfd = (nl_catd) -1;
+ int cat_is_open = 0;
+
+--- man-1.6g/src/manfile.c.orig 2005-08-20 16:26:06.000000000 -0700
++++ man-1.6g/src/manfile.c 2016-03-29 09:10:21.527841285 -0700
+@@ -299,7 +299,7 @@
+ const char *((*tocat)(const char *man_filename, const char *ext,
+ int flags))) {
+ char **sl;
+- struct manpage *res;
++ struct manpage *res = 0;
+
+ standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX));
+ to_cat_filename = tocat;
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
new file mode 100644
index 000000000..106cc9878
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
@@ -0,0 +1,68 @@
+Use BUILD_CC and target include files for configuration tests.
+If cross-compiling, force pathnames for helper programs, since
+autodiscovery by the configure script will not work.
+
+Upstream-Status: Pending
+
+Signed-off-by: Bill Randle <william.c.randle at intel.com>
+
+--- man-1.6g/configure.orig 2016-03-28 17:46:12.734910976 -0700
++++ man-1.6g/configure 2016-03-30 21:47:45.110572908 -0700
+@@ -216,7 +216,8 @@
+ INCLUDEDIR=${INCLUDEDIR-/usr/include}
+
+ rm -f conftest conftest.c
+-compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
++# since we are interested in target feature support, use that sysroot
++compile="$BUILD_CC -isystem/${PKG_CONFIG_SYSROOT_DIR}/usr/include $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
+
+ # Check for various header files.
+
+@@ -455,19 +456,23 @@
+ fi
+ done
+ done
+- Fgroff=/usr/bin/groff
+- Fnroff=/usr/bin/nroff
+- Fjnroff=/usr/bin/nroff
+- Fgeqn=/usr/bin/geqn
+- Fgtbl=/usr/bin/gtbl
+- Fcol=/usr/bin/col
+- Fgrefer=/usr/bin/grefer
+- Fgpic=/usr/bin/gpic
+- Fmore=/bin/more
+- Fless=/usr/bin/less
+- Fcmp=/usr/bin/cmp
+- Fcat=/bin/cat
+- Fgawk=/bin/gawk
++ if [ $BUILD_CC != $CC ]; then
++ # cross compiling => target fs not available, so force defaults
++ Fgroff=/usr/bin/groff
++ Fnroff=/usr/bin/nroff
++ Fjnroff=/usr/bin/nroff
++ Fgeqn=/usr/bin/eqn
++ Fgneqn=/usr/bin/neqn
++ Fgtbl=/usr/bin/tbl
++ Fcol=/usr/bin/col
++ Fgrefer=/usr/bin/refer
++ Fgpic=/usr/bin/pic
++ Fmore=/bin/more
++ Fless=/usr/bin/less
++ Fcmp=/usr/bin/cmp
++ Fcat=/bin/cat
++ Fgawk=/usr/bin/gawk
++ fi
+
+
+ for i in eqn tbl refer pic
+@@ -507,8 +512,8 @@
+ jnroff="$Fjnroff -Tutf8 -mandocj"
+ fi
+ eqn="$Fgeqn -Tps"
+- neqn="$Fgeqn -Tutf8"
+- jneqn="$Fgeqn -Tutf8"
++ neqn="$Fgneqn -Tutf8"
++ jneqn="$Fgneqn -Tutf8"
+ tbl="$Fgtbl"
+ col="$Fcol"
+ vgrind="$Fvgrind"
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
new file mode 100644
index 000000000..72a88b898
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
@@ -0,0 +1,30 @@
+The Makefile for man has a rule to create two generated targets with
+a program run from the shell. Because the rule was run twice, with
+parallel make, the generated files were being overwritten at the same
+time they were being compiled. This patch forces the rule to be run
+only once.
+
+Upstream-Status: Pending
+
+Signed-off-by: Bill Randle <william.c.randle at intel.com>
+
+--- man-1.6g/src/Makefile.in.orig 2010-12-31 12:28:46.000000000 -0800
++++ man-1.6g/src/Makefile.in 2016-03-28 09:09:16.845458798 -0700
+@@ -43,8 +43,10 @@
+ makemsg:
+ $(BUILD_CC) -o makemsg makemsg.c
+
+-msg.c gripedefs.h: ../msgs/mess.en makemsg
++msg.c gripedefs.h: genfiles-stamp
++genfiles-stamp: ../msgs/mess.en makemsg
+ ./makemsg ../msgs/mess.en gripedefs.h msg.c
++ touch genfiles-stamp
+
+ # glob.c does not have prototypes
+ glob.o: glob.c ndir.h
+@@ -117,4 +119,4 @@
+
+ spotless: clean
+ rm -f Makefile config.status paths.h version.h man.conf
+- rm -f gripedefs.h msg.c mess.*.cat
++ rm -f gripedefs.h msg.c mess.*.cat genfiles-stamp
diff --git a/yocto-poky/meta/recipes-extended/man/man_1.6g.bb b/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
index fa4736b29..e78aa18cb 100644
--- a/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
+++ b/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
@@ -39,7 +39,6 @@ SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba
file://man-1.5i2-initial.patch \
file://man-1.5h1-gencat.patch;striplevel=0 \
file://man-1.5g-nonrootbuild.patch \
- file://man-1.5m2-tv_fhs.patch;striplevel=0 \
file://man-1.5j-i18n.patch \
file://man-1.6e-whatis2.patch \
file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
@@ -53,6 +52,9 @@ SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba
file://manpath.5.gz;unpack=false \
file://man-1.6g-whatis3.patch \
file://configure_sed.patch \
+ file://man-1.6g-parallel.patch \
+ file://man-1.6g-compile-warnings.patch \
+ file://man-1.6g-configure.patch \
"
SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
diff --git a/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb b/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb
index b47eb0232..b38964d82 100644
--- a/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb
+++ b/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -19,8 +19,6 @@ inherit autotools gettext pkgconfig
EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
-FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
-
do_install_append () {
sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
diff --git a/yocto-poky/meta/recipes-extended/mc/mc_4.8.14.bb b/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb
index 3b6c2ffec..6c3a16aab 100644
--- a/yocto-poky/meta/recipes-extended/mc/mc_4.8.14.bb
+++ b/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb
@@ -8,9 +8,8 @@ RDEPENDS_${PN} = "ncurses-terminfo"
SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
"
-
-SRC_URI[md5sum] = "fe1cb75643c2bd4df64bbcf2dab76905"
-SRC_URI[sha256sum] = "61fd0fd2280c3d09d7e0aec8ab001fc89dad8e4fd9941f386414667b55152ec5"
+SRC_URI[md5sum] = "db48ce26ba425a61edc51930e94227fd"
+SRC_URI[sha256sum] = "f74e3da70410975cdeb27ee9a66d1dd812250b6d3ede364bca728dd5a48e5471"
inherit autotools gettext pkgconfig
@@ -23,8 +22,6 @@ PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
-FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
-
do_install_append () {
sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
new file mode 100644
index 000000000..ee482b5ca
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
@@ -0,0 +1,50 @@
+From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001
+From: Xiao Ni <xni@redhat.com>
+Date: Mon, 8 Feb 2016 11:18:52 +0200
+Subject: [PATCH] Fix some type comparison problems
+
+As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed
+timestamps will overflow in the year 2038. It already changed the
+utime and ctime in struct mdu_array_info_s from int to unsigned
+int. So we need to change the values that compared with them to
+unsigned int too.
+
+Upstream-Status: Backport
+
+Signed-off-by : Xiao Ni <xni@redhat.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+
+ Monitor.c | 2 +-
+ util.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Monitor.c b/Monitor.c
+index f19c2e5..6df80f9 100644
+--- a/Monitor.c
++++ b/Monitor.c
+@@ -33,7 +33,7 @@
+ struct state {
+ char *devname;
+ char devnm[32]; /* to sync with mdstat info */
+- long utime;
++ unsigned int utime;
+ int err;
+ char *spare_group;
+ int active, working, failed, spare, raid;
+diff --git a/util.c b/util.c
+index 3e6d293..96a806d 100644
+--- a/util.c
++++ b/util.c
+@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
+ */
+ struct superswitch *ss;
+ struct supertype *st;
+- time_t besttime = 0;
++ unsigned int besttime = 0;
+ int bestsuper = -1;
+ int i;
+
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
new file mode 100644
index 000000000..deb748638
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
@@ -0,0 +1,33 @@
+From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 9 Feb 2016 11:44:01 +0200
+Subject: [PATCH] Fix the path of corosync and dlm header files check
+
+Original Makefile will check headers on host instead of sysroot.
+Fix it.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index fd79cfb..34150a9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR)
+ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
+ SYSTEMD_DIR=/lib/systemd/system
+
+-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
+-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
++COROSYNC:=$(shell [ -d $(SYSROOT)/usr/include/corosync ] || echo -DNO_COROSYNC)
++DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM)
+
+ DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
+ DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
new file mode 100644
index 000000000..139547398
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
@@ -0,0 +1,55 @@
+From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Fri, 5 Feb 2016 18:06:32 +0200
+Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
+
+Fixes this build error:
+
+| In file included from mdadm.c:28:0:
+| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
+| #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
+| ^
+
+Upstream-Status: Submitted
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ mdadm.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/mdadm.h b/mdadm.h
+index dd02be7..230e60f 100755
+--- a/mdadm.h
++++ b/mdadm.h
+@@ -139,12 +139,20 @@ struct dlm_lksb {
+ * and there is no standard conversion function so... */
+ /* And dietlibc doesn't think byteswap is ok, so.. */
+ /* #include <byteswap.h> */
++
++#ifndef bswap_16
+ #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
+ ((x) & 0xff00U) >> 8)
++#endif
++
++#ifndef bswap_32
+ #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
+ ((x) & 0xff000000U) >> 24 | \
+ ((x) & 0x0000ff00U) << 8 | \
+ ((x) & 0x00ff0000U) >> 8)
++#endif
++
++#ifndef bswap_64
+ #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
+ ((x) & 0xff00000000000000ULL) >> 56 | \
+ ((x) & 0x000000000000ff00ULL) << 40 | \
+@@ -153,6 +161,7 @@ struct dlm_lksb {
+ ((x) & 0x0000ff0000000000ULL) >> 24 | \
+ ((x) & 0x00000000ff000000ULL) << 8 | \
+ ((x) & 0x000000ff00000000ULL) >> 8)
++#endif
+
+ #if !defined(__KLIBC__)
+ #if BYTE_ORDER == LITTLE_ENDIAN
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
new file mode 100644
index 000000000..d5cf00374
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
@@ -0,0 +1,45 @@
+From 2645673a7ea948a1297d5b8f0daab29b898f044f Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Fri, 5 Feb 2016 17:14:04 +0200
+Subject: [PATCH] util.c: include poll.h instead of sys/poll.h
+
+This fixes a compile warning when building with musl:
+
+ In file included from util.c:27:0:
+ |
+ qemux86-64/usr/include/sys/poll.h:1:2:
+ error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+ [-Werror=cpp]
+ | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+ | ^
+
+Upstream-Status: Accepted
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.c b/util.c
+index 970d484..3e6d293 100644
+--- a/util.c
++++ b/util.c
+@@ -24,7 +24,6 @@
+
+ #include "mdadm.h"
+ #include "md_p.h"
+-#include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <sys/utsname.h>
+ #include <sys/wait.h>
+@@ -32,6 +31,7 @@
+ #include <sys/resource.h>
+ #include <sys/vfs.h>
+ #include <linux/magic.h>
++#include <poll.h>
+ #include <ctype.h>
+ #include <dirent.h>
+ #include <signal.h>
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
index 3b3db0a7f..40acc148e 100644
--- a/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -1,4 +1,4 @@
-Upstream-Status: pending
+Upstream-Status: Accepted
By hardcoding CC's definition in the Makefile, all the gcc parameters
set by tune settings are lost. Causing compile failure with x32 toolchain
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
new file mode 100644
index 000000000..267c007c2
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -0,0 +1,45 @@
+From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 10 Feb 2016 17:28:05 +0200
+Subject: [PATCH] mdadm-fix-ptest-build-errors
+
+builds fail with ptest enabled:
+
+| restripe.c: In function 'test_stripes':
+| restripe.c:845:4: error: ignoring return value of 'read', declared with
+| attribute warn_unused_result [-Werror=unused-result]
+| read(source[i], stripes[i], chunk_size);
+| ^
+| cc1: all warnings being treated as errors
+| Makefile:214: recipe for target 'test_stripe' failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ restripe.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/restripe.c b/restripe.c
+index 56dca73..d24b2b4 100644
+--- a/restripe.c
++++ b/restripe.c
+@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets,
+
+ while (length > 0) {
+ int disk;
++ ssize_t ret;
+
+ for (i = 0 ; i < raid_disks ; i++) {
+ lseek64(source[i], offsets[i]+start, 0);
+- read(source[i], stripes[i], chunk_size);
++ ret = read(source[i], stripes[i], chunk_size);
++ if (ret == -1) {
++ printf("Read Failed\n");
++ }
+ }
+ for (i = 0 ; i < data_disks ; i++) {
+ int disk = geo_map(i, start/chunk_size, raid_disks,
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
index 11981670e..142dfddbf 100644
--- a/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
+++ b/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
@@ -13,26 +13,30 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://gcc-4.9.patch \
file://mdadm-3.3.2_x32_abi_time_t.patch \
file://0001-Fix-typo-in-comparision.patch \
+ file://mdadm-fix-ptest-build-errors.patch \
+ file://0001-util.c-include-poll.h-instead-of-sys-poll.h.patch \
+ file://0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch \
+ file://0001-Fix-some-type-comparison-problems.patch \
+ file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
-SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68"
+SRC_URI[md5sum] = "04b8b21f637540350f8517c7e68d3c63"
+SRC_URI[sha256sum] = "27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808"
CFLAGS += "-fno-strict-aliasing"
-
inherit autotools-brokensep
-EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
+EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
# prevents 64-bit userland from seeing this definition, instead defaulting
# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
# int-ll64.h included
-EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mips64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mips64n32 = ' -D__SANE_USERSPACE_TYPES__'
do_compile() {
- oe_runmake
+ oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
}
do_install() {
diff --git a/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb b/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb
index 1575cfbc7..3118686e1 100644
--- a/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb
+++ b/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb
@@ -15,6 +15,8 @@ SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz
SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d"
SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4"
+UPSTREAM_CHECK_URI = "https://alioth.debian.org/frs/?group_id=30018"
+
PACKAGECONFIG ??= ""
PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
diff --git a/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb b/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb
index fe238eea3..9accc6eed 100644
--- a/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb
+++ b/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb
@@ -27,7 +27,7 @@ do_install_append () {
ALTERNATIVE_${PN} = "mktemp"
ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_PRIORITY = "60"
ALTERNATIVE_${PN}-doc = "mktemp.1"
ALTERNATIVE_PRIORITY_${PN}-doc = "300"
diff --git a/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.2.bb b/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb
index f9bf5631b..6dbd78f9f 100644
--- a/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.2.bb
+++ b/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
"
-SRC_URI[md5sum] = "3baca93c7e5f1aa9d36a2e5b38739ab9"
-SRC_URI[sha256sum] = "2f6ecd7cbfadf548fd55205bd24cb63b84bcbb1185efed917dd7800595a48789"
+SRC_URI[md5sum] = "6d9384c09405db9476beaa2237c56705"
+SRC_URI[sha256sum] = "f982be069c0772c3ee83925f552f5dac5fb307d2d1c68202f9926bb13b757355"
inherit gettext autotools update-alternatives pkgconfig
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
new file mode 100644
index 000000000..f694d594b
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
@@ -0,0 +1,100 @@
+Adjust headers for non-glibc cases
+especially exposed by musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: net-tools-1.60/lib/inet6_gr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet6_gr.c
++++ net-tools-1.60/lib/inet6_gr.c
+@@ -23,7 +23,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#ifndef __GLIBC__
++#ifdef HAVE_IPV6_ROUTE_H
+ #include <netinet6/ipv6_route.h> /* glibc doesn't have this */
+ #endif
+ #include "version.h"
+Index: net-tools-1.60/lib/inet6_sr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet6_sr.c
++++ net-tools-1.60/lib/inet6_sr.c
+@@ -23,10 +23,10 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#ifdef __GLIBC__
+-#include <net/route.h>
+-#else
++#ifdef HAVE_IPV6_ROUTE_H
+ #include <netinet6/ipv6_route.h> /* glibc does not have this */
++#else
++#include <net/route.h>
+ #endif
+ #include "version.h"
+ #include "net-support.h"
+Index: net-tools-1.60/lib/inet_sr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet_sr.c
++++ net-tools-1.60/lib/inet_sr.c
+@@ -26,6 +26,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <asm-generic/param.h>
+ #include "version.h"
+ #include "net-support.h"
+ #include "pathnames.h"
+Index: net-tools-1.60/lib/util-ank.c
+===================================================================
+--- net-tools-1.60.orig/lib/util-ank.c
++++ net-tools-1.60/lib/util-ank.c
+@@ -14,6 +14,7 @@
+ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
+ */
+
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+Index: net-tools-1.60/mii-tool.c
+===================================================================
+--- net-tools-1.60.orig/mii-tool.c
++++ net-tools-1.60/mii-tool.c
+@@ -47,10 +47,6 @@ static char Version[] = "$Id: mii-tool.c
+ #include <net/if.h>
+ #include <linux/sockios.h>
+
+-#ifndef __GLIBC__
+-#include <linux/if_arp.h>
+-#include <linux/if_ether.h>
+-#endif
+ #include "mii.h"
+ #include "version.h"
+
+Index: net-tools-1.60/netstat.c
+===================================================================
+--- net-tools-1.60.orig/netstat.c
++++ net-tools-1.60/netstat.c
+@@ -87,6 +87,7 @@
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <asm-generic/param.h>
+
+ #include "net-support.h"
+ #include "pathnames.h"
+Index: net-tools-1.60/slattach.c
+===================================================================
+--- net-tools-1.60.orig/slattach.c
++++ net-tools-1.60/slattach.c
+@@ -44,6 +44,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <getopt.h>
++#include <termios.h>
+ #include <linux/if_slip.h>
+
+ #if defined(__GLIBC__)
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
new file mode 100644
index 000000000..12eed17af
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
@@ -0,0 +1,638 @@
+From 23276afe270009420cfbc52bffafdd25ac0817fe Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 14 Jan 2016 17:01:29 +0800
+Subject: [PATCH 1/3] net-tools: add SCTP support for netstat
+
+Upstream-Status: pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ netstat.c | 411 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ statistics.c | 68 +++++++++-
+ 2 files changed, 465 insertions(+), 14 deletions(-)
+
+diff --git a/netstat.c b/netstat.c
+index 1fb9e0c..5d1a4a1 100644
+--- a/netstat.c
++++ b/netstat.c
+@@ -58,6 +58,7 @@
+ *
+ *990420 {1.38} Tuan Hoang removed a useless assignment from igmp_do_one()
+ *20010404 {1.39} Arnaldo Carvalho de Melo - use setlocale
++ *20050516 {1.40} Ivan Skytte Joergensen:Added SCTP support
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+@@ -105,7 +106,7 @@
+ #endif
+
+ /* prototypes for statistics.c */
+-void parsesnmp(int, int, int);
++void parsesnmp(int, int, int, int);
+ void inittab(void);
+ void parsesnmp6(int, int, int);
+ void inittab6(void);
+@@ -118,6 +119,28 @@ typedef enum {
+ SS_DISCONNECTING /* in process of disconnecting */
+ } socket_state;
+
++#define SCTP_NSTATES 9 /* The number of states in array*/
++
++static const char *sctp_state[] = {
++ N_("EMPTY"),
++ N_("CLOSED"),
++ N_("COOKIE_WAIT"),
++ N_("COOKIE_ECHOED"),
++ N_("ESTABLISHED"),
++ N_("SHUTDOWN_PENDING"),
++ N_("SHUTDOWN_SENT"),
++ N_("SHUTDOWN_RECEIVED"),
++ N_("SHUTDOWN_ACK_SENT")
++};
++
++#define SCTP_NTYPES 3 /* The number of types in array */
++
++static const char *sctp_type[] = {
++ N_("udp"),
++ N_("udp-high-bw"),
++ N_("tcp")
++};
++
+ #define SO_ACCEPTCON (1<<16) /* performed a listen */
+ #define SO_WAITDATA (1<<17) /* wait data to read */
+ #define SO_NOSPACE (1<<18) /* no space to write */
+@@ -148,6 +171,7 @@ int flag_opt = 0;
+ int flag_raw = 0;
+ int flag_tcp = 0;
+ int flag_udp = 0;
++int flag_sctp= 0;
+ int flag_igmp= 0;
+ int flag_rom = 0;
+ int flag_exp = 1;
+@@ -990,6 +1014,365 @@ static int udp_info(void)
+ udp_do_one);
+ }
+
++static const char *sctp_socket_type_str(int type) {
++ if(type>=0 && type<SCTP_NTYPES)
++ return sctp_type[type];
++ else {
++ static char type_str_buf[64];
++ sprintf(type_str_buf,"UNKNOWN(%d)",type);
++ return type_str_buf;
++ }
++}
++
++static const char *sctp_state_str(int state)
++{
++ if(state>=0 && state<SCTP_NSTATES)
++ return sctp_state[state];
++ else {
++ static char state_str_buf[64];
++ sprintf(state_str_buf,"UNKNOWN(%d)",state);
++ return state_str_buf;
++ }
++}
++
++static const char *sctp_socket_state_str(int state)
++{
++ if(state>=0 && state<=10)
++ return tcp_state[state];
++ else {
++ static char state_str_buf[64];
++ sprintf(state_str_buf,"UNKNOWN(%d)",state);
++ return state_str_buf;
++ }
++}
++
++static struct aftype *process_sctp_addr_str(const char *addr_str, struct sockaddr *sa)
++{
++ if (strchr(addr_str,':')) {
++#if HAVE_AFINET6
++ extern struct aftype inet6_aftype;
++ /* Demangle what the kernel gives us */
++ struct in6_addr in6;
++ char addr6_str[INET6_ADDRSTRLEN];
++ unsigned u0,u1,u2,u3,u4,u5,u6,u7;
++ sscanf(addr_str, "%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",
++ &u0, &u1, &u2, &u3, &u4, &u5, &u6, &u7);
++ in6.s6_addr16[0] = htons(u0);
++ in6.s6_addr16[1] = htons(u1);
++ in6.s6_addr16[2] = htons(u2);
++ in6.s6_addr16[3] = htons(u3);
++ in6.s6_addr16[4] = htons(u4);
++ in6.s6_addr16[5] = htons(u5);
++ in6.s6_addr16[6] = htons(u6);
++ in6.s6_addr16[7] = htons(u7);
++
++ inet_ntop(AF_INET6, &in6, addr6_str, sizeof(addr6_str));
++ inet6_aftype.input(1, addr6_str, sa);
++ sa->sa_family = AF_INET6;
++#endif
++ } else {
++ ((struct sockaddr_in*)sa)->sin_addr.s_addr = inet_addr(addr_str);
++ sa->sa_family = AF_INET;
++ }
++ return get_afntype(sa->sa_family);
++}
++
++static void sctp_eps_do_one(int lnr, char *line)
++{
++ char buffer[1024];
++ int type, state, port;
++ int uid;
++ unsigned long inode;
++
++ struct aftype *ap;
++#if HAVE_AFINET6
++ struct sockaddr_in6 localaddr;
++#else
++ struct sockaddr_in localaddr;
++#endif
++ const char *sty_str;
++ const char *sst_str;
++ const char *lport_str;
++ const char *uid_str;
++ const char *inode_str;
++ const char *pladdr_str;
++ char *laddrs_str;
++
++ if(lnr == 0) {
++ /* ENDPT SOCK STY SST HBKT LPORT uid inode pladdr LADDRS*/
++ return;
++ }
++
++ strtok(line," \t\n"); /*skip ptr*/
++ strtok(0," \t\n"); /*skip ptr*/
++ sty_str = strtok(0," \t\n");
++ sst_str = strtok(0," \t\n");
++ strtok(0," \t\n"); /*skip hash bucket*/
++ lport_str=strtok(0," \t\n");
++ uid_str = strtok(0," \t\n");
++ inode_str = strtok(0," \t\n");
++ pladdr_str = strtok(0," \t\n");
++ laddrs_str=strtok(0,"\t\n");
++
++ type = atoi(sty_str);
++ state = atoi(sst_str);
++ port = atoi(lport_str);
++ uid = atoi(uid_str);
++ inode = strtoul(inode_str,0,0);
++
++ if(flag_sctp<=1) {
++ /* only print the primary address */
++ char local_addr[64];
++ char local_port[16];
++
++ ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
++ if(ap)
++ safe_strncpy(local_addr,
++ ap->sprint((struct sockaddr *) &localaddr, flag_not),
++ sizeof(local_addr));
++ else
++ sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++ snprintf(local_port, sizeof(local_port), "%s",
++ get_sname(htons(port), "sctp",
++ flag_not & FLAG_NUM_PORT));
++
++ printf("sctp ");
++ sprintf(buffer,"%s:%s", local_addr, local_port);
++ printf("%-47s", buffer);
++ printf(" %-12s", sctp_socket_state_str(state));
++ } else {
++ /*print all addresses*/
++ const char *this_local_addr;
++ int first=1;
++ char local_port[16];
++ snprintf(local_port, sizeof(local_port), "%s",
++ get_sname(htons(port), "sctp",
++ flag_not & FLAG_NUM_PORT));
++ for(this_local_addr=strtok(laddrs_str," \t\n");
++ this_local_addr;
++ this_local_addr=strtok(0," \t\n"))
++ {
++ char local_addr[64];
++ ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++ if(ap)
++ safe_strncpy(local_addr,
++ ap->sprint((struct sockaddr *) &localaddr, flag_not),
++ sizeof(local_addr));
++ else
++ sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++ if(!first) printf("\n");
++ if(first)
++ printf("sctp ");
++ else
++ printf(" ");
++ sprintf(buffer,"%s:%s", local_addr, local_port);
++ printf("%-47s", buffer);
++ printf(" %-12s", first?sctp_socket_state_str(state):"");
++ first = 0;
++ }
++ }
++
++ finish_this_one(uid,inode,"");
++}
++
++static void sctp_assoc_do_one(int lnr, char *line)
++{
++ char buffer[1024];
++ int type, state, state2, lport,rport;
++ int uid;
++ unsigned rxqueue,txqueue;
++ unsigned long inode;
++
++ struct aftype *ap;
++#if HAVE_AFINET6
++ struct sockaddr_in6 localaddr,remoteaddr;
++#else
++ struct sockaddr_in localaddr,remoteaddr;
++#endif
++ const char *sty_str;
++ const char *sst_str;
++ const char *st_str;
++ const char *txqueue_str;
++ const char *rxqueue_str;
++ const char *lport_str,*rport_str;
++ const char *uid_str;
++ const char *inode_str;
++ const char *pladdr_str;
++ char *laddrs_str;
++ const char *praddr_str;
++ char *raddrs_str;
++
++ if(lnr == 0) {
++ /* ASSOC SOCK STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
++ return;
++ }
++
++ strtok(line," \t\n"); /*skip ptr*/
++ strtok(0," \t\n"); /*skip ptr*/
++ sty_str = strtok(0," \t\n");
++ sst_str = strtok(0," \t\n");
++ st_str = strtok(0," \t\n");
++ strtok(0," \t\n"); /*skip hash bucket*/
++ txqueue_str = strtok(0," \t\n");
++ rxqueue_str = strtok(0," \t\n");
++ uid_str = strtok(0," \t\n");
++ inode_str = strtok(0," \t\n");
++ lport_str=strtok(0," \t\n");
++ rport_str=strtok(0," \t\n");
++ pladdr_str = strtok(0," \t\n");
++ praddr_str = strtok(0," \t\n");
++ laddrs_str=strtok(0,"<->\t\n");
++ raddrs_str=strtok(0,"<->\t\n");
++
++ type = atoi(sty_str);
++ state = atoi(sst_str);
++ state2 = atoi(st_str);
++ txqueue = atoi(txqueue_str);
++ rxqueue = atoi(rxqueue_str);
++ uid = atoi(uid_str);
++ inode = strtoul(inode_str,0,0);
++ lport = atoi(lport_str);
++ rport = atoi(rport_str);
++
++ if(flag_sctp<=1) {
++ /* only print the primary addresses */
++ char local_addr[64];
++ char local_port[16];
++ char remote_addr[64];
++ char remote_port[16];
++
++ ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
++ if(ap)
++ safe_strncpy(local_addr,
++ ap->sprint((struct sockaddr *) &localaddr, flag_not),
++ sizeof(local_addr));
++ else
++ sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++ snprintf(local_port, sizeof(local_port), "%s",
++ get_sname(htons(lport), "sctp",
++ flag_not & FLAG_NUM_PORT));
++
++ ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
++ if(ap)
++ safe_strncpy(remote_addr,
++ ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
++ sizeof(remote_addr));
++ else
++ sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++
++ snprintf(remote_port, sizeof(remote_port), "%s",
++ get_sname(htons(rport), "sctp",
++ flag_not & FLAG_NUM_PORT));
++
++ printf("sctp");
++ printf(" %6u %6u ", rxqueue, txqueue);
++ sprintf(buffer,"%s:%s", local_addr, local_port);
++ printf("%-23s", buffer);
++ printf(" ");
++ sprintf(buffer,"%s:%s", remote_addr, remote_port);
++ printf("%-23s", buffer);
++ printf(" %-12s", sctp_socket_state_str(state));
++ } else {
++ /*print all addresses*/
++ const char *this_local_addr;
++ const char *this_remote_addr;
++ char *ss1,*ss2;
++ int first=1;
++ char local_port[16];
++ char remote_port[16];
++ snprintf(local_port, sizeof(local_port), "%s",
++ get_sname(htons(lport), "sctp",
++ flag_not & FLAG_NUM_PORT));
++ snprintf(remote_port, sizeof(remote_port), "%s",
++ get_sname(htons(rport), "sctp",
++ flag_not & FLAG_NUM_PORT));
++
++ this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
++ this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
++ while(this_local_addr || this_remote_addr) {
++ char local_addr[64];
++ char remote_addr[64];
++ if(this_local_addr) {
++ ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++ if(ap)
++ safe_strncpy(local_addr,
++ ap->sprint((struct sockaddr *) &localaddr, flag_not),
++ sizeof(local_addr));
++ else
++ sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++ }
++ if(this_remote_addr) {
++ ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
++ if(ap)
++ safe_strncpy(remote_addr,
++ ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
++ sizeof(remote_addr));
++ else
++ sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++ }
++
++ if(!first) printf("\n");
++ if(first)
++ printf("sctp %6u %6u ", rxqueue, txqueue);
++ else
++ printf(" ");
++ if(this_local_addr) {
++ if(first)
++ sprintf(buffer,"%s:%s", local_addr, local_port);
++ else
++ sprintf(buffer,"%s", local_addr);
++ printf("%-23s", buffer);
++ } else
++ printf("%-23s", "");
++ printf(" ");
++ if(this_remote_addr) {
++ if(first)
++ sprintf(buffer,"%s:%s", remote_addr, remote_port);
++ else
++ sprintf(buffer,"%s", remote_addr);
++ printf("%-23s", buffer);
++ } else
++ printf("%-23s", "");
++
++ printf(" %-12s", first?sctp_socket_state_str(state):"");
++
++ first = 0;
++ this_local_addr=strtok_r(0," \t\n",&ss1);
++ this_remote_addr=strtok_r(0," \t\n",&ss2);
++ }
++ }
++
++ finish_this_one(uid,inode,"");
++}
++
++static int sctp_info_eps(void)
++{
++#if !defined(_PATH_PROCNET_SCTP_EPS)
++#define _PATH_PROCNET_SCTP_EPS "/proc/net/sctp/eps"
++#endif
++ INFO_GUTS(_PATH_PROCNET_SCTP_EPS, "AF INET (sctp)",
++ sctp_eps_do_one);
++}
++
++static int sctp_info_assocs(void)
++{
++#if !defined(_PATH_PROCNET_SCTP_ASSOCS)
++#define _PATH_PROCNET_SCTP_ASSOCS "/proc/net/sctp/assocs"
++#endif
++ INFO_GUTS(_PATH_PROCNET_SCTP_ASSOCS, "AF INET (sctp)",
++ sctp_assoc_do_one);
++}
++
++static int sctp_info(void)
++{
++ if(flag_all)
++ sctp_info_eps();
++ return sctp_info_assocs();
++}
++
+ static void raw_do_one(int lnr, const char *line)
+ {
+ char buffer[8192], local_addr[64], rem_addr[64];
+@@ -1549,7 +1932,7 @@ static void usage(void)
+ fprintf(stderr, _(" -F, --fib display Forwarding Information Base (default)\n"));
+ fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n\n"));
+
+- fprintf(stderr, _(" <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
++ fprintf(stderr, _(" <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+ fprintf(stderr, _(" <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
+ fprintf(stderr, _(" List of possible address families (which support routing):\n"));
+ print_aflist(1); /* 1 = routeable */
+@@ -1574,6 +1957,7 @@ int main
+ {"protocol", 1, 0, 'A'},
+ {"tcp", 0, 0, 't'},
+ {"udp", 0, 0, 'u'},
++ {"sctp", 0, 0, 'S' },
+ {"raw", 0, 0, 'w'},
+ {"unix", 0, 0, 'x'},
+ {"listening", 0, 0, 'l'},
+@@ -1604,7 +1988,7 @@ int main
+ getroute_init(); /* Set up AF routing support */
+
+ afname[0] = '\0';
+- while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuWVv?wxl64", longopts, &lop)) != EOF)
++ while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuSWVv?wxl64", longopts, &lop)) != EOF)
+ switch (i) {
+ case -1:
+ break;
+@@ -1696,10 +2080,12 @@ int main
+ case 't':
+ flag_tcp++;
+ break;
+-
+ case 'u':
+ flag_udp++;
+ break;
++ case 'S':
++ flag_sctp++;
++ break;
+ case 'w':
+ flag_raw++;
+ break;
+@@ -1717,13 +2103,13 @@ int main
+ if (flag_int + flag_rou + flag_mas + flag_sta > 1)
+ usage();
+
+- if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_raw))
+- flag_tcp = flag_udp = flag_raw = 1;
++ if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
++ flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
+
+- if ((flag_tcp || flag_udp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
++ if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+ flag_inet = flag_inet6 = 1;
+
+- flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
++ flag_arg = flag_tcp + flag_udp + flag_sctp + flag_raw + flag_unx + flag_ipx
+ + flag_ax25 + flag_netrom + flag_igmp + flag_x25;
+
+ if (flag_mas) {
+@@ -1751,7 +2137,7 @@ int main
+ char buf[256];
+ if (!afname[0]) {
+ inittab();
+- parsesnmp(flag_raw, flag_tcp, flag_udp);
++ parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
+ } else {
+ safe_strncpy(buf, afname, sizeof(buf));
+ tmp1 = buf;
+@@ -1804,7 +2190,7 @@ int main
+ return (i);
+ }
+ for (;;) {
+- if (!flag_arg || flag_tcp || flag_udp || flag_raw) {
++ if (!flag_arg || flag_tcp || flag_udp || flag_sctp || flag_raw) {
+ #if HAVE_AFINET
+ prg_cache_load();
+ printf(_("Active Internet connections ")); /* xxx */
+@@ -1843,6 +2229,11 @@ int main
+ if (i)
+ return (i);
+ }
++ if (!flag_arg || flag_sctp) {
++ i = sctp_info();
++ if (i)
++ return (i);
++ }
+ if (!flag_arg || flag_raw) {
+ i = raw_info();
+ if (i)
+diff --git a/statistics.c b/statistics.c
+index 03600d7..eb8d7dc 100644
+--- a/statistics.c
++++ b/statistics.c
+@@ -21,7 +21,7 @@
+ #define UFWARN(x)
+ #endif
+
+-int print_static,f_raw,f_tcp,f_udp,f_unknown = 1;
++int print_static,f_raw,f_tcp,f_udp,f_sctp,f_unknown = 1;
+
+ enum State {
+ number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
+@@ -297,6 +297,27 @@ struct entry Tcpexttab[] =
+ { "TCPRenoRecoveryFail", N_("%u classic Reno fast retransmits failed"), opt_number },
+ };
+
++struct entry Sctptab[] =
++{
++ {"SctpCurrEstab", N_("%u Current Associations"), number},
++ {"SctpActiveEstabs", N_("%u Active Associations"), number},
++ {"SctpPassiveEstabs", N_("%u Passive Associations"), number},
++ {"SctpAborteds", N_("%u Number of Aborteds "), number},
++ {"SctpShutdowns", N_("%u Number of Graceful Terminations"), number},
++ {"SctpOutOfBlues", N_("%u Number of Out of Blue packets"), number},
++ {"SctpChecksumErrors", N_("%u Number of Packets with invalid Checksum"), number},
++ {"SctpOutCtrlChunks", N_("%u Number of control chunks sent"), number},
++ {"SctpOutOrderChunks", N_("%u Number of ordered chunks sent"), number},
++ {"SctpOutUnorderChunks", N_("%u Number of Unordered chunks sent"), number},
++ {"SctpInCtrlChunks", N_("%u Number of control chunks received"), number},
++ {"SctpInOrderChunks", N_("%u Number of ordered chunks received"), number},
++ {"SctpInUnorderChunks", N_("%u Number of Unordered chunks received"), number},
++ {"SctpFragUsrMsgs", N_("%u Number of messages fragmented"), number},
++ {"SctpReasmUsrMsgs", N_("%u Number of messages reassembled "), number},
++ {"SctpOutSCTPPacks", N_("%u Number of SCTP packets sent"), number},
++ {"SctpInSCTPPacks", N_("%u Number of SCTP packets received"), number},
++};
++
+ struct tabtab {
+ char *title;
+ struct entry *tab;
+@@ -310,6 +331,7 @@ struct tabtab snmptabs[] =
+ {"Icmp", Icmptab, sizeof(Icmptab), &f_raw},
+ {"Tcp", Tcptab, sizeof(Tcptab), &f_tcp},
+ {"Udp", Udptab, sizeof(Udptab), &f_udp},
++ {"Sctp", Sctptab, sizeof(Sctptab), &f_sctp},
+ {"TcpExt", Tcpexttab, sizeof(Tcpexttab), &f_tcp},
+ {NULL}
+ };
+@@ -499,12 +521,40 @@ void process6_fd(FILE *f)
+
+ }
+
+-void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
++/* Process a file with name-value lines (like /proc/net/sctp/snmp) */
++void process_fd2(FILE *f, const char *filename)
++{
++ char buf1[1024];
++ char *sp;
++ struct tabtab *tab;
++
++ tab = newtable(snmptabs, "Sctp");
++
++ while (fgets(buf1, sizeof buf1, f)) {
++ sp = buf1 + strcspn(buf1, " \t\n");
++ if (!sp)
++ goto formaterr;
++ *sp = '\0';
++ sp++;
++
++ sp += strspn(sp, " \t\n");
++
++ if (*sp != '\0' && *(tab->flag))
++ printval(tab, buf1, strtoul(sp, 0, 10));
++ }
++ return;
++
++formaterr:
++ fprintf(stderr,_("error parsing %s\n"), filename);
++ return;
++}
++
++void parsesnmp(int flag_raw, int flag_tcp, int flag_udp, int flag_sctp)
+ {
+ FILE *f;
+
+- f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
+-
++ f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp; f_sctp = flag_sctp;
++
+ f = proc_fopen("/proc/net/snmp");
+ if (!f) {
+ perror(_("cannot open /proc/net/snmp"));
+@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+
+ fclose(f);
+ }
++
++ f = fopen("/proc/net/sctp/snmp", "r");
++ if (f) {
++ process_fd2(f,"/proc/net/sctp/snmp");
++ if (ferror(f))
++ perror("/proc/net/sctp/snmp");
++
++ fclose(f);
++ }
++
+ return;
+ }
+
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch
new file mode 100644
index 000000000..d34e65132
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch
@@ -0,0 +1,28 @@
+From 14287b594e1f02b811f889fb515c1a51b72c08d4 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 14 Jan 2016 17:07:48 +0800
+Subject: [PATCH 2/3] net-tools: add SCTP support for netstat
+
+Upstream-Status: pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ netstat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/netstat.c b/netstat.c
+index 5d1a4a1..56a15c2 100644
+--- a/netstat.c
++++ b/netstat.c
+@@ -2104,7 +2104,7 @@ int main
+ usage();
+
+ if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
+- flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
++ flag_tcp = flag_udp = flag_raw = 1;
+
+ if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+ flag_inet = flag_inet6 = 1;
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch
new file mode 100644
index 000000000..8b2ecab70
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch
@@ -0,0 +1,363 @@
+From 1d386279a449a1a6b96b88a71f35bf13b14b2c2c Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 14 Jan 2016 17:11:24 +0800
+Subject: [PATCH 3/3] net-tools: add SCTP support for netstat
+
+Upstream-Status: pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ netstat.c | 282 ++++++++++++++++++++++++--------------------------------------
+ 1 file changed, 108 insertions(+), 174 deletions(-)
+
+diff --git a/netstat.c b/netstat.c
+index 56a15c2..86adadb 100644
+--- a/netstat.c
++++ b/netstat.c
+@@ -1095,23 +1095,21 @@ static void sctp_eps_do_one(int lnr, char *line)
+ const char *lport_str;
+ const char *uid_str;
+ const char *inode_str;
+- const char *pladdr_str;
+ char *laddrs_str;
+
+ if(lnr == 0) {
+- /* ENDPT SOCK STY SST HBKT LPORT uid inode pladdr LADDRS*/
++ /* ENDPT SOCK STY SST HBKT LPORT UID INODE LADDRS */
+ return;
+ }
+
+- strtok(line," \t\n"); /*skip ptr*/
+- strtok(0," \t\n"); /*skip ptr*/
++ strtok(line," \t\n"); /*skip endpt*/
++ strtok(0," \t\n"); /*skip sock*/
+ sty_str = strtok(0," \t\n");
+ sst_str = strtok(0," \t\n");
+ strtok(0," \t\n"); /*skip hash bucket*/
+ lport_str=strtok(0," \t\n");
+ uid_str = strtok(0," \t\n");
+ inode_str = strtok(0," \t\n");
+- pladdr_str = strtok(0," \t\n");
+ laddrs_str=strtok(0,"\t\n");
+
+ type = atoi(sty_str);
+@@ -1119,61 +1117,35 @@ static void sctp_eps_do_one(int lnr, char *line)
+ port = atoi(lport_str);
+ uid = atoi(uid_str);
+ inode = strtoul(inode_str,0,0);
+-
+- if(flag_sctp<=1) {
+- /* only print the primary address */
+- char local_addr[64];
+- char local_port[16];
+-
+- ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
+- if(ap)
+- safe_strncpy(local_addr,
+- ap->sprint((struct sockaddr *) &localaddr, flag_not),
+- sizeof(local_addr));
+- else
+- sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-
+- snprintf(local_port, sizeof(local_port), "%s",
+- get_sname(htons(port), "sctp",
+- flag_not & FLAG_NUM_PORT));
+-
+- printf("sctp ");
+- sprintf(buffer,"%s:%s", local_addr, local_port);
+- printf("%-47s", buffer);
+- printf(" %-12s", sctp_socket_state_str(state));
+- } else {
+- /*print all addresses*/
+- const char *this_local_addr;
+- int first=1;
+- char local_port[16];
+- snprintf(local_port, sizeof(local_port), "%s",
+- get_sname(htons(port), "sctp",
+- flag_not & FLAG_NUM_PORT));
+- for(this_local_addr=strtok(laddrs_str," \t\n");
+- this_local_addr;
+- this_local_addr=strtok(0," \t\n"))
+- {
+- char local_addr[64];
+- ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
+- if(ap)
+- safe_strncpy(local_addr,
+- ap->sprint((struct sockaddr *) &localaddr, flag_not),
+- sizeof(local_addr));
+- else
+- sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+
+- if(!first) printf("\n");
+- if(first)
+- printf("sctp ");
+- else
+- printf(" ");
+- sprintf(buffer,"%s:%s", local_addr, local_port);
+- printf("%-47s", buffer);
+- printf(" %-12s", first?sctp_socket_state_str(state):"");
+- first = 0;
+- }
++ const char *this_local_addr;
++ int first=1;
++ char local_port[16];
++ snprintf(local_port, sizeof(local_port), "%s",
++ get_sname(htons(port), "sctp", flag_not & FLAG_NUM_PORT));
++ for(this_local_addr=strtok(laddrs_str," \t\n");
++ this_local_addr;
++ this_local_addr=strtok(0," \t\n"))
++ {
++ char local_addr[64];
++ ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++ if(ap)
++ safe_strncpy(local_addr,
++ ap->sprint((struct sockaddr *) &localaddr, flag_not),
++ sizeof(local_addr));
++ else
++ sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++ if(!first) printf("\n");
++ if(first)
++ printf("sctp ");
++ else
++ printf(" ");
++ sprintf(buffer,"%s:%s", local_addr, local_port);
++ printf("%-55s", buffer);
++ printf(" %-12s", first?sctp_socket_state_str(state):"");
++ first = 0;
+ }
+-
+ finish_this_one(uid,inode,"");
+ }
+
+@@ -1199,32 +1171,29 @@ static void sctp_assoc_do_one(int lnr, char *line)
+ const char *lport_str,*rport_str;
+ const char *uid_str;
+ const char *inode_str;
+- const char *pladdr_str;
+ char *laddrs_str;
+- const char *praddr_str;
+ char *raddrs_str;
+-
++
+ if(lnr == 0) {
+- /* ASSOC SOCK STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
++ /* ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT RPORT LADDRS <-> RADDRS */
+ return;
+ }
+-
+- strtok(line," \t\n"); /*skip ptr*/
+- strtok(0," \t\n"); /*skip ptr*/
++
++ strtok(line," \t\n"); /*skip assoc*/
++ strtok(0," \t\n"); /*skip sock*/
+ sty_str = strtok(0," \t\n");
+ sst_str = strtok(0," \t\n");
+ st_str = strtok(0," \t\n");
+ strtok(0," \t\n"); /*skip hash bucket*/
++ strtok(0," \t\n"); /*skip hash assoc-id*/
+ txqueue_str = strtok(0," \t\n");
+ rxqueue_str = strtok(0," \t\n");
+ uid_str = strtok(0," \t\n");
+ inode_str = strtok(0," \t\n");
+ lport_str=strtok(0," \t\n");
+ rport_str=strtok(0," \t\n");
+- pladdr_str = strtok(0," \t\n");
+- praddr_str = strtok(0," \t\n");
+- laddrs_str=strtok(0,"<->\t\n");
+- raddrs_str=strtok(0,"<->\t\n");
++ laddrs_str = strtok(0,"<->\t\n");
++ raddrs_str = strtok(0,"<->\t\n");
+
+ type = atoi(sty_str);
+ state = atoi(sst_str);
+@@ -1235,116 +1204,81 @@ static void sctp_assoc_do_one(int lnr, char *line)
+ inode = strtoul(inode_str,0,0);
+ lport = atoi(lport_str);
+ rport = atoi(rport_str);
+-
+- if(flag_sctp<=1) {
+- /* only print the primary addresses */
+- char local_addr[64];
+- char local_port[16];
+- char remote_addr[64];
+- char remote_port[16];
+-
+- ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
+- if(ap)
+- safe_strncpy(local_addr,
+- ap->sprint((struct sockaddr *) &localaddr, flag_not),
+- sizeof(local_addr));
+- else
+- sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-
+- snprintf(local_port, sizeof(local_port), "%s",
+- get_sname(htons(lport), "sctp",
+- flag_not & FLAG_NUM_PORT));
+-
+- ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
+- if(ap)
+- safe_strncpy(remote_addr,
+- ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
+- sizeof(remote_addr));
+- else
+- sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
+-
+- snprintf(remote_port, sizeof(remote_port), "%s",
+- get_sname(htons(rport), "sctp",
+- flag_not & FLAG_NUM_PORT));
+-
+- printf("sctp");
+- printf(" %6u %6u ", rxqueue, txqueue);
+- sprintf(buffer,"%s:%s", local_addr, local_port);
+- printf("%-23s", buffer);
+- printf(" ");
+- sprintf(buffer,"%s:%s", remote_addr, remote_port);
+- printf("%-23s", buffer);
+- printf(" %-12s", sctp_socket_state_str(state));
+- } else {
+- /*print all addresses*/
+- const char *this_local_addr;
+- const char *this_remote_addr;
+- char *ss1,*ss2;
+- int first=1;
+- char local_port[16];
+- char remote_port[16];
+- snprintf(local_port, sizeof(local_port), "%s",
+- get_sname(htons(lport), "sctp",
+- flag_not & FLAG_NUM_PORT));
+- snprintf(remote_port, sizeof(remote_port), "%s",
+- get_sname(htons(rport), "sctp",
+- flag_not & FLAG_NUM_PORT));
+-
+- this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
+- this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
+- while(this_local_addr || this_remote_addr) {
+- char local_addr[64];
+- char remote_addr[64];
+- if(this_local_addr) {
+- ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
+- if(ap)
+- safe_strncpy(local_addr,
+- ap->sprint((struct sockaddr *) &localaddr, flag_not),
+- sizeof(local_addr));
+- else
+- sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+- }
+- if(this_remote_addr) {
+- ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
+- if(ap)
+- safe_strncpy(remote_addr,
+- ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
+- sizeof(remote_addr));
+- else
+- sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
+- }
+
+- if(!first) printf("\n");
+- if(first)
+- printf("sctp %6u %6u ", rxqueue, txqueue);
+- else
+- printf(" ");
+- if(this_local_addr) {
+- if(first)
+- sprintf(buffer,"%s:%s", local_addr, local_port);
++ /*print all addresses*/
++ const char *this_local_addr;
++ const char *this_remote_addr;
++ char *ss1,*ss2;
++ int first=1;
++ char local_port[16];
++ char remote_port[16];
++ snprintf(local_port, sizeof(local_port), "%s",
++ get_sname(htons(lport), "sctp",
++ flag_not & FLAG_NUM_PORT));
++ snprintf(remote_port, sizeof(remote_port), "%s",
++ get_sname(htons(rport), "sctp",
++ flag_not & FLAG_NUM_PORT));
++
++ this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
++ this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
++ while(this_local_addr || this_remote_addr) {
++ char local_addr[64];
++ char remote_addr[64];
++
++ if(this_local_addr) {
++ if (this_local_addr[0] == '*') {
++ /* skip * */
++ this_local_addr++;
++ }
++ ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++ if(ap)
++ safe_strncpy(local_addr,
++ ap->sprint((struct sockaddr *) &localaddr, flag_not), sizeof(local_addr));
+ else
+- sprintf(buffer,"%s", local_addr);
+- printf("%-23s", buffer);
+- } else
+- printf("%-23s", "");
+- printf(" ");
+- if(this_remote_addr) {
+- if(first)
+- sprintf(buffer,"%s:%s", remote_addr, remote_port);
++ sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++ }
++ if(this_remote_addr) {
++ if (this_remote_addr[0] == '*') {
++ /* skip * */
++ this_remote_addr++;
++ }
++ ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
++ if(ap)
++ safe_strncpy(remote_addr,
++ ap->sprint((struct sockaddr *) &remoteaddr, flag_not), sizeof(remote_addr));
+ else
+- sprintf(buffer,"%s", remote_addr);
+- printf("%-23s", buffer);
+- } else
+- printf("%-23s", "");
+-
+- printf(" %-12s", first?sctp_socket_state_str(state):"");
++ sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++ }
+
+- first = 0;
+- this_local_addr=strtok_r(0," \t\n",&ss1);
+- this_remote_addr=strtok_r(0," \t\n",&ss2);
+- }
++ if(!first) printf("\n");
++ if(first)
++ printf("sctp %6u %6u ", rxqueue, txqueue);
++ else
++ printf(" ");
++ if(this_local_addr) {
++ if(first)
++ sprintf(buffer,"%s:%s", local_addr, local_port);
++ else
++ sprintf(buffer,"%s", local_addr);
++ printf("%-27s", buffer);
++ } else
++ printf("%-27s", "");
++ printf(" ");
++ if(this_remote_addr) {
++ if(first)
++ sprintf(buffer,"%s:%s", remote_addr, remote_port);
++ else
++ sprintf(buffer,"%s", remote_addr);
++ printf("%-27s", buffer);
++ } else
++ printf("%-27s", "");
++
++ printf(" %-12s", first?sctp_socket_state_str(state):"");
++
++ first = 0;
++ this_local_addr=strtok_r(0," \t\n",&ss1);
++ this_remote_addr=strtok_r(0," \t\n",&ss2);
+ }
+-
+ finish_this_one(uid,inode,"");
+ }
+
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
index aefc1e6e7..63b2051ba 100644
--- a/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -11,7 +11,15 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/
file://net-tools-config.h \
file://net-tools-config.make \
file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
- "
+ file://musl-fixes.patch \
+ file://net-tools-1.60-sctp1.patch \
+ file://net-tools-1.60-sctp2-quiet.patch \
+ file://net-tools-1.60-sctp3-addrs.patch \
+ "
+
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
S = "${WORKDIR}/net-tools-1.60"
@@ -21,8 +29,16 @@ SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c
SRC_URI[patch.md5sum] = "ea3592f49ac8380962bc4d9b66c7e7e9"
SRC_URI[patch.sha256sum] = "aeeeafaff68866a446f01bb639d4e0146a60af34dcd20e31a3e46585022fc76c"
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/net-tools/"
+
inherit gettext
+do_patch[depends] = "quilt-native:do_populate_sysroot"
+
+LDFLAGS_append_libc-uclibc = " -lintl "
+
# The Makefile is lame, no parallel build
PARALLEL_MAKE = ""
@@ -70,6 +86,10 @@ do_compile() {
}
do_install() {
+ export COPTS="$CFLAGS"
+ export LOPTS="$LDFLAGS"
+ unset CFLAGS
+ unset LDFLAGS
oe_runmake 'BASEDIR=${D}' install
}
diff --git a/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch b/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
new file mode 100644
index 000000000..bc55582fd
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
@@ -0,0 +1,26 @@
+From fad40cfc18a42946a9a9e440c3434cd6b847ff9d Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 18 Jan 2016 17:05:19 +0000
+Subject: [PATCH] Makefile.in: Add tinfo library to the linking libraries
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a85d00f..98b85f9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1,4 +1,4 @@
+-LIBS = -lslang @LIBS@
++LIBS = -lslang -ltinfo @LIBS@
+ LIBTCL = @TCL_LIB_FLAG@
+
+ CC = @CC@
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch b/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch
new file mode 100644
index 000000000..8883e26ad
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch
@@ -0,0 +1,36 @@
+specify -fPIC after CFLAGS so it can override the CFLAGS containing -pie and -fpie
+this makes sure the objects that go into shared objects are compiled with -fPIC
+and not with -fpie. We can not use -fpie on objects which will go into .so files
+Fixes errors like
+
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: shared/newt.o: relocation R_X86_64_PC32 against undefined symbol `SLtt_Screen_Rows@@SLANG2' can not be used when making a shared object; recompile with -fPIC
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
+| collect2: error: ld returned 1 exit status
+| make: *** [libnewt.so.0.52.18] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: newt-0.52.18/Makefile.in
+===================================================================
+--- newt-0.52.18.orig/Makefile.in
++++ newt-0.52.18/Makefile.in
+@@ -96,8 +96,8 @@ _snack.$(SOEXT): snack.c $(LIBNEWTSH)
+ PIFLAGS=`$$pyconfig --includes`; \
+ PLDFLAGS=`$$pyconfig --ldflags`; \
+ PLFLAGS=`$$pyconfig --libs`; \
+- echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+- $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
++ echo $(CC) $(CPPFLAGS) $(SHCFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
++ $(CC) $(CPPFLAGS) $(SHCFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+ echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+ $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \
+ done || :
+@@ -135,7 +135,7 @@ $(LIBNEWTSH): $(SHAREDOBJS)
+ ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+
+ $(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
+- $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(SHCFLAGS) -o $@ $<
+
+ install: $(LIBNEWT) install-sh whiptail
+ [ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
diff --git a/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb b/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
index 94a41a38e..ba047574f 100644
--- a/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
+++ b/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
@@ -24,6 +24,5 @@ do_install () {
PACKAGES_remove = "whiptail"
FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb b/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
index 302e418a9..9a2964be1 100644
--- a/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
+++ b/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
@@ -21,6 +21,8 @@ SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
file://remove_slang_include.patch \
file://fix_SHAREDDIR.patch \
file://cross_ar.patch \
+ file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
+ file://pie-flags.patch \
"
SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
@@ -36,6 +38,7 @@ CLEANBROKEN = "1"
export STAGING_INCDIR
export STAGING_LIBDIR
+export CPPFLAGS
export BUILD_SYS
export HOST_SYS
diff --git a/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index ce823858c..a29c3d762 100644
--- a/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -69,7 +69,6 @@ RDEPENDS_packagegroup-core-sys-extended = "\
minicom \
neon \
parted \
- ${PTH} \
quota \
screen \
setserial \
@@ -225,6 +224,16 @@ QT4PKGS = " \
QT4PKGS_mips64 = ""
QT4PKGS_mips64n32 = ""
+def get_libqt4(d):
+ if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
+ if 'qt4' in d.getVar('BBFILE_COLLECTIONS', False) or "":
+ return d.getVar('QT4PKGS', False)
+
+ bb.warn('The meta-qt4 layer should be added, this layer provides Qt 4.x' \
+ 'libraries. Its intended use is for passing LSB tests as Qt4 is' \
+ 'a requirement for LSB.')
+ return ''
+
SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
specified in the LSB Desktop specification"
@@ -245,7 +254,7 @@ RDEPENDS_packagegroup-core-lsb-desktop = "\
gtk+ \
atk \
libasound \
- ${QT4PKGS} \
+ ${@get_libqt4(d)} \
${@get_libqt3(d)} \
"
@@ -272,7 +281,3 @@ RDEPENDS_packagegroup-core-lsb-runtime-add = "\
libi18n-collate-perl \
libpod-plainer-perl \
"
-
-PTH = "pth"
-PTH_libc-uclibc = ""
-
diff --git a/yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch b/yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch
new file mode 100644
index 000000000..c55b64813
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch
@@ -0,0 +1,68 @@
+From 45d1ed58927593968faead7dbb295f3922f41a2f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Aug 2015 14:16:43 -0700
+Subject: [PATCH] Add support for defining missing funcitonality
+
+In order to support alternative libc on linux ( musl, bioninc ) etc we
+need to check for glibc-only features and provide alternatives, in this
+list strndupa is first one, when configure detects that its not included
+in system C library then the altrnative implementation from missing.h is
+used
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 3 +++
+ libpam/include/missing.h | 12 ++++++++++++
+ modules/pam_exec/pam_exec.c | 1 +
+ 3 files changed, 16 insertions(+)
+ create mode 100644 libpam/include/missing.h
+
+diff --git a/configure.ac b/configure.ac
+index 9e1257f..cbed979 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -599,6 +599,9 @@ dnl
+ AC_CHECK_DECL(__NR_keyctl, [have_key_syscalls=1],[have_key_syscalls=0],[#include <sys/syscall.h>])
+ AC_CHECK_DECL(ENOKEY, [have_key_errors=1],[have_key_errors=0],[#include <errno.h>])
+
++# musl and bionic don't have strndupa
++AC_CHECK_DECLS_ONCE([strndupa])
++
+ HAVE_KEY_MANAGEMENT=0
+ if test $have_key_syscalls$have_key_errors = 11
+ then
+diff --git a/libpam/include/missing.h b/libpam/include/missing.h
+new file mode 100644
+index 0000000..3cf011c
+--- /dev/null
++++ b/libpam/include/missing.h
+@@ -0,0 +1,12 @@
++#pragma once
++
++#if !HAVE_DECL_STRNDUPA
++#define strndupa(s, n) \
++ ({ \
++ const char *__old = (s); \
++ size_t __len = strnlen(__old, (n)); \
++ char *__new = alloca(__len + 1); \
++ __new[__len] = '\0'; \
++ memcpy(__new, __old, __len); \
++ })
++#endif
+diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c
+index 17ba6ca..3aa2694 100644
+--- a/modules/pam_exec/pam_exec.c
++++ b/modules/pam_exec/pam_exec.c
+@@ -59,6 +59,7 @@
+ #include <security/pam_modutil.h>
+ #include <security/pam_ext.h>
+ #include <security/_pam_macros.h>
++#include <missing.h>
+
+ #define ENV_ITEM(n) { (n), #n }
+ static struct {
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch b/yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch
new file mode 100644
index 000000000..e4eb95669
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch
@@ -0,0 +1,59 @@
+This patch adds missing include for paths.h which should provide
+_PATH_LASTLOG definition
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c
+===================================================================
+--- Linux-PAM-1.1.6.orig/modules/pam_lastlog/pam_lastlog.c
++++ Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c
+@@ -23,9 +23,11 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <sys/file.h>
+ #include <sys/types.h>
+ #include <syslog.h>
+ #include <unistd.h>
++#include <paths.h>
+
+ #if defined(hpux) || defined(sunos) || defined(solaris)
+ # ifndef _PATH_LASTLOG
+@@ -332,6 +334,23 @@ last_login_read(pam_handle_t *pamh, int
+ return retval;
+ }
+
++#ifndef __GLIBC__
++static void logwtmp(const char * line, const char * name, const char * host)
++{
++ struct utmp u;
++ memset(&u, 0, sizeof(u));
++
++ u.ut_pid = getpid();
++ u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
++ strncpy(u.ut_line, line, sizeof(u.ut_line));
++ strncpy(u.ut_name, name, sizeof(u.ut_name));
++ strncpy(u.ut_host, host, sizeof(u.ut_host));
++ gettimeofday(&(u.ut_tv), NULL);
++
++ updwtmp(_PATH_WTMP, &u);
++}
++#endif /* __GLIBC__ */
++
+ static int
+ last_login_write(pam_handle_t *pamh, int announce, int last_fd,
+ uid_t uid, const char *user)
+Index: Linux-PAM-1.1.6/modules/Makefile.am
+===================================================================
+--- Linux-PAM-1.1.6.orig/modules/Makefile.am
++++ Linux-PAM-1.1.6/modules/Makefile.am
+@@ -7,7 +7,7 @@ SUBDIRS = pam_access pam_cracklib pam_de
+ pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
+ pam_listfile pam_localuser pam_loginuid pam_mail \
+ pam_mkhomedir pam_motd pam_namespace pam_nologin \
+- pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \
++ pam_permit pam_pwhistory pam_rootok pam_securetty \
+ pam_selinux pam_sepermit pam_shells pam_stress \
+ pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
+ pam_tty_audit pam_umask \
diff --git a/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb b/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
index 035335656..341ea2411 100644
--- a/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
+++ b/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
@@ -31,7 +31,10 @@ SRC_URI[sha256sum] = "342b1211c0d3b203a7df2540a5b03a428a087bd8a48c17e49ae268f992
SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch \
file://use-utmpx.patch"
-SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch"
+SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch \
+ file://0001-Add-support-for-defining-missing-funcitonality.patch \
+ file://include_paths_header.patch \
+ "
DEPENDS = "bison flex flex-native cracklib"
@@ -54,10 +57,6 @@ PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
PACKAGES += "${PN}-runtime ${PN}-xtests"
FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug \
- ${base_libdir}/security/pam_filter/.debug \
- ${datadir}/Linux-PAM/xtests/.debug"
-
FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
FILES_${PN}-runtime = "${sysconfdir}"
FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
@@ -169,3 +168,4 @@ CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
+CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"
diff --git a/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb b/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb
index ff8ae097c..30c00c861 100644
--- a/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb
+++ b/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
SECTION = "console/tools"
-DEPENDS = "ncurses readline util-linux"
+DEPENDS = "ncurses readline util-linux virtual/libiconv"
PR = "r1"
SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
@@ -21,6 +21,7 @@ SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb"
SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
EXTRA_OECONF = "--disable-device-mapper"
+LDFLAGS_append_libc-uclibc = " -liconv "
inherit autotools pkgconfig gettext texinfo ptest
diff --git a/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
new file mode 100644
index 000000000..61bf2de5e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
@@ -0,0 +1,1287 @@
+From 47c4db8d37248d968fac7ee4a71ca64398890723 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jan 2016 11:57:21 -0800
+Subject: [PATCH] Fix build with musl
+
+Remove BSDisms
+Remove fts, and link to libfts thats provided externally
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate[musl specific]
+
+ lib/Makefile.am | 4 +-
+ lib/fts.c | 1025 -------------------------------------------------------
+ lib/fts.h | 131 -------
+ lib/vis.h | 13 +-
+ src/Makefile.am | 2 +-
+ src/extern.h | 2 -
+ src/file_subs.c | 2 +-
+ src/tables.c | 2 +-
+ 8 files changed, 14 insertions(+), 1167 deletions(-)
+ delete mode 100644 lib/fts.c
+ delete mode 100644 lib/fts.h
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 56d0859..7f5045a 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -8,8 +8,8 @@ AUTOMAKE_OPTIONS = 1.7 gnits
+ CLEANFILES = *~
+
+ noinst_LIBRARIES = libbsdfunc.a
+-noinst_HEADERS = vis.h bsdfunc.h fts.h
++noinst_HEADERS = vis.h bsdfunc.h
+
+ AM_CFLAGS = @EXTRA_CFLAGS@
+
+-libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c fts.c
++libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c
+diff --git a/lib/fts.c b/lib/fts.c
+deleted file mode 100644
+index 45e90ca..0000000
+--- a/lib/fts.c
++++ /dev/null
+@@ -1,1025 +0,0 @@
+-/*-
+- * Copyright (c) 1990, 1993, 1994
+- * The Regents of the University of California. All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- * notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- * notice, this list of conditions and the following disclaimer in the
+- * documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- * may be used to endorse or promote products derived from this software
+- * without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <dirent.h>
+-#include <errno.h>
+-#include <fts.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <unistd.h>
+-
+-/* Largest alignment size needed, minus one.
+- Usually long double is the worst case. */
+-#ifndef ALIGNBYTES
+-#define ALIGNBYTES (__alignof__ (long double) - 1)
+-#endif
+-/* Align P to that size. */
+-#ifndef ALIGN
+-#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES)
+-#endif
+-
+-
+-static FTSENT *fts_alloc (FTS *, const char *, int);
+-static FTSENT *fts_build (FTS *, int);
+-static void fts_lfree (FTSENT *);
+-static void fts_load (FTS *, FTSENT *);
+-static size_t fts_maxarglen (char * const *);
+-static void fts_padjust (FTS *, FTSENT *);
+-static int fts_palloc (FTS *, size_t);
+-static FTSENT *fts_sort (FTS *, FTSENT *, int);
+-static u_short fts_stat (FTS *, FTSENT *, int);
+-static int fts_safe_changedir (FTS *, FTSENT *, int, const char *);
+-
+-#ifndef MAX
+-#define MAX(a, b) (a > b ? a : b)
+-#endif
+-
+-#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
+-
+-#define CLR(opt) (sp->fts_options &= ~(opt))
+-#define ISSET(opt) (sp->fts_options & (opt))
+-#define SET(opt) (sp->fts_options |= (opt))
+-
+-#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
+-
+-#define BREAD 3 /* fts_read */
+-
+-FTS *
+-fts_open(argv, koptions, compar)
+- char * const *argv;
+- register int koptions;
+- int (*compar) (const FTSENT **, const FTSENT **);
+-{
+- register FTS *sp;
+- register FTSENT *p, *root;
+- register int nitems;
+- FTSENT *parent, *tmp;
+- int len;
+-
+-tmp = NULL; /* stop compiler whinging */
+- /* Options check. */
+- if (koptions & ~FTS_OPTIONMASK) {
+- errno = EINVAL;
+- return (NULL);
+- }
+-
+- /* Allocate/initialize the stream */
+- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
+- return (NULL);
+- memset(sp, 0, sizeof(FTS));
+- sp->fts_compar = (int (*) (const void *, const void *)) compar;
+- sp->fts_options = koptions;
+-
+- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
+- if (ISSET(FTS_LOGICAL))
+- SET(FTS_NOCHDIR);
+-
+- /*
+- * Start out with 1K of path space, and enough, in any case,
+- * to hold the user's paths.
+- */
+-#ifndef MAXPATHLEN
+-#define MAXPATHLEN 1024
+-#endif
+- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
+- goto mem1;
+-
+- /* Allocate/initialize root's parent. */
+- if ((parent = fts_alloc(sp, "", 0)) == NULL)
+- goto mem2;
+- parent->fts_level = FTS_ROOTPARENTLEVEL;
+-
+- /* Allocate/initialize root(s). */
+- for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
+- /* Don't allow zero-length paths. */
+- if ((len = strlen(*argv)) == 0) {
+- errno = ENOENT;
+- goto mem3;
+- }
+-
+- p = fts_alloc(sp, *argv, len);
+- p->fts_level = FTS_ROOTLEVEL;
+- p->fts_parent = parent;
+- p->fts_accpath = p->fts_name;
+- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
+-
+- /* Command-line "." and ".." are real directories. */
+- if (p->fts_info == FTS_DOT)
+- p->fts_info = FTS_D;
+-
+- /*
+- * If comparison routine supplied, traverse in sorted
+- * order; otherwise traverse in the order specified.
+- */
+- if (compar) {
+- p->fts_link = root;
+- root = p;
+- } else {
+- p->fts_link = NULL;
+- if (root == NULL)
+- tmp = root = p;
+- else {
+- tmp->fts_link = p;
+- tmp = p;
+- }
+- }
+- }
+- if (compar && nitems > 1)
+- root = fts_sort(sp, root, nitems);
+-
+- /*
+- * Allocate a dummy pointer and make fts_read think that we've just
+- * finished the node before the root(s); set p->fts_info to FTS_INIT
+- * so that everything about the "current" node is ignored.
+- */
+- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
+- goto mem3;
+- sp->fts_cur->fts_link = root;
+- sp->fts_cur->fts_info = FTS_INIT;
+-
+- /*
+- * If using chdir(2), grab a file descriptor pointing to dot to ensure
+- * that we can get back here; this could be avoided for some paths,
+- * but almost certainly not worth the effort. Slashes, symbolic links,
+- * and ".." are all fairly nasty problems. Note, if we can't get the
+- * descriptor we run anyway, just more slowly.
+- */
+- if (!ISSET(FTS_NOCHDIR)
+- && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
+- SET(FTS_NOCHDIR);
+-
+- return (sp);
+-
+-mem3: fts_lfree(root);
+- free(parent);
+-mem2: free(sp->fts_path);
+-mem1: free(sp);
+- return (NULL);
+-}
+-
+-static void
+-fts_load(sp, p)
+- FTS *sp;
+- register FTSENT *p;
+-{
+- register int len;
+- register char *cp;
+-
+- /*
+- * Load the stream structure for the next traversal. Since we don't
+- * actually enter the directory until after the preorder visit, set
+- * the fts_accpath field specially so the chdir gets done to the right
+- * place and the user can access the first node. From fts_open it's
+- * known that the path will fit.
+- */
+- len = p->fts_pathlen = p->fts_namelen;
+- memmove(sp->fts_path, p->fts_name, len + 1);
+- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
+- len = strlen(++cp);
+- memmove(p->fts_name, cp, len + 1);
+- p->fts_namelen = len;
+- }
+- p->fts_accpath = p->fts_path = sp->fts_path;
+- sp->fts_dev = p->fts_dev;
+-}
+-
+-int
+-fts_close(sp)
+- FTS *sp;
+-{
+- register FTSENT *freep, *p;
+- int saved_errno;
+-
+- /*
+- * This still works if we haven't read anything -- the dummy structure
+- * points to the root list, so we step through to the end of the root
+- * list which has a valid parent pointer.
+- */
+- if (sp->fts_cur) {
+- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
+- freep = p;
+- p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
+- free(freep);
+- }
+- free(p);
+- }
+-
+- /* Free up child linked list, sort array, path buffer. */
+- if (sp->fts_child)
+- fts_lfree(sp->fts_child);
+- if (sp->fts_array)
+- free(sp->fts_array);
+- free(sp->fts_path);
+-
+- /* Return to original directory, save errno if necessary. */
+- if (!ISSET(FTS_NOCHDIR)) {
+- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
+- (void)close(sp->fts_rfd);
+-
+- /* Set errno and return. */
+- if (saved_errno != 0) {
+- /* Free up the stream pointer. */
+- free(sp);
+- errno = saved_errno;
+- return (-1);
+- }
+- }
+-
+- /* Free up the stream pointer. */
+- free(sp);
+- return (0);
+-}
+-
+-/*
+- * Special case of "/" at the end of the path so that slashes aren't
+- * appended which would cause paths to be written as "....//foo".
+- */
+-#define NAPPEND(p) \
+- (p->fts_path[p->fts_pathlen - 1] == '/' \
+- ? p->fts_pathlen - 1 : p->fts_pathlen)
+-
+-FTSENT *
+-fts_read(sp)
+- register FTS *sp;
+-{
+- register FTSENT *p, *tmp;
+- register int instr;
+- register char *t;
+- int saved_errno;
+-
+- /* If finished or unrecoverable error, return NULL. */
+- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
+- return (NULL);
+-
+- /* Set current node pointer. */
+- p = sp->fts_cur;
+-
+- /* Save and zero out user instructions. */
+- instr = p->fts_instr;
+- p->fts_instr = FTS_NOINSTR;
+-
+- /* Any type of file may be re-visited; re-stat and re-turn. */
+- if (instr == FTS_AGAIN) {
+- p->fts_info = fts_stat(sp, p, 0);
+- return (p);
+- }
+-
+- /*
+- * Following a symlink -- SLNONE test allows application to see
+- * SLNONE and recover. If indirecting through a symlink, have
+- * keep a pointer to current location. If unable to get that
+- * pointer, follow fails.
+- */
+- if (instr == FTS_FOLLOW &&
+- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
+- p->fts_info = fts_stat(sp, p, 1);
+- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
+- p->fts_errno = errno;
+- p->fts_info = FTS_ERR;
+- } else
+- p->fts_flags |= FTS_SYMFOLLOW;
+- }
+- return (p);
+- }
+-
+- /* Directory in pre-order. */
+- if (p->fts_info == FTS_D) {
+- /* If skipped or crossed mount point, do post-order visit. */
+- if (instr == FTS_SKIP ||
+- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
+- if (p->fts_flags & FTS_SYMFOLLOW)
+- (void)close(p->fts_symfd);
+- if (sp->fts_child) {
+- fts_lfree(sp->fts_child);
+- sp->fts_child = NULL;
+- }
+- p->fts_info = FTS_DP;
+- return (p);
+- }
+-
+- /* Rebuild if only read the names and now traversing. */
+- if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
+- CLR(FTS_NAMEONLY);
+- fts_lfree(sp->fts_child);
+- sp->fts_child = NULL;
+- }
+-
+- /*
+- * Cd to the subdirectory.
+- *
+- * If have already read and now fail to chdir, whack the list
+- * to make the names come out right, and set the parent errno
+- * so the application will eventually get an error condition.
+- * Set the FTS_DONTCHDIR flag so that when we logically change
+- * directories back to the parent we don't do a chdir.
+- *
+- * If haven't read do so. If the read fails, fts_build sets
+- * FTS_STOP or the fts_info field of the node.
+- */
+- if (sp->fts_child != NULL) {
+- if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
+- p->fts_errno = errno;
+- p->fts_flags |= FTS_DONTCHDIR;
+- for (p = sp->fts_child; p != NULL;
+- p = p->fts_link)
+- p->fts_accpath =
+- p->fts_parent->fts_accpath;
+- }
+- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
+- if (ISSET(FTS_STOP))
+- return (NULL);
+- return (p);
+- }
+- p = sp->fts_child;
+- sp->fts_child = NULL;
+- goto name;
+- }
+-
+- /* Move to the next node on this level. */
+-next: tmp = p;
+- if ((p = p->fts_link) != NULL) {
+- free(tmp);
+-
+- /*
+- * If reached the top, return to the original directory (or
+- * the root of the tree), and load the paths for the next root.
+- */
+- if (p->fts_level == FTS_ROOTLEVEL) {
+- if (FCHDIR(sp, sp->fts_rfd)) {
+- SET(FTS_STOP);
+- return (NULL);
+- }
+- fts_load(sp, p);
+- return (sp->fts_cur = p);
+- }
+-
+- /*
+- * User may have called fts_set on the node. If skipped,
+- * ignore. If followed, get a file descriptor so we can
+- * get back if necessary.
+- */
+- if (p->fts_instr == FTS_SKIP)
+- goto next;
+- if (p->fts_instr == FTS_FOLLOW) {
+- p->fts_info = fts_stat(sp, p, 1);
+- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+- if ((p->fts_symfd =
+- open(".", O_RDONLY, 0)) < 0) {
+- p->fts_errno = errno;
+- p->fts_info = FTS_ERR;
+- } else
+- p->fts_flags |= FTS_SYMFOLLOW;
+- }
+- p->fts_instr = FTS_NOINSTR;
+- }
+-
+-name: t = sp->fts_path + NAPPEND(p->fts_parent);
+- *t++ = '/';
+- memmove(t, p->fts_name, p->fts_namelen + 1);
+- return (sp->fts_cur = p);
+- }
+-
+- /* Move up to the parent node. */
+- p = tmp->fts_parent;
+- free(tmp);
+-
+- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
+- /*
+- * Done; free everything up and set errno to 0 so the user
+- * can distinguish between error and EOF.
+- */
+- free(p);
+- errno = 0;
+- return (sp->fts_cur = NULL);
+- }
+-
+- /* NUL terminate the pathname. */
+- sp->fts_path[p->fts_pathlen] = '\0';
+-
+- /*
+- * Return to the parent directory. If at a root node or came through
+- * a symlink, go back through the file descriptor. Otherwise, cd up
+- * one directory.
+- */
+- if (p->fts_level == FTS_ROOTLEVEL) {
+- if (FCHDIR(sp, sp->fts_rfd)) {
+- SET(FTS_STOP);
+- return (NULL);
+- }
+- } else if (p->fts_flags & FTS_SYMFOLLOW) {
+- if (FCHDIR(sp, p->fts_symfd)) {
+- saved_errno = errno;
+- (void)close(p->fts_symfd);
+- errno = saved_errno;
+- SET(FTS_STOP);
+- return (NULL);
+- }
+- (void)close(p->fts_symfd);
+- } else if (!(p->fts_flags & FTS_DONTCHDIR) &&
+- fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
+- SET(FTS_STOP);
+- return (NULL);
+- }
+- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
+- return (sp->fts_cur = p);
+-}
+-
+-/*
+- * Fts_set takes the stream as an argument although it's not used in this
+- * implementation; it would be necessary if anyone wanted to add global
+- * semantics to fts using fts_set. An error return is allowed for similar
+- * reasons.
+- */
+-/* ARGSUSED */
+-int
+-fts_set(sp, p, instr)
+- FTS __attribute__((__unused__)) *sp;
+- FTSENT *p;
+- int instr;
+-{
+-sp = NULL; /* stop compiler whinging */
+- if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
+- instr != FTS_NOINSTR && instr != FTS_SKIP) {
+- errno = EINVAL;
+- return (1);
+- }
+- p->fts_instr = instr;
+- return (0);
+-}
+-
+-/*
+- * This is the tricky part -- do not casually change *anything* in here. The
+- * idea is to build the linked list of entries that are used by fts_children
+- * and fts_read. There are lots of special cases.
+- *
+- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
+- * set and it's a physical walk (so that symbolic links can't be directories),
+- * we can do things quickly. First, if it's a 4.4BSD file system, the type
+- * of the file is in the directory entry. Otherwise, we assume that the number
+- * of subdirectories in a node is equal to the number of links to the parent.
+- * The former skips all stat calls. The latter skips stat calls in any leaf
+- * directories and for any files after the subdirectories in the directory have
+- * been found, cutting the stat calls by about 2/3.
+- */
+-static FTSENT *
+-fts_build(sp, type)
+- register FTS *sp;
+- int type;
+-{
+- register struct dirent *dp;
+- register FTSENT *p, *head;
+- register int nitems;
+- FTSENT *cur, *tail;
+- DIR *dirp;
+- void *oldaddr;
+- int cderrno, descend, len, level, nlinks, saved_errno,
+- nostat, doadjust;
+- size_t maxlen;
+- char *cp;
+-
+- /* Set current node pointer. */
+- cur = sp->fts_cur;
+-
+- /*
+- * Open the directory for reading. If this fails, we're done.
+- * If being called from fts_read, set the fts_info field.
+- */
+- if ((dirp = opendir(cur->fts_accpath)) == NULL) {
+- if (type == BREAD) {
+- cur->fts_info = FTS_DNR;
+- cur->fts_errno = errno;
+- }
+- return (NULL);
+- }
+-
+- /*
+- * Nlinks is the number of possible entries of type directory in the
+- * directory if we're cheating on stat calls, 0 if we're not doing
+- * any stat calls at all, -1 if we're doing stats on everything.
+- */
+- nlinks = -1;
+- nostat = 0;
+-
+- /*
+- * If we're going to need to stat anything or we want to descend
+- * and stay in the directory, chdir. If this fails we keep going,
+- * but set a flag so we don't chdir after the post-order visit.
+- * We won't be able to stat anything, but we can still return the
+- * names themselves. Note, that since fts_read won't be able to
+- * chdir into the directory, it will have to return different path
+- * names than before, i.e. "a/b" instead of "b". Since the node
+- * has already been visited in pre-order, have to wait until the
+- * post-order visit to return the error. There is a special case
+- * here, if there was nothing to stat then it's not an error to
+- * not be able to stat. This is all fairly nasty. If a program
+- * needed sorted entries or stat information, they had better be
+- * checking FTS_NS on the returned nodes.
+- */
+- cderrno = 0;
+- if (nlinks || type == BREAD) {
+- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
+- if (nlinks && type == BREAD)
+- cur->fts_errno = errno;
+- cur->fts_flags |= FTS_DONTCHDIR;
+- descend = 0;
+- cderrno = errno;
+- (void)closedir(dirp);
+- dirp = NULL;
+- } else
+- descend = 1;
+- } else
+- descend = 0;
+-
+- /*
+- * Figure out the max file name length that can be stored in the
+- * current path -- the inner loop allocates more path as necessary.
+- * We really wouldn't have to do the maxlen calculations here, we
+- * could do them in fts_read before returning the path, but it's a
+- * lot easier here since the length is part of the dirent structure.
+- *
+- * If not changing directories set a pointer so that can just append
+- * each new name into the path.
+- */
+- len = NAPPEND(cur);
+- if (ISSET(FTS_NOCHDIR)) {
+- cp = sp->fts_path + len;
+- *cp++ = '/';
+- } else {
+- /* GCC, you're too verbose. */
+- cp = NULL;
+- }
+- len++;
+- maxlen = sp->fts_pathlen - len;
+-
+- level = cur->fts_level + 1;
+-
+- /* Read the directory, attaching each entry to the `link' pointer. */
+- doadjust = 0;
+- for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
+- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
+- continue;
+-
+- if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
+- goto mem1;
+- if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
+- oldaddr = sp->fts_path;
+- if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
+- /*
+- * No more memory for path or structures. Save
+- * errno, free up the current structure and the
+- * structures already allocated.
+- */
+-mem1: saved_errno = errno;
+- if (p)
+- free(p);
+- fts_lfree(head);
+- (void)closedir(dirp);
+- cur->fts_info = FTS_ERR;
+- SET(FTS_STOP);
+- errno = saved_errno;
+- return (NULL);
+- }
+- /* Did realloc() change the pointer? */
+- if (oldaddr != sp->fts_path) {
+- doadjust = 1;
+- if (ISSET(FTS_NOCHDIR))
+- cp = sp->fts_path + len;
+- }
+- maxlen = sp->fts_pathlen - len;
+- }
+-
+- if (len + _D_EXACT_NAMLEN (dp) >= 0x10000) {
+- /*
+- * In an FTSENT, fts_pathlen is a u_short so it is
+- * possible to wraparound here. If we do, free up
+- * the current structure and the structures already
+- * allocated, then error out with ENAMETOOLONG.
+- */
+- free(p);
+- fts_lfree(head);
+- (void)closedir(dirp);
+- cur->fts_info = FTS_ERR;
+- SET(FTS_STOP);
+- errno = ENAMETOOLONG;
+- return (NULL);
+- }
+- p->fts_level = level;
+- p->fts_parent = sp->fts_cur;
+- p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
+-
+-#if defined FTS_WHITEOUT && 0
+- if (dp->d_type == DT_WHT)
+- p->fts_flags |= FTS_ISW;
+-#endif
+-
+- if (cderrno) {
+- if (nlinks) {
+- p->fts_info = FTS_NS;
+- p->fts_errno = cderrno;
+- } else
+- p->fts_info = FTS_NSOK;
+- p->fts_accpath = cur->fts_accpath;
+- } else if (nlinks == 0
+-#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
+- || (nostat &&
+- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
+-#endif
+- ) {
+- p->fts_accpath =
+- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
+- p->fts_info = FTS_NSOK;
+- } else {
+- /* Build a file name for fts_stat to stat. */
+- if (ISSET(FTS_NOCHDIR)) {
+- p->fts_accpath = p->fts_path;
+- memmove(cp, p->fts_name, p->fts_namelen + 1);
+- } else
+- p->fts_accpath = p->fts_name;
+- /* Stat it. */
+- p->fts_info = fts_stat(sp, p, 0);
+-
+- /* Decrement link count if applicable. */
+- if (nlinks > 0 && (p->fts_info == FTS_D ||
+- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
+- --nlinks;
+- }
+-
+- /* We walk in directory order so "ls -f" doesn't get upset. */
+- p->fts_link = NULL;
+- if (head == NULL)
+- head = tail = p;
+- else {
+- tail->fts_link = p;
+- tail = p;
+- }
+- ++nitems;
+- }
+- if (dirp)
+- (void)closedir(dirp);
+-
+- /*
+- * If realloc() changed the address of the path, adjust the
+- * addresses for the rest of the tree and the dir list.
+- */
+- if (doadjust)
+- fts_padjust(sp, head);
+-
+- /*
+- * If not changing directories, reset the path back to original
+- * state.
+- */
+- if (ISSET(FTS_NOCHDIR)) {
+- if (len == sp->fts_pathlen || nitems == 0)
+- --cp;
+- *cp = '\0';
+- }
+-
+- /*
+- * If descended after called from fts_children or after called from
+- * fts_read and nothing found, get back. At the root level we use
+- * the saved fd; if one of fts_open()'s arguments is a relative path
+- * to an empty directory, we wind up here with no other way back. If
+- * can't get back, we're done.
+- */
+- if (descend && nitems == 0 &&
+- (cur->fts_level == FTS_ROOTLEVEL ?
+- FCHDIR(sp, sp->fts_rfd) :
+- fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
+- cur->fts_info = FTS_ERR;
+- SET(FTS_STOP);
+- return (NULL);
+- }
+-
+- /* If didn't find anything, return NULL. */
+- if (!nitems) {
+- if (type == BREAD)
+- cur->fts_info = FTS_DP;
+- return (NULL);
+- }
+-
+- /* Sort the entries. */
+- if (sp->fts_compar && nitems > 1)
+- head = fts_sort(sp, head, nitems);
+- return (head);
+-}
+-
+-static u_short
+-fts_stat(sp, p, follow)
+- FTS *sp;
+- register FTSENT *p;
+- int follow;
+-{
+- register FTSENT *t;
+- register dev_t dev;
+- register ino_t ino;
+- struct stat *sbp;
+- int saved_errno;
+-
+- /* If user needs stat info, stat buffer already allocated. */
+- sbp = p->fts_statp;
+-
+-#if defined FTS_WHITEOUT && 0
+- /* check for whiteout */
+- if (p->fts_flags & FTS_ISW) {
+- if (sbp != &sb) {
+- memset(sbp, '\0', sizeof (*sbp));
+- sbp->st_mode = S_IFWHT;
+- }
+- return (FTS_W);
+- }
+-#endif
+-
+- /*
+- * If doing a logical walk, or application requested FTS_FOLLOW, do
+- * a stat(2). If that fails, check for a non-existent symlink. If
+- * fail, set the errno from the stat call.
+- */
+- if (ISSET(FTS_LOGICAL) || follow) {
+- if (stat(p->fts_accpath, sbp)) {
+- saved_errno = errno;
+- if (!lstat(p->fts_accpath, sbp)) {
+- errno = 0;
+- return (FTS_SLNONE);
+- }
+- p->fts_errno = saved_errno;
+- goto err;
+- }
+- } else if (lstat(p->fts_accpath, sbp)) {
+- p->fts_errno = errno;
+-err: memset(sbp, 0, sizeof(struct stat));
+- return (FTS_NS);
+- }
+-
+- if (S_ISDIR(sbp->st_mode)) {
+- /*
+- * Set the device/inode. Used to find cycles and check for
+- * crossing mount points. Also remember the link count, used
+- * in fts_build to limit the number of stat calls. It is
+- * understood that these fields are only referenced if fts_info
+- * is set to FTS_D.
+- */
+- dev = p->fts_dev = sbp->st_dev;
+- ino = p->fts_ino = sbp->st_ino;
+- p->fts_nlink = sbp->st_nlink;
+-
+- if (ISDOT(p->fts_name))
+- return (FTS_DOT);
+-
+- /*
+- * Cycle detection is done by brute force when the directory
+- * is first encountered. If the tree gets deep enough or the
+- * number of symbolic links to directories is high enough,
+- * something faster might be worthwhile.
+- */
+- for (t = p->fts_parent;
+- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
+- if (ino == t->fts_ino && dev == t->fts_dev) {
+- p->fts_cycle = t;
+- return (FTS_DC);
+- }
+- return (FTS_D);
+- }
+- if (S_ISLNK(sbp->st_mode))
+- return (FTS_SL);
+- if (S_ISREG(sbp->st_mode))
+- return (FTS_F);
+- return (FTS_DEFAULT);
+-}
+-
+-static FTSENT *
+-fts_sort(sp, head, nitems)
+- FTS *sp;
+- FTSENT *head;
+- register int nitems;
+-{
+- register FTSENT **ap, *p;
+-
+- /*
+- * Construct an array of pointers to the structures and call qsort(3).
+- * Reassemble the array in the order returned by qsort. If unable to
+- * sort for memory reasons, return the directory entries in their
+- * current order. Allocate enough space for the current needs plus
+- * 40 so don't realloc one entry at a time.
+- */
+- if (nitems > sp->fts_nitems) {
+- struct _ftsent **a;
+-
+- sp->fts_nitems = nitems + 40;
+- if ((a = realloc(sp->fts_array,
+- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
+- free(sp->fts_array);
+- sp->fts_array = NULL;
+- sp->fts_nitems = 0;
+- return (head);
+- }
+- sp->fts_array = a;
+- }
+- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
+- *ap++ = p;
+- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+- for (head = *(ap = sp->fts_array); --nitems; ++ap)
+- ap[0]->fts_link = ap[1];
+- ap[0]->fts_link = NULL;
+- return (head);
+-}
+-
+-static FTSENT *
+-fts_alloc(sp, name, namelen)
+- FTS *sp;
+- const char *name;
+- register int namelen;
+-{
+- register FTSENT *p;
+- size_t len;
+-
+- /*
+- * The file name is a variable length array and no stat structure is
+- * necessary if the user has set the nostat bit. Allocate the FTSENT
+- * structure, the file name and the stat structure in one chunk, but
+- * be careful that the stat structure is reasonably aligned. Since the
+- * fts_name field is declared to be of size 1, the fts_name pointer is
+- * namelen + 2 before the first possible address of the stat structure.
+- */
+- len = sizeof(FTSENT) + namelen;
+- len += sizeof(struct stat) + ALIGNBYTES;
+- if ((p = malloc(len)) == NULL)
+- return (NULL);
+-
+- /* Copy the name and guarantee NUL termination. */
+- memmove(p->fts_name, name, namelen);
+- p->fts_name[namelen] = '\0';
+-
+- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
+- p->fts_namelen = namelen;
+- p->fts_path = sp->fts_path;
+- p->fts_errno = 0;
+- p->fts_flags = 0;
+- p->fts_instr = FTS_NOINSTR;
+- p->fts_number = 0;
+- p->fts_pointer = NULL;
+- return (p);
+-}
+-
+-static void
+-fts_lfree(head)
+- register FTSENT *head;
+-{
+- register FTSENT *p;
+-
+- /* Free a linked list of structures. */
+- while ((p = head)) {
+- head = head->fts_link;
+- free(p);
+- }
+-}
+-
+-/*
+- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
+- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
+- * though the kernel won't resolve them. Add the size (not just what's needed)
+- * plus 256 bytes so don't realloc the path 2 bytes at a time.
+- */
+-static int
+-fts_palloc(sp, more)
+- FTS *sp;
+- size_t more;
+-{
+- char *p;
+-
+- sp->fts_pathlen += more + 256;
+- /*
+- * Check for possible wraparound. In an FTS, fts_pathlen is
+- * a signed int but in an FTSENT it is an unsigned short.
+- * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
+- */
+- if (sp->fts_pathlen < 0 || sp->fts_pathlen >= 0x10000) {
+- if (sp->fts_path) {
+- free(sp->fts_path);
+- sp->fts_path = NULL;
+- }
+- sp->fts_path = NULL;
+- errno = ENAMETOOLONG;
+- return (1);
+- }
+- p = realloc(sp->fts_path, sp->fts_pathlen);
+- if (p == NULL) {
+- free(sp->fts_path);
+- sp->fts_path = NULL;
+- return 1;
+- }
+- sp->fts_path = p;
+- return 0;
+-}
+-
+-/*
+- * When the path is realloc'd, have to fix all of the pointers in structures
+- * already returned.
+- */
+-static void
+-fts_padjust(sp, head)
+- FTS *sp;
+- FTSENT *head;
+-{
+- FTSENT *p;
+- char *addr = sp->fts_path;
+-
+-#define ADJUST(p) do { \
+- if ((p)->fts_accpath != (p)->fts_name) { \
+- (p)->fts_accpath = \
+- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
+- } \
+- (p)->fts_path = addr; \
+-} while (0)
+- /* Adjust the current set of children. */
+- for (p = sp->fts_child; p; p = p->fts_link)
+- ADJUST(p);
+-
+- /* Adjust the rest of the tree, including the current level. */
+- for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
+- ADJUST(p);
+- p = p->fts_link ? p->fts_link : p->fts_parent;
+- }
+-}
+-
+-static size_t
+-fts_maxarglen(argv)
+- char * const *argv;
+-{
+- size_t len, max;
+-
+- for (max = 0; *argv; ++argv)
+- if ((len = strlen(*argv)) > max)
+- max = len;
+- return (max + 1);
+-}
+-
+-/*
+- * Change to dir specified by fd or p->fts_accpath without getting
+- * tricked by someone changing the world out from underneath us.
+- * Assumes p->fts_dev and p->fts_ino are filled in.
+- */
+-static int
+-fts_safe_changedir(sp, p, fd, path)
+- FTS *sp;
+- FTSENT *p;
+- int fd;
+- const char *path;
+-{
+- int ret, oerrno, newfd;
+- struct stat sb;
+-
+- newfd = fd;
+- if (ISSET(FTS_NOCHDIR))
+- return (0);
+- if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
+- return (-1);
+- if (fstat(newfd, &sb)) {
+- ret = -1;
+- goto bail;
+- }
+- if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
+- errno = ENOENT; /* disinformation */
+- ret = -1;
+- goto bail;
+- }
+- ret = fchdir(newfd);
+-bail:
+- oerrno = errno;
+- if (fd < 0)
+- (void)close(newfd);
+- errno = oerrno;
+- return (ret);
+-}
+diff --git a/lib/fts.h b/lib/fts.h
+deleted file mode 100644
+index 58846b9..0000000
+--- a/lib/fts.h
++++ /dev/null
+@@ -1,131 +0,0 @@
+-/*
+- * Copyright (c) 1989, 1993
+- * The Regents of the University of California. All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- * notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- * notice, this list of conditions and the following disclaimer in the
+- * documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- * may be used to endorse or promote products derived from this software
+- * without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- *
+- * @(#)fts.h 8.3 (Berkeley) 8/14/94
+- */
+-
+-#ifndef _FTS_H
+-#define _FTS_H 1
+-
+-#include <features.h>
+-#include <sys/types.h>
+-
+-typedef struct {
+- struct _ftsent *fts_cur; /* current node */
+- struct _ftsent *fts_child; /* linked list of children */
+- struct _ftsent **fts_array; /* sort array */
+- dev_t fts_dev; /* starting device # */
+- char *fts_path; /* path for this descent */
+- int fts_rfd; /* fd for root */
+- int fts_pathlen; /* sizeof(path) */
+- int fts_nitems; /* elements in the sort array */
+- int (*fts_compar) (const void *, const void *); /* compare fn */
+-
+-#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */
+-#define FTS_LOGICAL 0x0002 /* logical walk */
+-#define FTS_NOCHDIR 0x0004 /* don't change directories */
+-#define FTS_NOSTAT 0x0008 /* don't get stat info */
+-#define FTS_PHYSICAL 0x0010 /* physical walk */
+-#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */
+-#define FTS_XDEV 0x0040 /* don't cross devices */
+-#define FTS_WHITEOUT 0x0080 /* return whiteout information */
+-#define FTS_OPTIONMASK 0x00ff /* valid user option mask */
+-
+-#define FTS_NAMEONLY 0x0100 /* (private) child names only */
+-#define FTS_STOP 0x0200 /* (private) unrecoverable error */
+- int fts_options; /* fts_open options, global flags */
+-} FTS;
+-
+-typedef struct _ftsent {
+- struct _ftsent *fts_cycle; /* cycle node */
+- struct _ftsent *fts_parent; /* parent directory */
+- struct _ftsent *fts_link; /* next file in directory */
+- long fts_number; /* local numeric value */
+- void *fts_pointer; /* local address value */
+- char *fts_accpath; /* access path */
+- char *fts_path; /* root path */
+- int fts_errno; /* errno for this node */
+- int fts_symfd; /* fd for symlink */
+- u_short fts_pathlen; /* strlen(fts_path) */
+- u_short fts_namelen; /* strlen(fts_name) */
+-
+- ino_t fts_ino; /* inode */
+- dev_t fts_dev; /* device */
+- nlink_t fts_nlink; /* link count */
+-
+-#define FTS_ROOTPARENTLEVEL -1
+-#define FTS_ROOTLEVEL 0
+- short fts_level; /* depth (-1 to N) */
+-
+-#define FTS_D 1 /* preorder directory */
+-#define FTS_DC 2 /* directory that causes cycles */
+-#define FTS_DEFAULT 3 /* none of the above */
+-#define FTS_DNR 4 /* unreadable directory */
+-#define FTS_DOT 5 /* dot or dot-dot */
+-#define FTS_DP 6 /* postorder directory */
+-#define FTS_ERR 7 /* error; errno is set */
+-#define FTS_F 8 /* regular file */
+-#define FTS_INIT 9 /* initialized only */
+-#define FTS_NS 10 /* stat(2) failed */
+-#define FTS_NSOK 11 /* no stat(2) requested */
+-#define FTS_SL 12 /* symbolic link */
+-#define FTS_SLNONE 13 /* symbolic link without target */
+-#define FTS_W 14 /* whiteout object */
+- u_short fts_info; /* user flags for FTSENT structure */
+-
+-#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
+-#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
+- u_short fts_flags; /* private flags for FTSENT structure */
+-
+-#define FTS_AGAIN 1 /* read node again */
+-#define FTS_FOLLOW 2 /* follow symbolic link */
+-#define FTS_NOINSTR 3 /* no instructions */
+-#define FTS_SKIP 4 /* discard node */
+- u_short fts_instr; /* fts_set() instructions */
+-
+- struct stat *fts_statp; /* stat(2) information */
+- char fts_name[1]; /* file name */
+-} FTSENT;
+-
+-__BEGIN_DECLS
+-
+-#define fts_children pax_fts_children
+-#define fts_close pax_fts_close
+-#define fts_open pax_fts_open
+-#define fts_read pax_fts_read
+-#define fts_set pax_fts_set
+-
+-FTSENT *fts_children (FTS *, int);
+-int fts_close (FTS *);
+-FTS *fts_open (char * const *, int,
+- int (*)(const FTSENT **, const FTSENT **));
+-FTSENT *fts_read (FTS *);
+-int fts_set (FTS *, FTSENT *, int) __THROW;
+-__END_DECLS
+-
+-#endif /* fts.h */
+diff --git a/lib/vis.h b/lib/vis.h
+index d34d342..71fa5f4 100644
+--- a/lib/vis.h
++++ b/lib/vis.h
+@@ -73,14 +73,19 @@
+ */
+ #define UNVIS_END 1 /* no more characters */
+
+-#include <sys/cdefs.h>
++#ifndef __P
++#define __P(x) x
++#endif
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char *vis __P((char *, int, int, int));
+ int strvis __P((char *, const char *, int));
+ int strvisx __P((char *, const char *, size_t, int));
+ int strunvis __P((char *, const char *));
+ int unvis __P((char *, char, int *, int));
+-__END_DECLS
+-
++#ifdef __cplusplus
++}
++#endif
+ #endif /* !_VIS_H_ */
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5ef52a3..227cdef 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -22,4 +22,4 @@ pax_SOURCES = ar_io.c ar_subs.c buf_subs.c cache.c cpio.c\
+ file_subs.c ftree.c gen_subs.c getoldopt.c options.c\
+ pat_rep.c pax.c sel_subs.c tables.c tar.c tty_subs.c
+
+-pax_LDADD = $(top_builddir)/lib/libbsdfunc.a
++pax_LDADD = $(top_builddir)/lib/libbsdfunc.a -lfts
+diff --git a/src/extern.h b/src/extern.h
+index 361fa81..3ed365d 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -37,8 +37,6 @@
+ * External references from each source file
+ */
+
+-#include <sys/cdefs.h>
+-
+ /*
+ * ar_io.c
+ */
+diff --git a/src/file_subs.c b/src/file_subs.c
+index 5590ff1..15bc339 100644
+--- a/src/file_subs.c
++++ b/src/file_subs.c
+@@ -52,7 +52,7 @@
+ #include "extern.h"
+
+ static int
+-mk_link __P((register char *,register struct stat *,register char *, int));
++mk_link (register char *,register struct stat *,register char *, int);
+
+ /*
+ * routines that deal with file operations such as: creating, removing;
+diff --git a/src/tables.c b/src/tables.c
+index 2275bf7..8fddca4 100644
+--- a/src/tables.c
++++ b/src/tables.c
+@@ -39,7 +39,7 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+--
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch b/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
new file mode 100644
index 000000000..58ac9ce4a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
@@ -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
+
diff --git a/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb b/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
index ad04871a8..9d1abfbb5 100644
--- a/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
+++ b/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
@@ -12,10 +12,16 @@ 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"
diff --git a/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb b/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
index 0330981af..06d37adc3 100644
--- a/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb
+++ b/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
@@ -6,17 +6,17 @@ newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)."
HOMEPAGE = "http://compression.ca/pbzip2/"
SECTION = "console/utils"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4c4f2edec9679d5abef3514a816b54a4"
+LIC_FILES_CHKSUM = "file://COPYING;md5=398b8832c6f840cfebd20ab2be6a3743"
DEPENDS = "bzip2"
DEPENDS_append_class-native = " bzip2-replacement-native"
SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz"
-SRC_URI[md5sum] = "91a4911b13305850423840eb0fa6f4f9"
-SRC_URI[sha256sum] = "573bb358a5a7d3bf5f42f881af324cedf960c786e8d66dd03d448ddd8a0166ee"
+SRC_URI[md5sum] = "4cb87da2dba05540afce162f34b3a9a6"
+SRC_URI[sha256sum] = "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6"
-do_configure[noexec] = "1"
+UPSTREAM_CHECK_URI = "http://compression.ca/pbzip2/"
EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'"
diff --git a/yocto-poky/meta/recipes-extended/pigz/pigz.inc b/yocto-poky/meta/recipes-extended/pigz/pigz.inc
index cb8991dcd..86f434c10 100644
--- a/yocto-poky/meta/recipes-extended/pigz/pigz.inc
+++ b/yocto-poky/meta/recipes-extended/pigz/pigz.inc
@@ -13,6 +13,8 @@ PROVIDES_class-native += "gzip-native"
DEPENDS = "zlib"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
inherit update-alternatives
do_install_class-target() {
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch b/yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch
new file mode 100644
index 000000000..12bae28dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch
@@ -0,0 +1,51 @@
+From c84480be8df6966c538d1fb67ccae2f42cc46421 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 07:36:54 +0000
+Subject: [PATCH 1/2] configure: Detect headers before using them
+
+Current logic does not work when system does not have
+sys/endian.h, since it tried to reuse the cached results
+from first try of detecting htole64 in sys/endian.h which is
+'no' and hence the second try to look into endian.h also
+comes out negative.
+
+So we check for header and then run the test for symbols
+and these symbols are not standard and we need to define _GNU_SOURCE
+for it to work, this issue is exposed by systems using musl e.g.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ configure.ac | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4cb56bc..5e23c50 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,12 +69,17 @@ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ AC_FUNC_STRTOD
+ AC_CHECK_FUNCS([memchr memmove memset strerror strtol])
+-AC_CHECK_DECLS([htole64, le64toh],
+- [],
++AC_CHECK_HEADER([sys/endian.h],
+ [
+- AC_CHECK_DECLS([htole64, le64toh], [], [], [#include <endian.h>])
++ AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <sys/endian.h>])
+ ],
+- [#include <sys/endian.h>])
++ [], [])
++
++AC_CHECK_HEADER([endian.h],
++ [
++ AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <endian.h>])
++ ],
++ [], [])
+
+ AC_CONFIG_FILES([Makefile
+ src/Makefile
+--
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch b/yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
new file mode 100644
index 000000000..6b615988d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
@@ -0,0 +1,47 @@
+From 5f3a535987bae4c3e3d9e9079c7526e399f7aecd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 07:42:39 +0000
+Subject: [PATCH 2/2] endian: Use macro bswap_64 instead of __bswap_64
+
+byteswap.h defines then as public APIs on all libc
+on linux including musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+ src/endian.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/endian.c b/src/endian.c
+index b7724f3..51aea58 100644
+--- a/src/endian.c
++++ b/src/endian.c
+@@ -15,6 +15,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
+ #include <stdint.h>
+ #ifdef __linux__
+ #include <endian.h>
++ #include <byteswap.h>
+ #else
+ #include <sys/endian.h>
+ #endif
+@@ -23,7 +24,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
+ # if __BYTE_ORDER == __LITTLE_ENDIAN
+ # define htole64(x) (x)
+ # else
+-# define htole64(x) __bswap_64 (x)
++# define htole64(x) bswap_64 (x)
+ # endif
+ #endif
+
+@@ -31,7 +32,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
+ # if __BYTE_ORDER == __LITTLE_ENDIAN
+ # define le64toh(x) (x)
+ # else
+-# define le64toh(x) __bswap_64 (x)
++# define le64toh(x) bswap_64 (x)
+ # endif
+ #endif
+
+--
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch b/yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch
new file mode 100644
index 000000000..e3489db5b
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch
@@ -0,0 +1,68 @@
+From 936d8068ae19d95260d3058f41dd6cf718101cd6 Mon Sep 17 00:00:00 2001
+From: Christian Krause <kizkizzbangbang@googlemail.com>
+Date: Sat, 26 Dec 2015 14:36:17 +0100
+Subject: [PATCH] option to not build man page
+
+fixes #56
+---
+ configure.ac | 23 +++++++++++++++++++----
+ src/Makefile.am | 2 ++
+ 2 files changed, 21 insertions(+), 4 deletions(-)
+
+Upstream-Status: Backport
+RP 2016/01/22
+
+diff --git a/configure.ac b/configure.ac
+index b437e56..4cb56bc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,13 +20,28 @@ AC_CHECK_FILE(
+ [src/pixz.1],
+ [],
+ [
+- AC_CHECK_PROG(A2X, a2x, a2x, [])
+- if test "x$A2X" = x ; then
+- AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
+- fi
++ AC_ARG_WITH(
++ [manpage],
++ [ --without-manpage don't build man page],
++ [case ${withval} in
++ yes) manpage=true ;;
++ no) manpage=false ;;
++ *) AC_MSG_ERROR([bad value ${withval} for --with-manpage]) ;;
++ esac],
++ [manpage=true]
++ )
+ ]
+ )
+
++AM_CONDITIONAL([MANPAGE], [test x$manpage = xtrue])
++
++if test x$manpage = xtrue ; then
++ AC_CHECK_PROG(A2X, a2x, a2x, [])
++ if test "x$A2X" = x ; then
++ AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
++ fi
++fi
++
+ # Checks for libraries.
+ AC_CHECK_LIB([m], [ceil])
+ AX_PTHREAD
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 600ec90..b98f450 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -15,6 +15,7 @@ pixz_SOURCES = \
+ read.c \
+ write.c
+
++if MANPAGE
+ # TODO remove when possible: This is a hack because a2x is not able to output the man pages to a
+ # specific directory, only to where the source is.
+ pixz.1: pixz.1.asciidoc
+@@ -26,3 +27,4 @@ man_MANS = pixz.1
+ CLEANFILES = pixz.1
+
+ EXTRA_DIST = $(man_MANS) pixz.1.asciidoc
++endif
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb b/yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb
new file mode 100644
index 000000000..0e51472ae
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Parallel, indexed xz compressor"
+
+DEPENDS = "xz libarchive"
+
+SRC_URI = "https://github.com/vasi/pixz/releases/download/v${PV}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "f6dc5909c9a31b192f69aa397ae8df48"
+SRC_URI[sha256sum] = "02c50746b134fa1b1aae41fcc314d7c6f1919b3d48bcdea01bf11769f83f72e8"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5cf6d164086105f1512ccb81bfff1926"
+
+SRC_URI += "file://936d8068ae19d95260d3058f41dd6cf718101cd6.patch \
+ file://0001-configure-Detect-headers-before-using-them.patch \
+ file://0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch \
+"
+UPSTREAM_CHECK_URI = "https://github.com/vasi/pixz/releases"
+
+EXTRA_OECONF += "--without-manpage"
+CFLAGS_append_libc-musl = " -D_GNU_SOURCE"
+CACHED_CONFIGUREVARS += "ac_cv_file_src_pixz_1=no"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch b/yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch
deleted file mode 100644
index 934ae8095..000000000
--- a/yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-
-exec_prefix is /usr default in OE-Core
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: procps-ng-3.3.10/configure.ac
-===================================================================
---- procps-ng-3.3.10.orig/configure.ac
-+++ procps-ng-3.3.10/configure.ac
-@@ -70,7 +70,7 @@ AC_FUNC_MMAP
- AC_FUNC_REALLOC
- AC_FUNC_STRTOD
-
--usrbin_execdir='${exec_prefix}/usr/bin'
-+usrbin_execdir='${exec_prefix}/bin'
- AC_SUBST([usrbin_execdir])
-
- AM_GNU_GETTEXT_VERSION([0.14.1])
diff --git a/yocto-poky/meta/recipes-extended/procps/procps_3.3.10.bb b/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb
index dcfaba71f..c6dccc677 100644
--- a/yocto-poky/meta/recipes-extended/procps/procps_3.3.10.bb
+++ b/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb
@@ -13,12 +13,11 @@ DEPENDS = "ncurses"
inherit autotools gettext pkgconfig update-alternatives
SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
- file://fix-configure.patch \
file://sysctl.conf \
"
-SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
-SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
+SRC_URI[md5sum] = "6cc5b94c1c5b8cbc89ad345a7b522f74"
+SRC_URI[sha256sum] = "e9493169a2d2adc0bc045538707310c8e877b385e4e296143b62607d2bb044ed"
S = "${WORKDIR}/procps-ng-${PV}"
@@ -49,7 +48,7 @@ bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
base_bindir_progs += "kill pidof ps watch"
base_sbindir_progs += "sysctl"
-ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_PRIORITY = "200"
ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
diff --git a/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
new file mode 100644
index 000000000..b57a006bc
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
@@ -0,0 +1,51 @@
+From 5dc872bb2fba6421cb8e1ee578f7bd4aaed55f61 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 24 Mar 2016 15:46:14 +0000
+Subject: [PATCH] Use UINTPTR_MAX instead of __WORDSIZE
+
+Do not include sys/user.h since it conflicts with
+pt_regs struct from kernel APIs in asm/ptrace.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/peekfd.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/peekfd.c b/src/peekfd.c
+index cba2130..0d39878 100644
+--- a/src/peekfd.c
++++ b/src/peekfd.c
+@@ -30,8 +30,11 @@
+ #include <asm/ptrace.h>
+ #include <byteswap.h>
+ #include <endian.h>
++#ifdef __GLIBC__
+ #include <sys/user.h>
++#endif
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <getopt.h>
+ #include <ctype.h>
+
+@@ -228,11 +231,11 @@ int main(int argc, char **argv)
+ if (WIFSTOPPED(status)) {
+ #ifdef PPC
+ struct pt_regs regs;
+- regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R0, 0);
+- regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R3, 0);
+- regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R4, 0);
+- regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R5, 0);
+- regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_ORIG_R3, 0);
++ regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R0, 0);
++ regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R3, 0);
++ regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R4, 0);
++ regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R5, 0);
++ regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_ORIG_R3, 0);
+ #elif defined(ARM)
+ struct pt_regs regs;
+ ptrace(PTRACE_GETREGS, pid, 0, &regs);
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb b/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
index 66aba9ec5..1c6473ebf 100644
--- a/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ b/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
-SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
- file://0002-Include-limits.h-for-PATH_MAX.patch \
- "
+SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
+ file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
+ file://0002-Include-limits.h-for-PATH_MAX.patch \
+ file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
+ "
diff --git a/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch b/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
new file mode 100644
index 000000000..6add4708a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
@@ -0,0 +1,33 @@
+From 776757a23e9930588950c7fcbc7827ec7a3e51c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
+Date: Mon, 4 Jan 2016 15:48:19 +0100
+Subject: [PATCH] Do not accidentaly override commandline passed CFLAGS.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport
+
+Signed-off-by: Tomáš Chvátal <tchvatal@suse.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3ba1386..1552c15 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [
+ # ================
+ # Check for cflags
+ # ================
+-CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
++CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+ AC_ARG_ENABLE([werror],
+ [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
+ [enable_werror="$enableval"],
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch b/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
new file mode 100644
index 000000000..a79e47796
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
@@ -0,0 +1,93 @@
+From 39fd30ce57e3c34c3649866bf9345a71f0b78667 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Mon, 4 Jan 2016 15:10:53 +0100
+Subject: [PATCH] Fix build with disabled ldap
+
+Upstream-Status: Backport
+
+Reported-by: Tomas Chvatal <tchvatal@suse.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ warnquota.c | 36 ++++++++++++++++++------------------
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/warnquota.c b/warnquota.c
+index 3734f0e..e9868c1 100644
+--- a/warnquota.c
++++ b/warnquota.c
+@@ -109,13 +109,13 @@ struct configparams {
+ char *user_signature;
+ char *group_message;
+ char *group_signature;
++ time_t cc_before;
++#ifdef USE_LDAP_MAIL_LOOKUP
+ int use_ldap_mail; /* 0 */
++ int ldap_is_setup; /* 0 */
+ int ldap_starttls; /* 0 */
+ int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */
+ int ldap_vers; /* LDAP_VERSION3 */
+- time_t cc_before;
+-#ifdef USE_LDAP_MAIL_LOOKUP
+- int ldap_is_setup; /* 0 */
+ char ldap_host[CNF_BUFFER];
+ int ldap_port;
+ char ldap_uri[CNF_BUFFER];
+@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config)
+ }
+ maildev[0] = 0;
+ config->user_signature = config->user_message = config->group_signature = config->group_message = NULL;
++ config->cc_before = -1;
++
++#ifdef USE_LDAP_MAIL_LOOKUP
+ config->use_ldap_mail = 0;
+ config->ldap_starttls = 0;
+ config->ldap_tls = LDAP_OPT_X_TLS_NEVER;
+ config->ldap_vers = LDAP_VERSION3;
+- config->cc_before = -1;
+-
+-#ifdef USE_LDAP_MAIL_LOOKUP
+ config->ldap_port = config->ldap_is_setup = 0;
+ config->ldap_host[0] = 0;
+ config->ldap_uri[0] = 0;
+@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config)
+ create_eoln(config->group_signature);
+ verify_format(config->group_signature, "GROUP_SIGNATURE");
+ }
++ else if (!strcmp(var, "CC_BEFORE")) {
++ int num;
++ char unit[10];
++
++ if (sscanf(value, "%d%s", &num, unit) != 2)
++ goto cc_parse_err;
++ if (str2timeunits(num, unit, &config->cc_before) < 0) {
++cc_parse_err:
++ die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
++ }
++ }
++#ifdef USE_LDAP_MAIL_LOOKUP
+ else if (!strcmp(var, "LDAP_MAIL")) {
+ if(strcasecmp(value, "true") == 0)
+ config->use_ldap_mail = 1;
+@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config)
+ else
+ config->ldap_starttls = 0;
+ }
+- else if (!strcmp(var, "CC_BEFORE")) {
+- int num;
+- char unit[10];
+-
+- if (sscanf(value, "%d%s", &num, unit) != 2)
+- goto cc_parse_err;
+- if (str2timeunits(num, unit, &config->cc_before) < 0) {
+-cc_parse_err:
+- die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
+- }
+- }
+-#ifdef USE_LDAP_MAIL_LOOKUP
+ else if (!strcmp(var, "LDAP_HOST"))
+ sstrncpy(config->ldap_host, value, CNF_BUFFER);
+ else if (!strcmp(var, "LDAP_PORT"))
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
deleted file mode 100644
index 5f47fbd18..000000000
--- a/yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Upstream-Status: Pending
-
---- quota-tools.orig/configure.in
-+++ quota-tools/configure.in
-@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG)
- AC_SUBST(NETLINKLIBS)
-
- AC_SEARCH_LIBS(gethostbyname, nsl)
--AC_MSG_CHECKING(for host_access in -lwrap)
--AC_CACHE_VAL(ac_cv_lib_wrap_main,
-- saved_LIBS="$LIBS"
-- LIBS="$LIBS -lwrap"
-- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-- #include <stdio.h>
-- #include <sys/types.h>
-- #include <sys/socket.h>
-- #include <netinet/in.h>
-- #include <tcpd.h>
-- struct request_info request;
-- int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
-- dnl We always restore LIBS as we add -lwrap in the next check
-- [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
-- [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
-- ])
-
--if test ${ac_cv_lib_wrap_main} = yes; then
-- AC_CHECK_HEADER(tcpd.h,, [
-- echo 'ERROR: could not find tcpd.h - missing TCP wrappers package'
-- exit 1
-- ])
-- LIBS="$LIBS -lwrap"
-- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
-- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
-+AC_ARG_WITH(tcpwrappers,
-+ [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]],
-+ ,
-+ with_tcpwrappers="try")
-+
-+if test "x$with_tcpwrappers" != xno; then
-+ AC_MSG_CHECKING(for host_access in -lwrap)
-+ AC_CACHE_VAL(ac_cv_lib_wrap_main,
-+ saved_LIBS="$LIBS"
-+ LIBS="$LIBS -lwrap"
-+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+ #include <stdio.h>
-+ #include <sys/types.h>
-+ #include <sys/socket.h>
-+ #include <netinet/in.h>
-+ #include <tcpd.h>
-+ struct request_info request;
-+ int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
-+ dnl We always restore LIBS as we add -lwrap in the next try
-+ [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
-+ [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
-+ ])
-+
-+ if test "x$ac_cv_lib_wrap_main" = xyes; then
-+ AC_CHECK_HEADER(tcpd.h,, [
-+ if test "x$with_tcpwrappers" != xtry; then
-+ AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package])
-+ fi
-+ ])
-+
-+ LIBS="$LIBS -lwrap"
-+ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
-+ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
-+ elif test "x$with_tcpwrappers" != xtry; then
-+ AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package])
-+ fi
- fi
-
-+
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_C_INLINE
diff --git a/yocto-poky/meta/recipes-extended/quota/quota_4.02.bb b/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
index 673d58428..4a980464b 100644
--- a/yocto-poky/meta/recipes-extended/quota/quota_4.02.bb
+++ b/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
@@ -8,33 +8,31 @@ LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad2
file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
- file://config-tcpwrappers.patch \
+ file://0001-Fix-build-with-disabled-ldap.patch \
+ file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
file://fcntl.patch \
file://remove_non_posix_types.patch \
- "
+ "
SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
-SRC_URI[md5sum] = "a8a5df262261e659716ccad2a5d6df0d"
-SRC_URI[sha256sum] = "f4c2f48abf94bbdc396df33d276f2e9d19af58c232cb85eef9c174a747c33795"
+SRC_URI[md5sum] = "6b09f9c93515c25a528be5754cdfb6f5"
+SRC_URI[sha256sum] = "9c6c4d9ae7bf30506dd2aa3d8056c4ff2f8d087930d7c721616f5c093bdc674b"
-S = "${WORKDIR}/quota-tools"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
+UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
-DEPENDS = "gettext-native e2fsprogs"
+DEPENDS = "gettext-native e2fsprogs libnl dbus"
inherit autotools-brokensep gettext pkgconfig
CFLAGS += "-I${STAGING_INCDIR}/tirpc"
LDFLAGS += "-ltirpc"
ASNEEDED = ""
-EXTRA_OEMAKE += 'STRIP=""'
PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
-PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers"
-PACKAGECONFIG[rpc] = "--enable-rpc=yes,--enable-rpc=no,libtirpc"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
-
-do_install() {
- oe_runmake ROOTDIR=${D} install
-}
+PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
new file mode 100644
index 000000000..16b763ef0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
@@ -0,0 +1,43 @@
+From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Mon, 2 Nov 2015 17:05:18 -0500
+Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly
+
+In the latest libtirpc version to access the xp_auth
+one must use the SVC_XP_AUTH macro. To be backwards
+compatible a couple ifdefs were added to use the
+macro when it exists.
+
+Upstream-Status: Backport
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/rpcb_svc_com.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 4ae93f1..22d6c84 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt)
+ a.rmt_localvers = fi->versnum;
+
+ xprt_set_caller(xprt, fi);
++#if defined(SVC_XP_AUTH)
++ SVC_XP_AUTH(xprt) = svc_auth_none;
++#else
+ xprt->xp_auth = &svc_auth_none;
++#endif
+ svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
++#if !defined(SVC_XP_AUTH)
+ SVCAUTH_DESTROY(xprt->xp_auth);
+ xprt->xp_auth = NULL;
++#endif
++
+ done:
+ if (buffer)
+ free(buffer);
+--
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
index f156290bf..741a99035 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
@@ -36,6 +36,7 @@ Date: Thu Aug 6 16:27:20 2015 +0200
Signed-off-by: Olaf Kirch <okir@...e.de>
Upstream-Status: Backport
+ CVE: CVE-2015-7236
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
index 9c72a1bdf..6fbc6364c 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
@@ -4,6 +4,7 @@ aliases. As a workaround we use "sunprc" instead of "portmapper"
ported from alpine linux
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
Index: rpcbind-0.2.2/src/rpcbind.c
===================================================================
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
index b3ae2541a..9cdade495 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -5,7 +5,7 @@ Requires=rpcbind.socket
[Service]
Type=forking
EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
-ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
+ExecStart=@SBINDIR@/rpcbind $RPCBIND_OPTS
SuccessExitStatus=2
[Install]
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
index ecd3ba8a5..c19a1976a 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
@@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
file://init.d \
file://0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch \
file://remove-sys-queue.patch \
+ file://0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch \
${UCLIBCPATCHES} \
${MUSLPATCHES} \
file://rpcbind.conf \
diff --git a/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch b/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
index 2bc9a59be..4ac820fde 100644
--- a/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
+++ b/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
@@ -10,6 +10,7 @@ This is time consuming and will overflow stack if n is huge.
Fixes CVE-2015-6806
Upstream-Status: Backport
+CVE: CVE-2015-6806
Signed-off-by: Kuang-che Wu <kcwu@csie.org>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
diff --git a/yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
new file mode 100644
index 000000000..a6f604b65
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -0,0 +1,124 @@
+From 8cf3454d567f77233023be49a39a33e9f0836f89 Mon Sep 17 00:00:00 2001
+From: Scott Garman <scott.a.garman@intel.com>
+Date: Thu, 14 Apr 2016 12:28:57 +0200
+Subject: [PATCH] Disable use of syslog for sysroot
+
+Disable use of syslog to prevent sysroot user and group additions from
+writing entries to the host's syslog. This patch should only be used
+with the shadow-native recipe.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ src/groupadd.c | 3 +++
+ src/groupdel.c | 3 +++
+ src/groupmems.c | 3 +++
+ src/groupmod.c | 3 +++
+ src/useradd.c | 3 +++
+ src/userdel.c | 3 +++
+ src/usermod.c | 3 +++
+ 7 files changed, 21 insertions(+)
+
+diff --git a/src/groupadd.c b/src/groupadd.c
+index 39b4ec0..f716f57 100644
+--- a/src/groupadd.c
++++ b/src/groupadd.c
+@@ -34,6 +34,9 @@
+
+ #ident "$Id$"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff --git a/src/groupdel.c b/src/groupdel.c
+index da99347..46a679c 100644
+--- a/src/groupdel.c
++++ b/src/groupdel.c
+@@ -34,6 +34,9 @@
+
+ #ident "$Id$"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <grp.h>
+diff --git a/src/groupmems.c b/src/groupmems.c
+index e4f107f..95cb073 100644
+--- a/src/groupmems.c
++++ b/src/groupmems.c
+@@ -32,6 +32,9 @@
+
+ #include <config.h>
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <fcntl.h>
+ #include <getopt.h>
+ #include <grp.h>
+diff --git a/src/groupmod.c b/src/groupmod.c
+index d9d3807..6229737 100644
+--- a/src/groupmod.c
++++ b/src/groupmod.c
+@@ -34,6 +34,9 @@
+
+ #ident "$Id$"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff --git a/src/useradd.c b/src/useradd.c
+index e1ebf50..25679d8 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -34,6 +34,9 @@
+
+ #ident "$Id$"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+diff --git a/src/userdel.c b/src/userdel.c
+index 19b12bc..a083929 100644
+--- a/src/userdel.c
++++ b/src/userdel.c
+@@ -34,6 +34,9 @@
+
+ #ident "$Id$"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff --git a/src/usermod.c b/src/usermod.c
+index 685b50a..28e5cfc 100644
+--- a/src/usermod.c
++++ b/src/usermod.c
+@@ -34,6 +34,9 @@
+
+ #ident "$Id$"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>
+--
+2.1.0
+
diff --git a/yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch b/yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch
deleted file mode 100644
index 1943fd6fa..000000000
--- a/yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Disable use of syslog to prevent sysroot user and group additions from
-writing entries to the host's syslog. This patch should only be used
-with the shadow-native recipe.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c
---- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800
-+++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700
-@@ -34,6 +34,9 @@
-
- #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
-
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <ctype.h>
- #include <fcntl.h>
- #include <getopt.h>
-diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c
---- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800
-+++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700
-@@ -34,6 +34,9 @@
-
- #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
-
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
diff --git a/yocto-poky/meta/recipes-extended/shadow/shadow.inc b/yocto-poky/meta/recipes-extended/shadow/shadow.inc
index 4313ffe95..d024b01dc 100644
--- a/yocto-poky/meta/recipes-extended/shadow/shadow.inc
+++ b/yocto-poky/meta/recipes-extended/shadow/shadow.inc
@@ -25,13 +25,13 @@ SRC_URI_append_class-target = " \
"
SRC_URI_append_class-native = " \
- file://disable-syslog.patch \
+ file://0001-Disable-use-of-syslog-for-sysroot.patch \
file://allow-for-setting-password-in-clear-text.patch \
file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
file://0001-useradd.c-create-parent-directories-when-necessary.patch \
"
SRC_URI_append_class-nativesdk = " \
- file://disable-syslog.patch \
+ file://0001-Disable-use-of-syslog-for-sysroot.patch \
"
SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
diff --git a/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb b/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
index 5122f53da..237e9f252 100644
--- a/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
+++ b/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -9,14 +9,14 @@ to recode S-Lang procedures in C if you need to."
HOMEPAGE = "http://www.jedsoft.org/slang/"
SECTION = "libs"
-DEPENDS = "pcre"
+DEPENDS = "pcre ncurses"
PR = "r12"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
-SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
+SRC_URI = "http://www.jedsoft.org/releases/slang/old/slang-${PV}.tar.bz2 \
file://rpathfix.patch \
file://fix-check-pcre.patch \
file://change-char-type-to-signed-char-in-macros.patch \
@@ -24,6 +24,7 @@ SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
file://slang-fix-the-iconv-existence-checking.patch \
file://0001-Fix-error-conflicting-types-for-posix_close.patch \
"
+UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
inherit autotools-brokensep
@@ -47,7 +48,6 @@ do_install() {
}
FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
-FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug"
PARALLEL_MAKE = ""
diff --git a/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb b/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
index 651831e31..a5ece0744 100644
--- a/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
+++ b/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
@@ -11,6 +11,8 @@ SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \
SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
do_install() {
install -d ${D}${base_bindir} ${D}${mandir}/man1
install -m 755 stat ${D}${base_bindir}/stat.stat
diff --git a/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb b/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb
index 4b7e4bab7..e9179d3e1 100644
--- a/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb
+++ b/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb
@@ -1,3 +1,4 @@
+SUMMARY = "System load testing utility"
DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/"
diff --git a/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam b/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam
index 5bc26e702..515eab0c6 100644
--- a/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam
+++ b/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam
@@ -2,5 +2,5 @@
auth include common-auth
account include common-account
password include common-password
-session required pam_keyinit.so revoke
+session optional pam_keyinit.so revoke
session required pam_limits.so
diff --git a/yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch b/yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch
deleted file mode 100644
index 2418689da..000000000
--- a/yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-The makefile uses top_srcdir to find files that were created by configure, when
-it should use top_builddir.
-
-Upstream-Status: Submitted (http://bugzilla.sudo.ws/show_bug.cgi?id=708)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
----
- src/Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile.in b/src/Makefile.in
-index f009e10..7acfb2d 100644
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -165,11 +165,11 @@ install-dirs:
-
- install-rc: install-dirs
- if [ -n "$(INIT_SCRIPT)" ]; then \
-- $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_srcdir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
-+ $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_builddir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
- rm -f $(DESTDIR)$(RC_LINK); \
- ln -s $(INIT_DIR)/sudo $(DESTDIR)$(RC_LINK); \
- elif test -n "$(tmpfiles_d)"; then \
-- $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_srcdir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \
-+ $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_builddir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \
- fi
-
- install-binaries: install-dirs $(PROGS)
---
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.14p3.bb b/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb
index b93112fa3..042043ece 100644
--- a/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.14p3.bb
+++ b/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb
@@ -2,14 +2,13 @@ require sudo.inc
SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch \
file://0001-Include-sys-types.h-for-id_t-definition.patch \
"
PAM_SRC_URI = "file://sudo.pam"
-SRC_URI[md5sum] = "93dbd1e47c136179ff1b01494c1c0e75"
-SRC_URI[sha256sum] = "a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237"
+SRC_URI[md5sum] = "7cf6b9b76d0478a572432bed481dd7b5"
+SRC_URI[sha256sum] = "4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308"
DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
@@ -33,4 +32,5 @@ do_install_append () {
}
FILES_${PN} += "${libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+ ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
new file mode 100644
index 000000000..9567946c0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
@@ -0,0 +1,132 @@
+From f0af5bcfd753691652eac35efbcb208c933253f1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 05:11:53 +0000
+Subject: [PATCH] Fix build with musl
+
+Explicitly include fcntl.h since with glibc is comes in as indirect
+include but not with musl
+
+linux/time.h inclusion is not required on musl so using !__GLIBC__ is
+not right for musl here
+
+wait type is glibc specific
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ klogd.c | 10 +---------
+ ksym_mod.c | 5 +----
+ pidfile.c | 1 +
+ syslog.c | 3 ++-
+ syslogd.c | 4 +---
+ 5 files changed, 6 insertions(+), 17 deletions(-)
+
+diff --git a/klogd.c b/klogd.c
+index 6cc80ed..9219671 100644
+--- a/klogd.c
++++ b/klogd.c
+@@ -260,11 +260,8 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdlib.h>
+@@ -277,13 +274,8 @@
+
+ #define __LIBRARY__
+ #include <linux/unistd.h>
+-#if !defined(__GLIBC__)
+-# define __NR_ksyslog __NR_syslog
+-_syscall3(int,ksyslog,int, type, char *, buf, int, len);
+-#else
+ #include <sys/klog.h>
+ #define ksyslog klogctl
+-#endif
+
+ #define LOG_BUFFER_SIZE 4096
+ #define LOG_LINE_LENGTH 1000
+diff --git a/ksym_mod.c b/ksym_mod.c
+index 68cd6b6..6e26da1 100644
+--- a/ksym_mod.c
++++ b/ksym_mod.c
+@@ -113,12 +113,9 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+ #include "module.h"
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <linux/version.h>
+diff --git a/pidfile.c b/pidfile.c
+index e0959a0..6daa2e0 100644
+--- a/pidfile.c
++++ b/pidfile.c
+@@ -31,6 +31,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <signal.h>
++#include <fcntl.h>
+
+ /* read_pid
+ *
+diff --git a/syslog.c b/syslog.c
+index bdb3ff2..ef7b34e 100644
+--- a/syslog.c
++++ b/syslog.c
+@@ -55,7 +55,7 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/file.h>
+-#include <sys/signal.h>
++//#include <sys/signal.h>
+ #include <sys/syslog.h>
+ #if 0
+ #include "syslog.h"
+@@ -72,6 +72,7 @@ static char sccsid[] = "@(#)syslog.c 5.28 (Berkeley) 6/27/90";
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdio.h>
++#include <fcntl.h>
+
+ #define _PATH_LOGNAME "/dev/log"
+
+diff --git a/syslogd.c b/syslogd.c
+index ea73ea5..1ca0595 100644
+--- a/syslogd.c
++++ b/syslogd.c
+@@ -818,9 +818,7 @@ void doexit(int sig);
+ void init();
+ void cfline(char *line, register struct filed *f);
+ int decode(char *name, struct code *codetab);
+-#if defined(__GLIBC__)
+ #define dprintf mydprintf
+-#endif /* __GLIBC__ */
+ static void dprintf(char *, ...);
+ static void allocate_log(void);
+ void sighup_handler();
+@@ -2094,7 +2092,7 @@ void reapchild()
+ (void) signal(SIGCHLD, reapchild); /* reset signal handler -ASP */
+ wait ((int *)0);
+ #else
+- union wait status;
++ int status;
+
+ while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
+ ;
+--
+2.5.1
+
diff --git a/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc b/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
index bcf8aa7a9..1e363db6e 100644
--- a/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -15,6 +15,7 @@ inherit update-rc.d update-alternatives
SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
file://no-strip-install.patch \
+ file://0001-Fix-build-with-musl.patch \
file://sysklogd \
file://syslog.conf \
"
@@ -24,6 +25,8 @@ SRC_URI_append_e500v2 = " file://no-vectorization.patch"
INITSCRIPT_NAME = "syslog"
CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
CFLAGS_append = " -DSYSV"
do_install () {
@@ -56,3 +59,8 @@ pkg_prerm_${PN} () {
fi
fi
}
+
+python () {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
diff --git a/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc b/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
index 5c761fa69..c35329193 100644
--- a/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
+++ b/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
@@ -9,6 +9,9 @@ SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
file://sysstat.service \
"
+UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
DEPENDS += "base-passwd"
inherit autotools-brokensep gettext systemd
@@ -49,7 +52,6 @@ pkg_postinst_${PN} () {
FILES_${PN} += "${libdir}/sa"
-FILES_${PN}-dbg += "${libdir}/sa/.debug/"
TARGET_CC_ARCH += "${LDFLAGS}"
LDFLAGS_append_libc-uclibc = " -lintl"
diff --git a/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.1.5.bb b/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb
index bff861617..7a8eb96ad 100644
--- a/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
+++ b/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb
@@ -4,6 +4,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
-SRC_URI[md5sum] = "4d8e6e72d057189a1660462a678d9ada"
-SRC_URI[sha256sum] = "feb3a90d86ffd69cf5b88144a8876ae05bd42384f559676f08100671589fa2bb"
-
+SRC_URI[md5sum] = "e8b615775ad98780e3f0675b91eddb19"
+SRC_URI[sha256sum] = "9806b9a662568796d3fb93ecd01ecea10d815e668337a646494953bff4bc4155"
diff --git a/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
index da2ae3cb0..af5026f52 100644
--- a/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
+++ b/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
@@ -1,4 +1,5 @@
Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+CVE: CVE-2010-0624
This patch avoids heap overflow reported by :
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
diff --git a/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch b/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
new file mode 100644
index 000000000..b0dc16c3d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
@@ -0,0 +1,19 @@
+musl has valid d_ino implementation
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: tar-1.28/m4/d-ino.m4
+===================================================================
+--- tar-1.28.orig/m4/d-ino.m4
++++ tar-1.28/m4/d-ino.m4
+@@ -40,7 +40,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_
+ [gl_cv_struct_dirent_d_ino=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems with Linux kernel.
+- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
++ linux*-gnu*|linux*-musl*)
++ gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_struct_dirent_d_ino="guessing no" ;;
+ esac
diff --git a/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb b/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
index 881600039..518e62206 100644
--- a/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
+++ b/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
@@ -7,6 +7,12 @@ LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI += "file://remove-gets.patch \
+ file://musl_dirent.patch \
"
SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
+
+do_install_append_libc-musl() {
+ rm -f ${D}${libdir}/charset.alias
+ rmdir ${D}${libdir}
+}
diff --git a/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
new file mode 100644
index 000000000..eee640e8a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
@@ -0,0 +1,31 @@
+__BEGIN_DECLS/__END_DECLS are BSD specific and not defined in musl
+glibc and uclibc had sys/cdefs.h doing it.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: tcp_wrappers_7.6/tcpd.h
+===================================================================
+--- tcp_wrappers_7.6.orig/tcpd.h
++++ tcp_wrappers_7.6/tcpd.h
+@@ -11,7 +11,9 @@
+ #include <netinet/in.h>
+ #include <stdio.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Structure to describe one communications endpoint. */
+
+@@ -252,6 +254,8 @@ extern char *fix_strtok();
+ extern char *my_strtok();
+ #endif
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif
diff --git a/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index 263047828..5fdbbced7 100644
--- a/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -43,6 +43,7 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
file://try-from.8 \
file://safe_finger.8 \
file://makefile-fix-parallel.patch \
+ file://musl-decls.patch \
"
SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
@@ -73,6 +74,9 @@ EXTRA_OEMAKE = "'CC=${CC}' \
EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
+EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN"
+
+EXTRA_OEMAKE_append_libc-musl = " 'LIBS='"
do_compile () {
oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
diff --git a/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb b/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
index b5420a3e5..1254bc89b 100644
--- a/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
+++ b/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
@@ -1,4 +1,4 @@
-DESCRIPTION = "Fake version of the texinfo utility suite"
+SUMMARY = "Fake version of the texinfo utility suite"
SECTION = "console/utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=d6bb62e73ca8b901d3f2e9d71542f4bb"
diff --git a/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb b/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb
index a8702cfca..8638bb1d0 100644
--- a/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb
+++ b/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb
@@ -79,4 +79,4 @@ FILES_${PN}-doc = "${infodir}/texinfo* \
${datadir}/${tex_texinfo} \
${mandir}/man1 ${mandir}/man5"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb b/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb
deleted file mode 100644
index 76f97f0b5..000000000
--- a/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-LICENSE = "PD & BSD & BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
- ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzcode.md5sum] = "f5e0299925631da7cf82d8ce1205111d"
-SRC_URI[tzcode.sha256sum] = "11ae66d59b844e8c6c81914c9dd73b666627bd7792855ba9de195eee4520c28d"
-SRC_URI[tzdata.md5sum] = "0d3123eb1b453ec0620822bd65be4c42"
-SRC_URI[tzdata.sha256sum] = "5efa6b324e64ef921ef700ac3273a51895f672684a30e342f68e47871c6a8cd1"
-
-S = "${WORKDIR}"
-
-inherit native
-
-do_install () {
- install -d ${D}${bindir}/
- install -m 755 zic ${D}${bindir}/
- install -m 755 zdump ${D}${bindir}/
- install -m 755 tzselect ${D}${bindir}/
-}
diff --git a/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb b/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb
new file mode 100644
index 000000000..06b92ea6e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb
@@ -0,0 +1,25 @@
+# note that we allow for us to use data later than our code version
+#
+SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD & BSD & BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
+
+SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
+ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
+
+SRC_URI[tzcode.md5sum] = "ffb82ab0b588138759902b4627a6a80d"
+SRC_URI[tzcode.sha256sum] = "344b1bd486935bca2b7baa47db3b99b32211c45f31ec0d1ead8bacd103c5a416"
+SRC_URI[tzdata.md5sum] = "0330ccd16140d3b6438a18dae9b34b93"
+SRC_URI[tzdata.sha256sum] = "8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48"
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 755 zic ${D}${bindir}/
+ install -m 755 zdump ${D}${bindir}/
+ install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016a.bb b/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb
index 6ba5f81b1..5eb85b7e9 100644
--- a/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016a.bb
+++ b/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb
@@ -6,10 +6,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
DEPENDS = "tzcode-native"
-SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
+SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-SRC_URI[tzdata.md5sum] = "0d3123eb1b453ec0620822bd65be4c42"
-SRC_URI[tzdata.sha256sum] = "5efa6b324e64ef921ef700ac3273a51895f672684a30e342f68e47871c6a8cd1"
+SRC_URI[tzdata.md5sum] = "0330ccd16140d3b6438a18dae9b34b93"
+SRC_URI[tzdata.sha256sum] = "8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48"
inherit allarch
@@ -21,6 +21,7 @@ RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarcti
S = "${WORKDIR}"
DEFAULT_TIMEZONE ?= "Universal"
+INSTALL_TIMEZONE_FILE ?= "1"
TZONES= "africa antarctica asia australasia europe northamerica southamerica \
factory etcetera backward systemv \
@@ -48,7 +49,9 @@ do_install () {
# Install default timezone
if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
install -d ${D}${sysconfdir}
- echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+ if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
+ echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+ fi
ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
else
bberror "DEFAULT_TIMEZONE is set to an invalid value."
@@ -205,4 +208,5 @@ FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
${datadir}/zoneinfo/iso3166.tab \
${datadir}/zoneinfo/Etc/*"
-CONFFILES_${PN} += "${sysconfdir}/timezone ${sysconfdir}/localtime"
+CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }"
+CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
index 9ba3c1dc6..afc4c734a 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
@@ -3,6 +3,7 @@ Subject: unzip files encoded with non-latin, non-unicode file names
Last-Update: 2015-02-11
Upstream-Status: Backport
+CVE: CVE-2015-1315
Updated 2015-02-11 by Marc Deslauriers <marc.deslauriers@canonical.com>
to fix buffer overflow in charset_to_intern()
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
index e137f0dc7..0e497cc65 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
@@ -5,6 +5,7 @@ Bug-Debian: http://bugs.debian.org/773722
The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
Upstream-Status: Backport
+CVE: CVE-2014-8139
Signed-off-by: Roy Li <rongqing.li@windriver.com>
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
index edc7d515b..c989df189 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
@@ -5,6 +5,7 @@ Bug-Debian: http://bugs.debian.org/773722
The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
Upstream-Status: Backport
+CVE: CVE-2014-8140
Signed-off-by: Roy Li <rongqing.li@windriver.com>
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
index d0c1db392..c48c23f30 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
@@ -5,6 +5,7 @@ Bug-Debian: http://bugs.debian.org/773722
The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
Upstream-Status: Backport
+CVE: CVE-2014-8141
Signed-off-by: Roy Li <rongqing.li@windriver.com>
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch
index ea93823cb..87eed965d 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch
@@ -1,4 +1,5 @@
Upstream-Status: Backport
+CVE: CVE-2015-7696
Signed-off-by: Tudor Florea <tudor.flore@enea.com>
From 68efed87fabddd450c08f3112f62a73f61d493c9 Mon Sep 17 00:00:00 2001
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch
index da6898833..a8f293674 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch
@@ -1,4 +1,5 @@
Upstream-Status: Backport
+CVE: CVE-2015-7697
Signed-off-by: Tudor Florea <tudor.flore@enea.com>
From bd8a743ee0a77e65ad07ef4196c4cd366add3f26 Mon Sep 17 00:00:00 2001
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch
index 0a0bfbbb1..5fcd318b2 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch
@@ -4,6 +4,7 @@ Date: Wed, 11 Feb 2015
Subject: Info-ZIP UnZip buffer overflow
Upstream-Status: Backport
+CVE: CVE-2014-9636
By carefully crafting a corrupt ZIP archive with "extra fields" that
purport to have compressed blocks larger than the corresponding
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb b/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
index b38632378..9efe75628 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -20,13 +20,17 @@ SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \
SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
+
+# exclude version 5.5.2 which triggers a false positive
+UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz"
+
S = "${WORKDIR}/unzip60"
# Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from
# Makefile and add CFLAGS. Optimization will be overriden by unzip
# configure to be -O3.
#
-EXTRA_OEMAKE += "STRIP=true LF2='' \
+EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \
'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
export LD = "${CC}"
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch b/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
new file mode 100644
index 000000000..8afed5c0d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
@@ -0,0 +1,99 @@
+From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 01:01:15 +0000
+Subject: [PATCH] Fix build issues found with non glibc C libraries
+
+Add time.h for getting time_t definition
+limits.h for PATH_MAX
+linux/param.h for EXEC_PAGESIZE
+Replace deprecated MNTTAB with _PATH_MNTTAB
+include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
+MNTTYPE_EXT2
+Include sys/types.h for u_char definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+
+Upstream-Status: Submitted
+
+ include/extern.h | 1 +
+ src/configfile.c | 1 +
+ src/memory.c | 3 +++
+ src/net.c | 1 +
+ src/shutdown.c | 3 ++-
+ 5 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/extern.h b/include/extern.h
+index 21db11b..04b16bc 100644
+--- a/include/extern.h
++++ b/include/extern.h
+@@ -3,6 +3,7 @@
+
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <time.h>
+
+ #include "logmessage.h"
+ #include "xmalloc.h"
+diff --git a/src/configfile.c b/src/configfile.c
+index be5d7b3..7c1d1dd 100644
+--- a/src/configfile.c
++++ b/src/configfile.c
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/stat.h>
+
+ #include "extern.h"
+diff --git a/src/memory.c b/src/memory.c
+index e9607e4..b5e08aa 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -21,6 +21,9 @@
+ #include <sys/stat.h>
+ #include <sys/param.h>
+ #include <sys/mman.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+
+ #include "extern.h"
+ #include "watch_err.h"
+diff --git a/src/net.c b/src/net.c
+index 21823ae..8930caf 100644
+--- a/src/net.c
++++ b/src/net.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <unistd.h> /* for gethostname() etc */
+ #include <netdb.h> /* for gethostbyname() */
++#include <sys/types.h>
+ #include <sys/param.h> /* for MAXHOSTNAMELEN */
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+diff --git a/src/shutdown.c b/src/shutdown.c
+index 74aafa5..46b99cf 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -25,6 +25,7 @@
+
+ #include "watch_err.h"
+ #include "extern.h"
++#include "ext2_mnt.h"
+
+ #if defined __GLIBC__
+ #include "ext2_mnt.h"
+@@ -123,7 +124,7 @@ static void mnt_off()
+ FILE *fp;
+ struct mntent *mnt;
+
+- fp = setmntent(MNTTAB, "r");
++ fp = setmntent(_PATH_MNTTAB, "r");
+ /* in some rare cases fp might be NULL so be careful */
+ while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
+ /* First check if swap */
+--
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
index 36f2968f5..e68ad545c 100644
--- a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
@@ -1,3 +1,6 @@
+Signed-off-by: Diego Rondini <diego.ml@zoho.com>
+Upstream-Status: Inappropriate
+
--- watchdog-5.13.orig/watchdog.conf 2013-02-01 12:15:44.000000000 +0100
+++ watchdog-5.13/watchdog.conf 2014-11-13 10:59:43.233943000 +0100
@@ -20,7 +20,7 @@
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
index 0fa8ee97c..b2765f190 100644
--- a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
@@ -1,3 +1,6 @@
+Signed-off-by: Diego Rondini <diego.ml@zoho.com>
+Upstream-Status: Inappropriate
+
--- watchdog-5.13.orig/redhat/watchdog.init 2014-11-12 17:18:39.125943000 +0100
+++ watchdog-5.13/redhat/watchdog.init 2014-11-12 18:27:36.189943000 +0100
@@ -7,7 +7,7 @@
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb b/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
index 9ec0a8e84..733023897 100644
--- a/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -12,14 +12,24 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
file://fixsepbuild.patch \
file://fix-ping-failure.patch \
file://watchdog-init.patch \
- file://watchdog-conf.patch"
+ file://watchdog-conf.patch \
+ file://0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch \
+"
SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
+UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
+
inherit autotools
inherit update-rc.d
+DEPENDS_append_libc-musl = " libtirpc "
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+EXTRA_OECONF_append_libc-musl = " --disable-nfs "
+
INITSCRIPT_NAME = "watchdog.sh"
INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
diff --git a/yocto-poky/meta/recipes-extended/wget/wget.inc b/yocto-poky/meta/recipes-extended/wget/wget.inc
index 049b898d3..dc381a628 100644
--- a/yocto-poky/meta/recipes-extended/wget/wget.inc
+++ b/yocto-poky/meta/recipes-extended/wget/wget.inc
@@ -22,3 +22,8 @@ BBCLASSEXTEND += "nativesdk"
PACKAGECONFIG ??= ""
PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
+
+# Let aclocal use the relative path for the m4 file rather than
+# absolute, otherwise there might be an "Argument list too long" error
+# when it is built in a long/deep directory.
+acpaths = "-I ./m4"
diff --git a/yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch b/yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch
deleted file mode 100644
index eaa2e7e8c..000000000
--- a/yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: wget-1.12/configure.ac
-===================================================================
---- wget-1.12.orig/configure.ac 2009-09-22 09:39:49.000000000 -0700
-+++ wget-1.12/configure.ac 2011-10-19 20:32:53.714812160 -0700
-@@ -177,7 +177,7 @@
- dnl Gettext
- dnl
- AM_GNU_GETTEXT([external],[need-ngettext])
--AM_GNU_GETTEXT_VERSION([0.17])
-+AM_GNU_GETTEXT_VERSION([0.18])
-
- AC_PROG_RANLIB
-
diff --git a/yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb b/yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb
deleted file mode 100644
index 5c34a42df..000000000
--- a/yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://fix_makefile.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-SRC_URI[md5sum] = "f61d9011b99f824106a5d5a05dd0f63d"
-SRC_URI[sha256sum] = "9f1c6d09d7148c1c2d9fd0ea655dcf4dcc407deb2db32d4126251ca0245cb670"
-
-require wget.inc
diff --git a/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb b/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb
new file mode 100644
index 000000000..dca5d1f71
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb
@@ -0,0 +1,8 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ "
+
+SRC_URI[md5sum] = "a6a908c9ae0e6a4194c628974cc3f05a"
+SRC_URI[sha256sum] = "029fbb93bdc1c0c5a7507b6076a6ec2f8d34204a85aa87e5b2f61a9405b290f5"
+
+require wget.inc
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch
new file mode 100644
index 000000000..14160bf8d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch
@@ -0,0 +1,30 @@
+From 33f42aa8d190b40be18cd0541b5881d46978b572 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 17 Dec 2015 11:50:05 +0200
+Subject: [PATCH] Don't build the in-script manual
+
+Building the contents for "--manual" option requires a web browser
+or java (these are the two options for "xmlto txt" support).
+That's bonkers so don't do it: the man pages are still available
+and contain the same info.
+
+Upstream-Status: Inappropriate [disables in-script docs]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ scripts/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Makefile.in b/scripts/Makefile.in
+index 430032d..85359bc 100644
+--- a/scripts/Makefile.in
++++ b/scripts/Makefile.in
+@@ -112,5 +112,5 @@ html/%.html: desc/%.xml
+ (cd html;$(XMLTO) html-nochunks ../$<)
+
+ %.txt: desc/%.xml
+- $(XMLTO) txt $<
++ echo "Please see the man pages." > $@
+
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
index 4cd1bafbb..e9defadea 100644
--- a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
+++ b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
@@ -1,22 +1,20 @@
-From 174aa7206f4b308d4d2292bb8067a07d8cc715c0 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 29 Apr 2014 07:29:32 +0200
-Subject: [PATCH] Reinstate xdg-terminal
+From 37e227ae1766568d8de55e268bb69bc15eee3529 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 26 Nov 2015 16:01:47 +0200
+Subject: [PATCH] Enable xdg-terminal
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Upstream-Status: Inappropriate [configuration]
-Upstream-Status: Inappropriate [Revert]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
- scripts/Makefile.in | 6 +-
- scripts/xdg-terminal | 622 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 625 insertions(+), 3 deletions(-)
- create mode 100755 scripts/xdg-terminal
+ scripts/Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
-index 2c7d2ac..bef10d1 100644
+index d167393..430032d 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
-@@ -20,11 +20,11 @@ SCRIPTS = \
+@@ -20,7 +20,8 @@ SCRIPTS = \
xdg-open \
xdg-email \
xdg-screensaver \
@@ -26,647 +24,6 @@ index 2c7d2ac..bef10d1 100644
# xdg-su
# xdg-copy \
# xdg-file-dialog
--# xdg-terminal
-
- MANPAGES= $(SCRIPTS:%=man/%.1)
- WEBPAGES= $(SCRIPTS:%=%.html)
-@@ -42,7 +42,7 @@ release: scripts html man
- rm -f xdg-*.in *~ HACKING generate-help-script.awk
- rm -rf desc/
- rm -rf xsl/
-- rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal
-+ rm -f xdg-file-dialog xdg-su xdg-copy
-
- distclean: clean
- rm -f Makefile
-diff --git a/scripts/xdg-terminal b/scripts/xdg-terminal
-new file mode 100755
-index 0000000..4bd9205
---- /dev/null
-+++ b/scripts/xdg-terminal
-@@ -0,0 +1,622 @@
-+#!/bin/sh
-+#---------------------------------------------
-+# xdg-terminal
-+#
-+# Utility script to open the registered terminal emulator
-+#
-+# Refer to the usage() function below for usage.
-+#
-+# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-+# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-+# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-+#
-+# LICENSE:
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a
-+# copy of this software and associated documentation files (the "Software"),
-+# to deal in the Software without restriction, including without limitation
-+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+# and/or sell copies of the Software, and to permit persons to whom the
-+# Software is furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included
-+# in all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+# OTHER DEALINGS IN THE SOFTWARE.
-+#
-+#---------------------------------------------
-+
-+manualpage()
-+{
-+cat << _MANUALPAGE
-+Name
-+
-+ xdg-terminal - opens the user's preferred terminal emulator application
-+
-+Synopsis
-+
-+ xdg-terminal [command]
-+
-+ xdg-terminal { --help | --manual | --version }
-+
-+Description
-+
-+ xdg-terminal opens the user's preferred terminal emulator application. If
-+ a command is provided the command will be executed by the shell within the
-+ newly opened terminal window.
-+
-+ xdg-terminal is for use inside a desktop session only. It is not
-+ recommended to use xdg-terminal as root.
-+
-+Options
-+
-+ --help
-+ Show command synopsis.
-+
-+ --manual
-+ Show this manual page.
-+
-+ --version
-+ Show the xdg-utils version information.
-+
-+Exit Codes
-+
-+ An exit code of 0 indicates success while a non-zero exit code indicates
-+ failure. The following failure codes can be returned:
-+
-+ 1
-+ Error in command line syntax.
-+
-+ 3
-+ A required tool could not be found.
-+
-+ 4
-+ The action failed.
-+
-+Examples
-+
-+ xdg-terminal
-+
-+ Opens the user's default terminal emulator, just starting an interactive
-+ shell.
-+
-+ xdg-terminal top
-+
-+ Opens the user's default terminal emulator and lets it run the top
-+ executable.
-+_MANUALPAGE
-+}
-+
-+usage()
-+{
-+cat << _USAGE
-+ xdg-terminal - opens the user's preferred terminal emulator application
-+
-+Synopsis
-+
-+ xdg-terminal [command]
-+
-+ xdg-terminal { --help | --manual | --version }
-+
-+_USAGE
-+}
-+
-+#@xdg-utils-common@
-+
-+#----------------------------------------------------------------------------
-+# Common utility functions included in all XDG wrapper scripts
-+#----------------------------------------------------------------------------
-+
-+DEBUG()
-+{
-+ [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
-+ [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
-+ shift
-+ echo "$@" >&2
-+}
-+
-+# This handles backslashes but not quote marks.
-+first_word()
-+{
-+ read first rest
-+ echo "$first"
-+}
-+
-+#-------------------------------------------------------------
-+# map a binary to a .desktop file
-+binary_to_desktop_file()
-+{
-+ search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
-+ binary="`which "$1"`"
-+ binary="`readlink -f "$binary"`"
-+ base="`basename "$binary"`"
-+ IFS=:
-+ for dir in $search; do
-+ unset IFS
-+ [ "$dir" ] || continue
-+ [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue
-+ for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
-+ [ -r "$file" ] || continue
-+ # Check to make sure it's worth the processing.
-+ grep -q "^Exec.*$base" "$file" || continue
-+ # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
-+ grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
-+ command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
-+ command="`which "$command"`"
-+ if [ x"`readlink -f "$command"`" = x"$binary" ]; then
-+ # Fix any double slashes that got added path composition
-+ echo "$file" | sed -e 's,//*,/,g'
-+ return
-+ fi
-+ done
-+ done
-+}
-+
-+#-------------------------------------------------------------
-+# map a .desktop file to a binary
-+## FIXME: handle vendor dir case
-+desktop_file_to_binary()
-+{
-+ search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
-+ desktop="`basename "$1"`"
-+ IFS=:
-+ for dir in $search; do
-+ unset IFS
-+ [ "$dir" ] && [ -d "$dir/applications" ] || continue
-+ file="$dir/applications/$desktop"
-+ [ -r "$file" ] || continue
-+ # Remove any arguments (%F, %f, %U, %u, etc.).
-+ command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
-+ command="`which "$command"`"
-+ readlink -f "$command"
-+ return
-+ done
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on successfully completing the desired operation
-+
-+exit_success()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "$@"
-+ echo
-+ fi
-+
-+ exit 0
-+}
-+
-+
-+#-----------------------------------------
-+# Exit script on malformed arguments, not enough arguments
-+# or missing required option.
-+# prints usage information
-+
-+exit_failure_syntax()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "xdg-terminal: $@" >&2
-+ echo "Try 'xdg-terminal --help' for more information." >&2
-+ else
-+ usage
-+ echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
-+ fi
-+
-+ exit 1
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on missing file specified on command line
-+
-+exit_failure_file_missing()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "xdg-terminal: $@" >&2
-+ fi
-+
-+ exit 2
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on failure to locate necessary tool applications
-+
-+exit_failure_operation_impossible()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "xdg-terminal: $@" >&2
-+ fi
-+
-+ exit 3
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on failure returned by a tool application
-+
-+exit_failure_operation_failed()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "xdg-terminal: $@" >&2
-+ fi
-+
-+ exit 4
-+}
-+
-+#------------------------------------------------------------
-+# Exit script on insufficient permission to read a specified file
-+
-+exit_failure_file_permission_read()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "xdg-terminal: $@" >&2
-+ fi
-+
-+ exit 5
-+}
-+
-+#------------------------------------------------------------
-+# Exit script on insufficient permission to write a specified file
-+
-+exit_failure_file_permission_write()
-+{
-+ if [ $# -gt 0 ]; then
-+ echo "xdg-terminal: $@" >&2
-+ fi
-+
-+ exit 6
-+}
-+
-+check_input_file()
-+{
-+ if [ ! -e "$1" ]; then
-+ exit_failure_file_missing "file '$1' does not exist"
-+ fi
-+ if [ ! -r "$1" ]; then
-+ exit_failure_file_permission_read "no permission to read file '$1'"
-+ fi
-+}
-+
-+check_vendor_prefix()
-+{
-+ file_label="$2"
-+ [ -n "$file_label" ] || file_label="filename"
-+ file=`basename "$1"`
-+ case "$file" in
-+ [[:alpha:]]*-*)
-+ return
-+ ;;
-+ esac
-+
-+ echo "xdg-terminal: $file_label '$file' does not have a proper vendor prefix" >&2
-+ echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
-+ echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2
-+ echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2
-+ exit 1
-+}
-+
-+check_output_file()
-+{
-+ # if the file exists, check if it is writeable
-+ # if it does not exists, check if we are allowed to write on the directory
-+ if [ -e "$1" ]; then
-+ if [ ! -w "$1" ]; then
-+ exit_failure_file_permission_write "no permission to write to file '$1'"
-+ fi
-+ else
-+ DIR=`dirname "$1"`
-+ if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then
-+ exit_failure_file_permission_write "no permission to create file '$1'"
-+ fi
-+ fi
-+}
-+
-+#----------------------------------------
-+# Checks for shared commands, e.g. --help
-+
-+check_common_commands()
-+{
-+ while [ $# -gt 0 ] ; do
-+ parm="$1"
-+ shift
-+
-+ case "$parm" in
-+ --help)
-+ usage
-+ echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
-+ exit_success
-+ ;;
-+
-+ --manual)
-+ manualpage
-+ exit_success
-+ ;;
-+
-+ --version)
-+ echo "xdg-terminal 1.1.0 rc1"
-+ exit_success
-+ ;;
-+ esac
-+ done
-+}
-+
-+check_common_commands "$@"
-+
-+[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-+if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
-+ # Be silent
-+ xdg_redirect_output=" > /dev/null 2> /dev/null"
-+else
-+ # All output to stderr
-+ xdg_redirect_output=" >&2"
-+fi
-+
-+#--------------------------------------
-+# Checks for known desktop environments
-+# set variable DE to the desktop environments name, lowercase
-+
-+detectDE()
-+{
-+ # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
-+ unset GREP_OPTIONS
-+
-+ if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
-+ case "${XDG_CURRENT_DESKTOP}" in
-+ ENLIGHTENMENT)
-+ DE=enlightenment;
-+ ;;
-+ GNOME)
-+ DE=gnome;
-+ ;;
-+ KDE)
-+ DE=kde;
-+ ;;
-+ LXDE)
-+ DE=lxde;
-+ ;;
-+ MATE)
-+ DE=mate;
-+ ;;
-+ XFCE)
-+ DE=xfce
-+ ;;
-+ esac
-+ fi
-+
-+ if [ x"$DE" = x"" ]; then
-+ # classic fallbacks
-+ if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde;
-+ elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
-+ elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate;
-+ elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
-+ elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
-+ elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
-+ elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment;
-+ fi
-+ fi
-+
-+ if [ x"$DE" = x"" ]; then
-+ # fallback to checking $DESKTOP_SESSION
-+ case "$DESKTOP_SESSION" in
-+ gnome)
-+ DE=gnome;
-+ ;;
-+ LXDE|Lubuntu)
-+ DE=lxde;
-+ ;;
-+ MATE)
-+ DE=mate;
-+ ;;
-+ xfce|xfce4|'Xfce Session')
-+ DE=xfce;
-+ ;;
-+ esac
-+ fi
-+
-+ if [ x"$DE" = x"" ]; then
-+ # fallback to uname output for other platforms
-+ case "$(uname 2>/dev/null)" in
-+ Darwin)
-+ DE=darwin;
-+ ;;
-+ esac
-+ fi
-+
-+ if [ x"$DE" = x"gnome" ]; then
-+ # gnome-default-applications-properties is only available in GNOME 2.x
-+ # but not in GNOME 3.x
-+ which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
-+ fi
-+}
-+
-+#----------------------------------------------------------------------------
-+# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-+# It also always returns 1 in KDE 3.4 and earlier
-+# Simply return 0 in such case
-+
-+kfmclient_fix_exit_code()
-+{
-+ version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
-+ major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
-+ minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
-+ release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
-+ test "$major" -gt 3 && return $1
-+ test "$minor" -gt 5 && return $1
-+ test "$release" -gt 4 && return $1
-+ return 0
-+}
-+
-+terminal_kde()
-+{
-+ terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole`
-+
-+ terminal_exec=`which $terminal 2>/dev/null`
-+
-+ if [ -x "$terminal_exec" ]; then
-+ if [ x"$1" = x"" ]; then
-+ $terminal_exec
-+ else
-+ $terminal_exec -e "$1"
-+ fi
-+
-+ if [ $? -eq 0 ]; then
-+ exit_success
-+ else
-+ exit_failure_operation_failed
-+ fi
-+ else
-+ exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable"
-+ fi
-+}
-+
-+terminal_gnome()
-+{
-+ term_exec_key="/desktop/gnome/applications/terminal/exec"
-+ term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg"
-+
-+ term_exec=`gconftool-2 --get ${term_exec_key}`
-+ term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}`
-+
-+ terminal_exec=`which $term_exec 2>/dev/null`
-+
-+ if [ -x "$terminal_exec" ]; then
-+ if [ x"$1" = x"" ]; then
-+ $terminal_exec
-+ else
-+ if [ x"$term_exec_arg" = x"" ]; then
-+ $terminal_exec "$1"
-+ else
-+ $terminal_exec "$term_exec_arg" "$1"
-+ fi
-+ fi
-+
-+ if [ $? -eq 0 ]; then
-+ exit_success
-+ else
-+ exit_failure_operation_failed
-+ fi
-+ else
-+ exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable"
-+ fi
-+}
-+
-+terminal_xfce()
-+{
-+ if [ x"$1" = x"" ]; then
-+ exo-open --launch TerminalEmulator
-+ else
-+ exo-open --launch TerminalEmulator "$1"
-+ fi
-+
-+ if [ $? -eq 0 ]; then
-+ exit_success
-+ else
-+ exit_failure_operation_failed
-+ fi
-+}
-+
-+terminal_generic()
-+{
-+ # if $TERM is a known non-command, use hard-coded fallbacks
-+ if [ x"$TERM" = x"" ] || [ x"$TERM" = x"linux" ] || [ x"$TERM" = x"vt100" ]; then
-+ TERM=xterm
-+ fi
-+
-+ terminal_exec=`which $TERM 2>/dev/null`
-+
-+ if [ -x "$terminal_exec" ]; then
-+ if [ x"$1" = x"" ]; then
-+ $terminal_exec
-+ else
-+ # screen and urxvt won't do their own parsing of quoted arguments
-+ if [ x"$TERM" = x"screen" ]; then
-+ # screen has an incompatible meaning for -e
-+ sh -c "exec $terminal_exec $1"
-+ elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then
-+ #TODO: Use whatever mechanism dash supports to test for
-+ # rxvt-* to match things like rxvt-unicode-256color
-+ sh -c "exec $terminal_exec -e $1"
-+ else
-+ $terminal_exec -e "$1"
-+ fi
-+ fi
-+
-+ if [ $? -eq 0 ]; then
-+ exit_success
-+ else
-+ exit_failure_operation_failed
-+ fi
-+ else
-+ exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable"
-+ fi
-+}
-+
-+terminal_lxde()
-+{
-+ if which lxterminal &>/dev/null; then
-+ if [ x"$1" = x"" ]; then
-+ lxterminal
-+ else
-+ lxterminal -e "$1"
-+ fi
-+ else
-+ terminal_generic "$1"
-+ fi
-+}
-+
-+#[ x"$1" != x"" ] || exit_failure_syntax
-+
-+command=
-+while [ $# -gt 0 ] ; do
-+ parm="$1"
-+ shift
-+
-+ case "$parm" in
-+ -*)
-+ exit_failure_syntax "unexpected option '$parm'"
-+ ;;
-+
-+ *)
-+ if [ -n "$command" ] ; then
-+ exit_failure_syntax "unexpected argument '$parm'"
-+ fi
-+ command="$parm"
-+ ;;
-+ esac
-+done
-+
-+detectDE
-+
-+if [ x"$DE" = x"" ]; then
-+ DE=generic
-+fi
-+
-+case "$DE" in
-+ kde)
-+ terminal_kde "$command"
-+ ;;
-+
-+ gnome*)
-+ terminal_gnome "$command"
-+ ;;
-+
-+ xfce)
-+ terminal_xfce "$command"
-+ ;;
-+
-+ lxde)
-+ terminal_lxde "$command"
-+ ;;
-+
-+ generic)
-+ terminal_generic "$command"
-+ ;;
-+
-+ *)
-+ exit_failure_operation_impossible "no terminal emulator available"
-+ ;;
-+esac
--
-1.9.0
+2.1.4
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
index 46f1e3c6e..c1472cf97 100644
--- a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
+++ b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
@@ -4,13 +4,13 @@ DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide bas
desktop integration functions for any Free Desktop, such as Linux. \
They are intended to provide a set of defacto standards. \
The following scripts are provided at this time: \
-xdg-desktop-icon \
-xdg-desktop-menu \
-xdg-email \
+xdg-desktop-icon \
+xdg-desktop-menu \
+xdg-email \
xdg-icon-resource \
-xdg-mime \
-xdg-open \
-xdg-screensaver \
+xdg-mime \
+xdg-open \
+xdg-screensaver \
xdg-terminal \
"
@@ -19,14 +19,18 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
file://0001-Reinstate-xdg-terminal.patch \
+ file://0001-Don-t-build-the-in-script-manual.patch \
"
-SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6"
-SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102"
+SRC_URI[md5sum] = "2d0aec6037769a5f138ff404b1bb4b15"
+SRC_URI[sha256sum] = "b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7bc4125"
+
+UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
inherit autotools-brokensep distro_features_check
# The xprop requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
+DEPENDS = "xmlto-native libxslt-native"
RDEPENDS_${PN} += "xprop"
diff --git a/yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch b/yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
new file mode 100644
index 000000000..3c1b2f6f0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
@@ -0,0 +1,100 @@
+From e8b0ffc7ea04cc71dba97a38e1a134aaf2285c2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 07:14:50 +0000
+Subject: [PATCH] configure: Use HAVE_SYS_RESOURCE_H to guard sys/resource.h
+ inclusion
+
+HAVE_RLIM_T check will not let sys/resource.h to be checked and
+rlim_t is defined in sys/resource.h so the check would fail.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ aclocal.m4 | 2 +-
+ configure | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 6e6f32c..70e7076 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -11,7 +11,7 @@ AC_CACHE_VAL(xinetd_cv_type_$1,
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+diff --git a/configure b/configure
+index b507d38..bec56ea 100755
+--- a/configure
++++ b/configure
+@@ -7640,7 +7640,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7686,7 +7686,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7732,7 +7732,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7778,7 +7778,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7824,7 +7824,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7870,7 +7870,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7916,7 +7916,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+--
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
index 0542dbe83..c44c5a113 100644
--- a/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
+++ b/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
@@ -9,6 +9,7 @@ http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342
the patch come from:
https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff
+CVE: CVE-2013-4342
Signed-off-by: Li Wang <li.wang@windriver.com>
---
xinetd/builtins.c | 2 +-
diff --git a/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
index ffc03e5c7..6bfaabe82 100644
--- a/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ b/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -7,8 +7,12 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
DEPENDS = ""
+DEPENDS_append_libc-musl = " libtirpc "
PR = "r2"
+# Blacklist a bogus tag in upstream check
+UPSTREAM_CHECK_GITTAGREGEX = "xinetd-(?P<pver>(?!20030122).+)"
+
SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
file://xinetd.init \
file://xinetd.conf \
@@ -17,6 +21,7 @@ SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
file://xinetd-CVE-2013-4342.patch \
+ file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
file://xinetd.service \
"
@@ -36,6 +41,9 @@ EXTRA_OECONF="--disable-nls"
PACKAGECONFIG ??= "tcp-wrappers"
PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+
do_configure() {
# Looks like configure.in is broken, so we are skipping
# rebuilding configure and are just using the shipped one
@@ -56,6 +64,7 @@ do_install() {
install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
+ install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d
# Install systemd unit files
install -d ${D}${systemd_unitdir}/system
diff --git a/yocto-poky/meta/recipes-extended/xz/xz_5.2.1.bb b/yocto-poky/meta/recipes-extended/xz/xz_5.2.2.bb
index cf7fba656..d118f3a74 100644
--- a/yocto-poky/meta/recipes-extended/xz/xz_5.2.1.bb
+++ b/yocto-poky/meta/recipes-extended/xz/xz_5.2.2.bb
@@ -22,8 +22,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
-SRC_URI[md5sum] = "3e44c766c3fb4f19e348e646fcd5778a"
-SRC_URI[sha256sum] = "b918b6648076e74f8d7ae19db5ee663df800049e187259faf5eb997a7b974681"
+SRC_URI[md5sum] = "7cf6a8544a7dae8e8106fdf7addfa28c"
+SRC_URI[sha256sum] = "73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2"
inherit autotools gettext
diff --git a/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb b/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
index 1e961101b..383da4b89 100644
--- a/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
+++ b/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
@@ -8,6 +8,9 @@ S = "${WORKDIR}/zip30"
SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
+# exclude version 2.3.2 which triggers a false positive
+UPSTREAM_CHECK_REGEX = "^zip(?P<pver>(?!232).+)\.tgz"
+
# zip.inc sets CFLAGS, but what Makefile actually uses is
# CFLAGS_NOOPT. It will also force -O3 optimization, overriding
# whatever we set.
OpenPOWER on IntegriCloud