aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-01-29 00:55:59 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-01-29 00:55:59 +0100
commit1eb911922a7e818a6f314a68c0561bba008e6efd (patch)
tree9b647e44195a0a0876b40cbf5fa42dca0641179f
parentd420552f02af2ad6a15cf3a70b76bf86b222c07e (diff)
downloadaports-1eb911922a7e818a6f314a68c0561bba008e6efd.tar.gz
aports-1eb911922a7e818a6f314a68c0561bba008e6efd.tar.bz2
aports-1eb911922a7e818a6f314a68c0561bba008e6efd.tar.xz
Remove stale patches in main/
-rw-r--r--main/alpine-ipxe/fix-aarch64.patch45
-rw-r--r--main/apache-mod-auth-kerb/mod_auth_kerb.patch13
-rw-r--r--main/at-spi2-atk/bridge-default-off.patch28
-rw-r--r--main/audit/0001-auditctl-include-headers-to-make-build-work-with-mus.patch29
-rw-r--r--main/audit/0004-audisp-audispd.c-Include-limits.h-for-PATH_MAX.patch24
-rw-r--r--main/avahi/initscripts.patch32
-rw-r--r--main/awstats/CVE-2017-1000501-1.patch68
-rw-r--r--main/awstats/CVE-2017-1000501-2.patch67
-rw-r--r--main/cdw/cdw_fs.c.patch11
-rw-r--r--main/cdw/main.c.patch14
-rw-r--r--main/charybdis/fix-ratbox-errors.patch33
-rw-r--r--main/cvechecker/cvecheck-c.patch18
-rw-r--r--main/distcc/distcc-3.1-clone.patch14
-rw-r--r--main/email/email-3.1.0-doc.patch10
-rw-r--r--main/email/email-3.1.0-ldflags.patch11
-rw-r--r--main/expat/CVE-2019-15903.patch80
-rw-r--r--main/fakeroot/fakeroot-uclibc.patch20
-rw-r--r--main/farstream/gtk-doc.patch127
-rw-r--r--main/flashrom/spi-ioctl.patch33
-rw-r--r--main/fontconfig/locale.patch116
-rw-r--r--main/fts/00-static-and-shared-libs.patch49
-rw-r--r--main/ghostscript/fix-alignment.patch11
-rw-r--r--main/graphviz/ungit-autogen.patch24
-rw-r--r--main/gtk+2.0/automake.patch19
-rw-r--r--main/hylafax/CVE-2018-17141.patch134
-rw-r--r--main/hylafax/gcc8.patch13
-rw-r--r--main/hylafaxplus/musl-reg-startend.patch20
-rw-r--r--main/icu/CVE-2017-7867-7868.patch155
-rw-r--r--main/icu/icu-58.1-iterator-reset.patch124
-rw-r--r--main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch202
-rw-r--r--main/json-glib/fuzzy-compare-for-float.patch199
-rw-r--r--main/kamailio/kamctl_build.patch236
-rw-r--r--main/kbd/bkeymaps.patch14
-rw-r--r--main/keyutils/fix-includes.patch10
-rw-r--r--main/krb5/CVE-2018-20217.patch72
-rw-r--r--main/krb5/libressl.patch28
-rw-r--r--main/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch366
-rw-r--r--main/libfprint/0001-imgdev-fix-enum-mismatch.patch39
-rw-r--r--main/libgcab/configure.patch12
-rw-r--r--main/libgcrypt/random-Fix-hang-of-_gcry_rndjent_get_version.patch45
-rw-r--r--main/libical/automake.patch11
-rw-r--r--main/libnotify/skip-tests.patch13
-rw-r--r--main/libogg/nocxx.patch15
-rw-r--r--main/libraw1394/fix-types.patch62
-rw-r--r--main/libvirt/fix-fortify-virnetlink.patch41
-rw-r--r--main/llvm8/disable-FileSystemTest.CreateDir-perms-assert.patch61
-rw-r--r--main/llvm9/disable-FileSystemTest.CreateDir-perms-assert.patch61
-rw-r--r--main/lua-curl/fix-build-with-curl-7.62.0.patch55
-rw-r--r--main/lua-dbi/fix-table-maxn.patch26
-rw-r--r--main/mg/missing-defines.patch34
-rw-r--r--main/mg/tree.h765
-rw-r--r--main/newt/parallel-build.patch20
-rw-r--r--main/ngircd/client_user_len.patch11
-rw-r--r--main/ngrep/no-strip.patch10
-rw-r--r--main/open-iscsi/ldflags.patch35
-rw-r--r--main/open-iscsi/open-iscsi-include-sysmacros.patch20
-rw-r--r--main/open-iscsi/static-inline.patch13
-rw-r--r--main/openldap/CVE-2017-9287.patch28
-rw-r--r--main/p11-kit/strerror_l.patch14
-rw-r--r--main/partimage/libressl.patch26
-rw-r--r--main/perl-params-classify/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch95
-rw-r--r--main/py3-future/re-enable-python3-5.patch113
-rw-r--r--main/rp-pppoe/kmode.patch19
-rw-r--r--main/rtnppd/Makefile.patch13
-rw-r--r--main/samba/qsort-compar.patch22
-rw-r--r--main/sqsh/readline-6.3.patch13
-rw-r--r--main/squark/0001-fix-missing-symbols-from-lua-module.patch25
-rw-r--r--main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch37
-rw-r--r--main/stfl/libiconv.patch13
-rw-r--r--main/stfl/libs.patch57
-rw-r--r--main/xen/musl-support.patch74
-rw-r--r--main/xen/qemu-coroutine-gthread.patch10
-rw-r--r--main/xf86-video-modesetting/0001-modesetting-24bpp-are-too-confusing-shadow-our-way-o.patch424
-rw-r--r--main/xf86-video-modesetting/drmmode_shadow.patch44
-rw-r--r--main/xf86-video-qxl/mibstore.patch21
75 files changed, 0 insertions, 4866 deletions
diff --git a/main/alpine-ipxe/fix-aarch64.patch b/main/alpine-ipxe/fix-aarch64.patch
deleted file mode 100644
index d67c1542e6..0000000000
--- a/main/alpine-ipxe/fix-aarch64.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0d245e1f23449426503d0856bf259fa3841dae43 Mon Sep 17 00:00:00 2001
-From: "John L. Jolly" <jjolly@suse.com>
-Date: Fri, 12 Oct 2018 16:42:56 +0000
-Subject: [PATCH] [build] Fix asm argument modifiers for aarch64 build
-
-When building bin-arm64-efi/snp.efi using the gcc8 compiler, the following error occurs:
-
- In file included from core/xferbuf.c:28:
- core/xferbuf.c: In function 'xferbuf_malloc_realloc':
- include/errno.h:261:2: error: invalid 'asm': invalid address mode
- __asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
- ^~~~~~~
- include/errno.h:549:16: note: in expansion of macro '__einfo_error'
- #define ENOSPC __einfo_error ( EINFO_ENOSPC )
- ^~~~~~~~~~~~~
- core/xferbuf.c:192:11: note: in expansion of macro 'ENOSPC'
- return -ENOSPC;
- ^~~~~~
-
-The 'a' address mode is invalid for aarch64. Simply changing this to
-the constant operand type 'c' seems to resolve the issue on aarch64 and
-does not appear to affect x86_64 or i586.
-
-Signed-off-by: John L. Jolly <jjolly@suse.com>
----
- include/errno.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/include/errno.h b/include/errno.h
-index e80bf9ca5..342384fa4 100644
---- a/include/errno.h
-+++ b/include/errno.h
-@@ -262,10 +262,10 @@ static inline void eplatform_discard ( int dummy __unused, ... ) {}
- ".align 8\n\t" \
- "\n1:\n\t" \
- ".long ( 4f - 1b )\n\t" \
-- ".long %a0\n\t" \
-+ ".long %c0\n\t" \
- ".long ( 2f - 1b )\n\t" \
- ".long ( 3f - 1b )\n\t" \
-- ".long %a1\n\t" \
-+ ".long %c1\n\t" \
- "\n2:\t.asciz \"" __einfo_desc ( einfo ) "\"\n\t" \
- "\n3:\t.asciz \"" __FILE__ "\"\n\t" \
- ".align 8\n\t" \
diff --git a/main/apache-mod-auth-kerb/mod_auth_kerb.patch b/main/apache-mod-auth-kerb/mod_auth_kerb.patch
deleted file mode 100644
index 350a393cd4..0000000000
--- a/main/apache-mod-auth-kerb/mod_auth_kerb.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 36f6046..41d4887 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -13,7 +13,7 @@ CFLAGS =
- all: src/mod_auth_kerb.so
-
- src/mod_auth_kerb.so: src/mod_auth_kerb.c $(SPNEGO_SRCS)
-- ./apxs.sh "${CPPFLAGS}" "${LDFLAGS}" "${SPNEGO_SRCS}" "${APXS}" "-c" "src/mod_auth_kerb.c"
-+ apxs -c ${CPPFLAGS} ${LDFLAGS} mod_auth_kerb.s
-
- install:
- ./apxs.sh "${CPPFLAGS}" "${LDFLAGS}" "${SPNEGO_SRCS}" "${APXS}" "-c -i" "src/mod_auth_kerb.c"
diff --git a/main/at-spi2-atk/bridge-default-off.patch b/main/at-spi2-atk/bridge-default-off.patch
deleted file mode 100644
index f5fc4a9002..0000000000
--- a/main/at-spi2-atk/bridge-default-off.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -Naur a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
---- a/atk-adaptor/bridge.c 2018-09-03 22:29:05.000000000 +0100
-+++ b/atk-adaptor/bridge.c 2019-02-24 20:10:53.941760839 +0000
-@@ -916,7 +916,7 @@
- /*
- * Checks the status of the environment variables
- *
-- * At this moment it only checks NO_AT_BRIDGE
-+ * At this moment it only checks AT_BRIDGE
- *
- * Returns TRUE if there isn't anything on the environment preventing
- * you to load the bridge, FALSE otherwise
-@@ -926,12 +926,12 @@
- {
- const gchar *envvar;
-
-- envvar = g_getenv ("NO_AT_BRIDGE");
-+ envvar = g_getenv ("AT_BRIDGE");
-
- if (envvar && atoi (envvar) == 1)
-- return FALSE;
-- else
- return TRUE;
-+ else
-+ return FALSE;
- }
-
- void
diff --git a/main/audit/0001-auditctl-include-headers-to-make-build-work-with-mus.patch b/main/audit/0001-auditctl-include-headers-to-make-build-work-with-mus.patch
deleted file mode 100644
index 94614afce4..0000000000
--- a/main/audit/0001-auditctl-include-headers-to-make-build-work-with-mus.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 49ed6ac0e07bc30231ce53ca5a5e150fccd4d860 Mon Sep 17 00:00:00 2001
-From: Tycho Andersen <tycho@docker.com>
-Date: Mon, 13 Mar 2017 22:44:19 +0000
-Subject: [PATCH 1/4] auditctl: include headers to make build work with musl
-
-technically select is defined in sys/select.h, and `struct timeval`
-requires sys/time.h
-
-Signed-off-by: Tycho Andersen <tycho@docker.com>
----
- src/auditctl.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/auditctl.c b/src/auditctl.c
-index 04765f4..07701f9 100644
---- a/src/auditctl.c
-+++ b/src/auditctl.c
-@@ -32,6 +32,8 @@
- #include <ctype.h>
- #include <unistd.h>
- #include <sys/utsname.h>
-+#include <sys/select.h>
-+#include <sys/time.h>
- #include <fcntl.h>
- #include <errno.h>
- #include <libgen.h> /* For basename */
---
-2.13.1
-
diff --git a/main/audit/0004-audisp-audispd.c-Include-limits.h-for-PATH_MAX.patch b/main/audit/0004-audisp-audispd.c-Include-limits.h-for-PATH_MAX.patch
deleted file mode 100644
index 72baf90013..0000000000
--- a/main/audit/0004-audisp-audispd.c-Include-limits.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 8c803432699a815349c73630e620d5eaa4a16727 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Mon, 19 Jun 2017 21:14:24 -0400
-Subject: [PATCH 4/4] audisp/audispd.c: Include <limits.h> for PATH_MAX
-
----
- audisp/audispd.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/audisp/audispd.c b/audisp/audispd.c
-index 9831cf3..329b629 100644
---- a/audisp/audispd.c
-+++ b/audisp/audispd.c
-@@ -34,6 +34,7 @@
- #include <sys/poll.h>
- #include <netdb.h>
- #include <arpa/inet.h>
-+#include <limits.h>
-
- #include "audispd-config.h"
- #include "audispd-pconfig.h"
---
-2.13.1
-
diff --git a/main/avahi/initscripts.patch b/main/avahi/initscripts.patch
deleted file mode 100644
index 157c195708..0000000000
--- a/main/avahi/initscripts.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/initscript/gentoo/avahi-daemon.in b/initscript/gentoo/avahi-daemon.in
-index 02eefe6..a430eb5 100644
---- a/initscript/gentoo/avahi-daemon.in
-+++ b/initscript/gentoo/avahi-daemon.in
-@@ -2,12 +2,12 @@
- # Copyright 1999-2007 Gentoo Foundation
- # Distributed under the terms of the GNU General Public License v2
-
--opts="reload"
-+extra_started_commands="reload"
-
- depend() {
- before netmount nfsmount
- use net
-- need dbus
-+ need dbus hostname
- }
-
- start() {
-diff --git a/initscript/gentoo/avahi-dnsconfd.in b/initscript/gentoo/avahi-dnsconfd.in
-index 376067e..dff914c 100644
---- a/initscript/gentoo/avahi-dnsconfd.in
-+++ b/initscript/gentoo/avahi-dnsconfd.in
-@@ -2,7 +2,7 @@
- # Copyright 1999-2007 Gentoo Foundation
- # Distributed under the terms of the GNU General Public License v2
-
--opts="reload"
-+extra_started_commands="reload"
-
- depend() {
- need avahi-daemon
diff --git a/main/awstats/CVE-2017-1000501-1.patch b/main/awstats/CVE-2017-1000501-1.patch
deleted file mode 100644
index 36b6aaa818..0000000000
--- a/main/awstats/CVE-2017-1000501-1.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From cf219843a74c951bf5986f3a7fffa3dcf99c3899 Mon Sep 17 00:00:00 2001
-From: Laurent Destailleur <eldy@destailleur.fr>
-Date: Sun, 17 Dec 2017 12:55:48 +0100
-Subject: [PATCH] FIX Security reported by cPanel Security Team (can execute
- arbitraty code)
-
----
- wwwroot/cgi-bin/awstats.pl | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
-index 091d6823..fca4900f 100755
---- a/wwwroot/cgi-bin/awstats.pl
-+++ b/wwwroot/cgi-bin/awstats.pl
-@@ -1780,7 +1780,7 @@ sub Read_Config {
- }else{if ($Debug){debug("Unable to open config file: $searchdir$SiteConfig", 2);}}
- }
-
-- #CL - Added to open config if full path is passed to awstats
-+ #CL - Added to open config if full path is passed to awstats
- if ( !$FileConfig ) {
-
- my $SiteConfigBis = File::Spec->rel2abs($SiteConfig);
-@@ -2205,7 +2205,10 @@ sub Parse_Config {
- }
-
- # Plugins
-- if ( $param =~ /^LoadPlugin/ ) { push @PluginsToLoad, $value; next; }
-+ if ( $param =~ /^LoadPlugin/ ) {
-+ $value =~ s/[^a-zA-Z0-9_\/\.\+:=\?\s%\-]//g; # Sanitize plugin name and string param because it is used later in an eval.
-+ push @PluginsToLoad, $value; next;
-+ }
-
- # Other parameter checks we need to put after MaxNbOfExtra and MinHitExtra
- if ( $param =~ /^MaxNbOf(\w+)/ ) { $MaxNbOf{$1} = $value; next; }
-@@ -3251,7 +3254,7 @@ sub Read_Plugins {
- }
- my $ret; # To get init return
- my $initfunction =
-- "\$ret=Init_$pluginname('$pluginparam')";
-+ "\$ret=Init_$pluginname('$pluginparam')"; # Note that pluginname and pluginparam were sanitized when reading cong file entry 'LoadPlugin'
- my $initret = eval("$initfunction");
- if ( $initret && $initret eq 'xxx' ) {
- $initret =
-@@ -17140,7 +17143,10 @@ sub HTMLMainExtra{
- # No update but report by default when run from a browser
- $UpdateStats = ( $QueryString =~ /update=1/i ? 1 : 0 );
-
-- if ( $QueryString =~ /config=([^&]+)/i ) { $SiteConfig = &Sanitize("$1"); }
-+ if ( $QueryString =~ /config=([^&]+)/i ) {
-+ $SiteConfig = &Sanitize("$1");
-+ $SiteConfig =~ s/\.\.//g; # Avoid directory transversal
-+ }
- if ( $QueryString =~ /diricons=([^&]+)/i ) { $DirIcons = "$1"; }
- if ( $QueryString =~ /pluginmode=([^&]+)/i ) {
- $PluginMode = &Sanitize( "$1", 1 );
-@@ -17227,7 +17233,10 @@ sub HTMLMainExtra{
- # Update with no report by default when run from command line
- $UpdateStats = 1;
-
-- if ( $QueryString =~ /config=([^&]+)/i ) { $SiteConfig = &Sanitize("$1"); }
-+ if ( $QueryString =~ /config=([^&]+)/i ) {
-+ $SiteConfig = &Sanitize("$1");
-+ $SiteConfig =~ s/\.\.//g;
-+ }
- if ( $QueryString =~ /diricons=([^&]+)/i ) { $DirIcons = "$1"; }
- if ( $QueryString =~ /pluginmode=([^&]+)/i ) {
- $PluginMode = &Sanitize( "$1", 1 );
diff --git a/main/awstats/CVE-2017-1000501-2.patch b/main/awstats/CVE-2017-1000501-2.patch
deleted file mode 100644
index cbf070e02a..0000000000
--- a/main/awstats/CVE-2017-1000501-2.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 06c0ab29c1e5059d9e0279c6b64d573d619e1651 Mon Sep 17 00:00:00 2001
-From: Laurent Destailleur <eldy@destailleur.fr>
-Date: Wed, 27 Dec 2017 13:39:57 +0100
-Subject: [PATCH] Fix another vulnerability reported by cPanel Security Team
- (can execute arbitraty code)
-
----
- wwwroot/cgi-bin/awstats.pl | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
-index fca4900f..4f14c6ee 100755
---- a/wwwroot/cgi-bin/awstats.pl
-+++ b/wwwroot/cgi-bin/awstats.pl
-@@ -17145,7 +17145,6 @@ sub HTMLMainExtra{
-
- if ( $QueryString =~ /config=([^&]+)/i ) {
- $SiteConfig = &Sanitize("$1");
-- $SiteConfig =~ s/\.\.//g; # Avoid directory transversal
- }
- if ( $QueryString =~ /diricons=([^&]+)/i ) { $DirIcons = "$1"; }
- if ( $QueryString =~ /pluginmode=([^&]+)/i ) {
-@@ -17191,10 +17190,13 @@ sub HTMLMainExtra{
- # If migrate
- if ( $QueryString =~ /(^|-|&|&amp;)migrate=([^&]+)/i ) {
- $MigrateStats = &Sanitize("$2");
-+
- $MigrateStats =~ /^(.*)$PROG(\d{0,2})(\d\d)(\d\d\d\d)(.*)\.txt$/;
-- $SiteConfig = $5 ? $5 : 'xxx';
-+ $SiteConfig = &Sanitize($5 ? $5 : 'xxx');
- $SiteConfig =~ s/^\.//; # SiteConfig is used to find config file
- }
-+
-+ $SiteConfig =~ s/\.\.//g; # Avoid directory transversal
- }
- else { # Run from command line
- $DebugMessages = 1;
-@@ -17204,9 +17206,10 @@ sub HTMLMainExtra{
-
- # If migrate
- if ( $ARGV[$_] =~ /(^|-|&|&amp;)migrate=([^&]+)/i ) {
-- $MigrateStats = "$2";
-+ $MigrateStats = &Sanitize("$2");
-+
- $MigrateStats =~ /^(.*)$PROG(\d{0,2})(\d\d)(\d\d\d\d)(.*)\.txt$/;
-- $SiteConfig = $5 ? $5 : 'xxx';
-+ $SiteConfig = &Sanitize($5 ? $5 : 'xxx');
- $SiteConfig =~ s/^\.//; # SiteConfig is used to find config file
- next;
- }
-@@ -17235,7 +17238,6 @@ sub HTMLMainExtra{
-
- if ( $QueryString =~ /config=([^&]+)/i ) {
- $SiteConfig = &Sanitize("$1");
-- $SiteConfig =~ s/\.\.//g;
- }
- if ( $QueryString =~ /diricons=([^&]+)/i ) { $DirIcons = "$1"; }
- if ( $QueryString =~ /pluginmode=([^&]+)/i ) {
-@@ -17301,6 +17303,8 @@ sub HTMLMainExtra{
- $ShowDirectOrigin = 1;
- $QueryString =~ s/showdirectorigin[^&]*//i;
- }
-+
-+ $SiteConfig =~ s/\.\.//g;
- }
- if ( $QueryString =~ /(^|&|&amp;)staticlinks/i ) {
- $StaticLinks = "$PROG.$SiteConfig";
diff --git a/main/cdw/cdw_fs.c.patch b/main/cdw/cdw_fs.c.patch
deleted file mode 100644
index a7ddfd9394..0000000000
--- a/main/cdw/cdw_fs.c.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cdw-0.8.0/src/native_file_system/cdw_fs.c
-+++ cdw-0.8.0/src/native_file_system/cdw_fs.c.changed
-@@ -24,6 +24,8 @@
- #include <string.h>
- #include <errno.h>
- #include <stdlib.h>
-+#include <limits.h>
-+#include <paths.h>
-
- #include "cdw_fs.h"
- #include "cdw_file_picker.h"
diff --git a/main/cdw/main.c.patch b/main/cdw/main.c.patch
deleted file mode 100644
index b9ff47346c..0000000000
--- a/main/cdw/main.c.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- cdw-0.8.0/src/main.c
-+++ cdw-0.8.0/src/main.c.changed
-@@ -44,9 +44,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <mcheck.h>
-+/* #include <mcheck.h> */
- #include <signal.h> /* sig_atomic_t */
--
-+#include <limits.h>
- #include <dirent.h> /* PATH_MAX */
-
- #include "main.h"
diff --git a/main/charybdis/fix-ratbox-errors.patch b/main/charybdis/fix-ratbox-errors.patch
deleted file mode 100644
index a22c562f55..0000000000
--- a/main/charybdis/fix-ratbox-errors.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- charybdis-3.4.2.orig/libratbox/src/commio.c
-+++ charybdis-3.4.2/libratbox/src/commio.c
-@@ -2221,7 +2221,7 @@
- char empty = '0';
- char *buf;
-
-- memset(&msg, 0, sizeof(&msg));
-+ memset(&msg, 0, sizeof(msg));
- if(datasize == 0)
- {
- iov[0].iov_base = &empty;
---- charybdis-3.4.2.orig/libratbox/src/epoll.c
-+++ charybdis-3.4.2/libratbox/src/epoll.c
-@@ -405,7 +405,7 @@
- struct sigevent ev;
- struct itimerspec ts;
-
-- memset(&ev, 0, sizeof(&ev));
-+ memset(&ev, 0, sizeof(ev));
- event->comm_ptr = rb_malloc(sizeof(timer_t));
- id = event->comm_ptr;
- ev.sigev_notify = SIGEV_SIGNAL;
---- charybdis-3.4.2.orig/libratbox/src/sigio.c
-+++ charybdis-3.4.2/libratbox/src/sigio.c
-@@ -412,7 +412,7 @@
- if(can_do_event <= 0)
- return 0;
-
-- memset(&ev, 0, sizeof(&ev));
-+ memset(&ev, 0, sizeof(ev));
- event->comm_ptr = rb_malloc(sizeof(timer_t));
- id = event->comm_ptr;
- ev.sigev_notify = SIGEV_SIGNAL;
diff --git a/main/cvechecker/cvecheck-c.patch b/main/cvechecker/cvecheck-c.patch
deleted file mode 100644
index 32ac856f12..0000000000
--- a/main/cvechecker/cvecheck-c.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- cvechecker-3.1/src/cvecheck.c
-+++ cvechecker-3.1/src/cvecheck.c
-@@ -1255,6 +1255,7 @@
- }
-
- cvelist = fopen(arg->cvedata, "r");
-+ bzero (buffer, BUFFERSIZE);
- while (fgets(buffer, sizeof(buffer), cvelist) != 0) {
- int cvelength = 0;
-
-@@ -1302,6 +1303,7 @@
- mysql_dbimpl_store_cve_in_db_checkpoint(ws);
- };
- linenum++;
-+ bzero (buffer, BUFFERSIZE);
- };
-
- if (ws->dbtype == sqlite)
diff --git a/main/distcc/distcc-3.1-clone.patch b/main/distcc/distcc-3.1-clone.patch
deleted file mode 100644
index 70e8f8351f..0000000000
--- a/main/distcc/distcc-3.1-clone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- distcc-3.1.orig/lzo/minilzo.c Mon Jan 12 09:05:53 2009
-+++ distcc-3.1/lzo/minilzo.c Mon Jan 12 10:27:02 2009
-@@ -1298,9 +1298,9 @@
- #if defined(__LZO_CHECKER)
- return 0;
- #else
-- const int clone[] = {1, 2, 0};
-+ const int _clone[] = {1, 2, 0};
- const int *q;
-- q = clone;
-+ q = _clone;
- return (*q) ? 0 : 1;
- #endif
- }
diff --git a/main/email/email-3.1.0-doc.patch b/main/email/email-3.1.0-doc.patch
deleted file mode 100644
index d7467844f0..0000000000
--- a/main/email/email-3.1.0-doc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- email-3.1.0.orig/configure.in Thu Jan 1 12:00:53 2009
-+++ email-3.1.0/configure.in Thu Jan 1 12:01:16 2009
-@@ -65,7 +65,6 @@
- CFLAGS="$CFLAGS -DUSE_GNU_STRFTIME"
- fi
-
--AC_SUBST(docdir, ["\${prefix}/doc/email-${version}"])
- AC_SUBST(ver, ["$version"])
-
- CFLAGS="$CFLAGS -I$cwd -I$cwd/src -I$cwd/include -I../include -I$cwd/dlib/include"
diff --git a/main/email/email-3.1.0-ldflags.patch b/main/email/email-3.1.0-ldflags.patch
deleted file mode 100644
index d08896ee3a..0000000000
--- a/main/email/email-3.1.0-ldflags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- email-3.1.0.orig/src/Makefile.in Tue Dec 30 13:16:08 2008
-+++ email-3.1.0/src/Makefile.in Tue Dec 30 13:17:00 2008
-@@ -18,7 +18,7 @@
- remotesmtp.o sig_file.o smtpcommands.o utils.o
-
- all: $(FILES)
-- $(CC) $(CFLAGS) -o email $(FILES) $(OTHER_FILES) $(LDFLAGS) $(LIBS) $(DLIB)
-+ $(CC) $(CFLAGS) -o email $(FILES) $(OTHER_FILES) $(DLIB) $(LDFLAGS) $(LIBS)
-
- clean:
- rm -f *.o *.d email
diff --git a/main/expat/CVE-2019-15903.patch b/main/expat/CVE-2019-15903.patch
deleted file mode 100644
index bfba7a87b4..0000000000
--- a/main/expat/CVE-2019-15903.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/lib/xmlparse.c b/lib/xmlparse.c
-index 9c0987f..b8656ca 100644
---- a/lib/xmlparse.c
-+++ b/lib/xmlparse.c
-@@ -405,7 +405,7 @@ initializeEncoding(XML_Parser parser);
- static enum XML_Error
- doProlog(XML_Parser parser, const ENCODING *enc, const char *s,
- const char *end, int tok, const char *next, const char **nextPtr,
-- XML_Bool haveMore);
-+ XML_Bool haveMore, XML_Bool allowClosingDoctype);
- static enum XML_Error
- processInternalEntity(XML_Parser parser, ENTITY *entity,
- XML_Bool betweenDecl);
-@@ -4232,7 +4232,7 @@ externalParEntProcessor(XML_Parser parser,
-
- parser->m_processor = prologProcessor;
- return doProlog(parser, parser->m_encoding, s, end, tok, next,
-- nextPtr, (XML_Bool)!parser->m_parsingStatus.finalBuffer);
-+ nextPtr, (XML_Bool)!parser->m_parsingStatus.finalBuffer, XML_TRUE);
- }
-
- static enum XML_Error PTRCALL
-@@ -4282,7 +4282,7 @@ prologProcessor(XML_Parser parser,
- const char *next = s;
- int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
- return doProlog(parser, parser->m_encoding, s, end, tok, next,
-- nextPtr, (XML_Bool)!parser->m_parsingStatus.finalBuffer);
-+ nextPtr, (XML_Bool)!parser->m_parsingStatus.finalBuffer, XML_TRUE);
- }
-
- static enum XML_Error
-@@ -4293,7 +4293,7 @@ doProlog(XML_Parser parser,
- int tok,
- const char *next,
- const char **nextPtr,
-- XML_Bool haveMore)
-+ XML_Bool haveMore, XML_Bool allowClosingDoctype)
- {
- #ifdef XML_DTD
- static const XML_Char externalSubsetName[] = { ASCII_HASH , '\0' };
-@@ -4472,6 +4472,11 @@ doProlog(XML_Parser parser,
- }
- break;
- case XML_ROLE_DOCTYPE_CLOSE:
-+ if (allowClosingDoctype != XML_TRUE) {
-+ /* Must not close doctype from within expanded parameter entities */
-+ return XML_ERROR_INVALID_TOKEN;
-+ }
-+
- if (parser->m_doctypeName) {
- parser->m_startDoctypeDeclHandler(parser->m_handlerArg, parser->m_doctypeName,
- parser->m_doctypeSysid, parser->m_doctypePubid, 0);
-@@ -5409,7 +5414,7 @@ processInternalEntity(XML_Parser parser, ENTITY *entity,
- if (entity->is_param) {
- int tok = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
- result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd, tok,
-- next, &next, XML_FALSE);
-+ next, &next, XML_FALSE, XML_FALSE);
- }
- else
- #endif /* XML_DTD */
-@@ -5456,7 +5461,7 @@ internalEntityProcessor(XML_Parser parser,
- if (entity->is_param) {
- int tok = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
- result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd, tok,
-- next, &next, XML_FALSE);
-+ next, &next, XML_FALSE, XML_FALSE);
- }
- else
- #endif /* XML_DTD */
-@@ -5483,7 +5488,7 @@ internalEntityProcessor(XML_Parser parser,
- parser->m_processor = prologProcessor;
- tok = XmlPrologTok(parser->m_encoding, s, end, &next);
- return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
-- (XML_Bool)!parser->m_parsingStatus.finalBuffer);
-+ (XML_Bool)!parser->m_parsingStatus.finalBuffer, XML_TRUE);
- }
- else
- #endif /* XML_DTD */
-
diff --git a/main/fakeroot/fakeroot-uclibc.patch b/main/fakeroot/fakeroot-uclibc.patch
deleted file mode 100644
index 63708092d5..0000000000
--- a/main/fakeroot/fakeroot-uclibc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- fakeroot-1.18.2.orig/libfakeroot.c
-+++ fakeroot-1.18.2/libfakeroot.c
-@@ -1551,7 +1551,7 @@
- #endif /* LIBFAKEROOT_DEBUGGING */
- r=next_fts_read(ftsp);
- if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
--# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
-+# if defined(STAT64_SUPPORT) && !defined(__APPLE__) && !defined(__UCLIBC__)
- SEND_GET_STAT64(r->fts_statp, _STAT_VER);
- # else
- SEND_GET_STAT(r->fts_statp, _STAT_VER);
-@@ -1574,7 +1574,7 @@
- first=next_fts_children(ftsp, options);
- for(r = first; r; r = r->fts_link) {
- if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
--# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
-+# if defined(STAT64_SUPPORT) && !defined(__APPLE__) && !defined(__UCLIBC__)
- SEND_GET_STAT64(r->fts_statp, _STAT_VER);
- # else
- SEND_GET_STAT(r->fts_statp, _STAT_VER);
diff --git a/main/farstream/gtk-doc.patch b/main/farstream/gtk-doc.patch
deleted file mode 100644
index 7414b1a929..0000000000
--- a/main/farstream/gtk-doc.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 39450457190675716c8e66700e35b05334a6a1a0 Mon Sep 17 00:00:00 2001
-From: Olivier Crête <olivier.crete@collabora.com>
-Date: Fri, 25 May 2012 21:06:59 +0000
-Subject: Gtk-doc tags belong after the description
-
----
-diff --git a/farstream/fs-session.c b/farstream/fs-session.c
-index 80794d1..abb1bc3 100644
---- a/farstream/fs-session.c
-+++ b/farstream/fs-session.c
-@@ -270,9 +270,6 @@ fs_session_class_init (FsSessionClass *klass)
- /**
- * FsSession:codec-preferences:
- *
-- * Type: GLib.List(FsCodec)
-- * Transfer: full
-- *
- * This is the current preferences list for the local codecs. It is
- * set by the user to specify the codec options and priorities. The user may
- * change its value with fs_session_set_codec_preferences() at any time
-@@ -283,6 +280,9 @@ fs_session_class_init (FsSessionClass *klass)
- * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the
- * payload type of the codec will be "reserved" and not be used by any
- * dynamically assigned payload type.
-+ *
-+ * Type: GLib.List(FsCodec)
-+ * Transfer: full
- */
- g_object_class_install_property (gobject_class,
- PROP_CODEC_PREFERENCES,
-@@ -296,9 +296,6 @@ fs_session_class_init (FsSessionClass *klass)
- /**
- * FsSession:codecs:
- *
-- * Type: GLib.List(FsCodec)
-- * Transfer: full
-- *
- * This is the list of codecs used for this session. It will include the
- * codecs and payload type used to receive media on this session. It will
- * also include any configuration parameter that must be transmitted reliably
-@@ -317,6 +314,8 @@ fs_session_class_init (FsSessionClass *klass)
- * It is a #GList of #FsCodec. User must free this codec list using
- * fs_codec_list_destroy() when done.
- *
-+ * Type: GLib.List(FsCodec)
-+ * Transfer: full
- */
- g_object_class_install_property (gobject_class,
- PROP_CODECS,
-@@ -329,9 +328,6 @@ fs_session_class_init (FsSessionClass *klass)
- /**
- * FsSession:codecs-without-config:
- *
-- * Type: GLib.List(FsCodec)
-- * Transfer: full
-- *
- * This is the same list of codecs as #FsSession:codecs without
- * the configuration information that describes the data sent. It is suitable
- * for configurations where a list of codecs is shared by many senders.
-@@ -349,6 +345,8 @@ fs_session_class_init (FsSessionClass *klass)
- * It is a #GList of #FsCodec. User must free this codec list using
- * fs_codec_list_destroy() when done.
- *
-+ * Type: GLib.List(FsCodec)
-+ * Transfer: full
- */
- g_object_class_install_property (gobject_class,
- PROP_CODECS_WITHOUT_CONFIG,
-diff --git a/farstream/fs-stream.c b/farstream/fs-stream.c
-index b9e1320..110641d 100644
---- a/farstream/fs-stream.c
-+++ b/farstream/fs-stream.c
-@@ -176,13 +176,12 @@ fs_stream_class_init (FsStreamClass *klass)
- /**
- * FsStream:remote-codecs:
- *
-- * Type: GLib.List(FsCodec)
-- * Transfer: full
-- *
- * This is the list of remote codecs for this stream. They must be set by the
- * user as soon as they are known using fs_stream_set_remote_codecs()
- * (generally through external signaling). It is a #GList of #FsCodec.
- *
-+ * Type: GLib.List(FsCodec)
-+ * Transfer: full
- */
- g_object_class_install_property (gobject_class,
- PROP_REMOTE_CODECS,
-@@ -195,15 +194,14 @@ fs_stream_class_init (FsStreamClass *klass)
- /**
- * FsStream:negotiated-codecs:
- *
-- * Type: GLib.List(FsCodec)
-- * Transfer: full
-- *
- * This is the list of negotiatied codecs, it is the same list as the list
- * of #FsCodec from the parent #FsSession, except that the codec config data
- * has been replaced with the data from the remote codecs for this stream.
- * This is the list of #FsCodec used to receive data from this stream.
- * It is a #GList of #FsCodec.
- *
-+ * Type: GLib.List(FsCodec)
-+ * Transfer: full
- */
- g_object_class_install_property (gobject_class,
- PROP_NEGOTIATED_CODECS,
-@@ -216,9 +214,6 @@ fs_stream_class_init (FsStreamClass *klass)
- /**
- * FsStream:current-recv-codecs:
- *
-- * Type: GLib.List(FsCodec)
-- * Transfer: full
-- *
- * This is the list of codecs that have been received by this stream.
- * The user must free the list if fs_codec_list_destroy().
- * The "farstream-recv-codecs-changed" message is send on the #GstBus
-@@ -228,6 +223,8 @@ fs_stream_class_init (FsStreamClass *klass)
- * also be emitted if the pad already exists, but the source material that
- * will come to it is different.
- *
-+ * Type: GLib.List(FsCodec)
-+ * Transfer: full
- */
- g_object_class_install_property (gobject_class,
- PROP_CURRENT_RECV_CODECS,
---
-cgit v0.9.0.3
diff --git a/main/flashrom/spi-ioctl.patch b/main/flashrom/spi-ioctl.patch
deleted file mode 100644
index 83c57d82e9..0000000000
--- a/main/flashrom/spi-ioctl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- flashrom-0.9.8.orig/linux_spi.c
-+++ flashrom-0.9.8/linux_spi.c
-@@ -26,6 +26,7 @@
- #include <errno.h>
- #include <ctype.h>
- #include <unistd.h>
-+#include <asm/ioctl.h>
- #include <linux/types.h>
- #include <linux/spi/spidev.h>
- #include <sys/ioctl.h>
---- flashrom-0.9.8.orig/linux_spi.c
-+++ flashrom-0.9.8/linux_spi.c
-@@ -22,7 +22,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <errno.h>
- #include <ctype.h>
- #include <unistd.h>
---- flashrom-0.9.8.orig/hwaccess.h
-+++ flashrom-0.9.8/hwaccess.h
-@@ -25,9 +25,7 @@
- #define __HWACCESS_H__ 1
-
- #if IS_X86
--#if defined(__GLIBC__)
- #include <sys/io.h>
--#endif
- #endif
-
- #if NEED_PCI == 1
diff --git a/main/fontconfig/locale.patch b/main/fontconfig/locale.patch
deleted file mode 100644
index 327f6b35ba..0000000000
--- a/main/fontconfig/locale.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f Mon Sep 17 00:00:00 2001
-From: Akira TAGOH <akira@tagoh.org>
-Date: Wed, 14 Mar 2018 12:35:05 +0900
-Subject: Do not override locale if already set by app
-
-https://bugs.freedesktop.org/show_bug.cgi?id=105492
----
- src/fccfg.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/fccfg.c b/src/fccfg.c
-index eb0b76d..e311f17 100644
---- a/src/fccfg.c
-+++ b/src/fccfg.c
-@@ -45,11 +45,16 @@ retry_locale:
- is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
- if (!is_locale_initialized)
- {
-+ char *loc;
-+
- is_locale_initialized = FcTrue;
- if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
- (void *)(intptr_t) is_locale_initialized))
- goto retry_locale;
-- setlocale (LC_ALL, "");
-+
-+ loc = setlocale (LC_ALL, NULL);
-+ if (!loc || strcmp (loc, "C") == 0)
-+ setlocale (LC_ALL, "");
- }
- retry_config:
- config = fc_atomic_ptr_get (&_fcConfig);
---
-cgit v1.1
-
-From 98eaef69af1350e459bf9c175476d3b772968874 Mon Sep 17 00:00:00 2001
-From: Akira TAGOH <akira@tagoh.org>
-Date: Thu, 15 Mar 2018 12:17:52 +0900
-Subject: Leave the locale setting to applications
-
-https://bugs.freedesktop.org/show_bug.cgi?id=105492
----
- fc-conflist/fc-conflist.c | 2 ++
- src/fccfg.c | 22 ++--------------------
- 2 files changed, 4 insertions(+), 20 deletions(-)
-
-diff --git a/fc-conflist/fc-conflist.c b/fc-conflist/fc-conflist.c
-index d02273b..5c40a0f 100644
---- a/fc-conflist/fc-conflist.c
-+++ b/fc-conflist/fc-conflist.c
-@@ -38,6 +38,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <locale.h>
-
- #ifdef ENABLE_NLS
- #include <libintl.h>
-@@ -102,6 +103,7 @@ main (int argc, char **argv)
- #if HAVE_GETOPT_LONG || HAVE_GETOPT
- int c;
-
-+ setlocale (LC_ALL, "");
- #if HAVE_GETOPT_LONG
- while ((c = getopt_long (argc, argv, "Vh", longopts, NULL)) != -1)
- #else
-diff --git a/src/fccfg.c b/src/fccfg.c
-index e311f17..e35c451 100644
---- a/src/fccfg.c
-+++ b/src/fccfg.c
-@@ -26,7 +26,6 @@
-
- #include "fcint.h"
- #include <dirent.h>
--#include <locale.h>
- #include <sys/types.h>
-
- #if defined (_WIN32) && !defined (R_OK)
-@@ -39,24 +38,7 @@ static FcConfig *
- FcConfigEnsure (void)
- {
- FcConfig *config;
-- FcBool is_locale_initialized;
-- static void *static_is_locale_initialized;
--retry_locale:
-- is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
-- if (!is_locale_initialized)
-- {
-- char *loc;
--
-- is_locale_initialized = FcTrue;
-- if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
-- (void *)(intptr_t) is_locale_initialized))
-- goto retry_locale;
--
-- loc = setlocale (LC_ALL, NULL);
-- if (!loc || strcmp (loc, "C") == 0)
-- setlocale (LC_ALL, "");
-- }
--retry_config:
-+retry:
- config = fc_atomic_ptr_get (&_fcConfig);
- if (!config)
- {
-@@ -64,7 +46,7 @@ retry_config:
-
- if (!fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) {
- FcConfigDestroy (config);
-- goto retry_config;
-+ goto retry;
- }
- }
- return config;
---
-cgit v1.1
-
diff --git a/main/fts/00-static-and-shared-libs.patch b/main/fts/00-static-and-shared-libs.patch
deleted file mode 100644
index b65b1d0d67..0000000000
--- a/main/fts/00-static-and-shared-libs.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/.gitignore b/.gitignore
-index 528fe32..663e6bb 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -10,4 +10,5 @@ config.status
- configure
- depcomp
- install-sh
-+ltmain.sh
- missing
-diff --git a/Makefile.am b/Makefile.am
-index aa93562..f09994e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,5 +1,5 @@
- ## Makefile.am - procress this file with automake to produce Makefile.in
--lib_LIBRARIES = libfts.a
--libfts_a_SOURCES = fts.c
--libfts_a_HEADERS = fts.h
--libfts_adir = $(includedir)
-+lib_LTLIBRARIES = libfts.la
-+libfts_la_SOURCES = fts.c
-+libfts_la_HEADERS = fts.h
-+libfts_ladir = $(includedir)
-diff --git a/bootstrap.sh b/bootstrap.sh
-index 9e026b5..cd4a585 100755
---- a/bootstrap.sh
-+++ b/bootstrap.sh
-@@ -1,4 +1,5 @@
- #!/bin/sh
-+libtoolize
- aclocal
- autoconf
- automake --add-missing
-diff --git a/configure.ac b/configure.ac
-index 28dd6c6..6f12859 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -7,7 +7,9 @@ AC_INIT([fts], [1.1], [Jürgen Buchmüller <pullmoll@t-online.de>])
- AM_INIT_AUTOMAKE([1.15])
-
- AC_PROG_CC
--AC_PROG_RANLIB
-+AC_PROG_LIBTOOL
-+
-+LT_INIT
-
- AC_CHECK_HEADERS(assert.h dirent.h errno.h fcntl.h stdlib.h string.h unistd.h sys/param.h sys/stat.h)
-
diff --git a/main/ghostscript/fix-alignment.patch b/main/ghostscript/fix-alignment.patch
deleted file mode 100644
index 2608a0a083..0000000000
--- a/main/ghostscript/fix-alignment.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ghostscript-9.21/base/gxht_thresh.c.orig 2017-04-13 13:39:39.850641972 +0300
-+++ ghostscript-9.21/base/gxht_thresh.c 2017-04-13 13:39:50.380785619 +0300
-@@ -38,7 +38,7 @@
- /* #define PACIFY_VALGRIND */
-
- #ifndef __WIN32__
--#define __align16 __attribute__((align(16)))
-+#define __align16 __attribute__((aligned(16)))
- #else
- #define __align16 __declspec(align(16))
- #endif
diff --git a/main/graphviz/ungit-autogen.patch b/main/graphviz/ungit-autogen.patch
deleted file mode 100644
index 419a4da27c..0000000000
--- a/main/graphviz/ungit-autogen.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -1,20 +1,6 @@
- #! /bin/sh
-
--if ! GRAPHVIZ_GIT_DATE=$( git log -n 1 --format=%ci ) ; then
-- GRAPHVIZ_VERSION_DATE="0"
-- echo "Warning: build not started in a Git clone, or Git is not installed: setting version date to 0." >&2
--else
-- if ! GRAPHVIZ_VERSION_DATE=$( date -u +%Y%m%d.%H%M -d "$GRAPHVIZ_GIT_DATE" 2>/dev/null ) ; then
-- # try date with FreeBSD syntax
-- if ! GRAPHVIZ_VERSION_DATE=$( date -u -j -f "%Y-%m-%d %H:%M:%S %z" "$GRAPHVIZ_GIT_DATE" +%Y%m%d.%H%M ); then
-- echo "Warning: we do not know how to invoke date correctly." >&2
-- fi
-- fi
-- echo "Graphviz: version date is based on time of last commit: $GRAPHVIZ_VERSION_DATE"
--
-- GRAPHVIZ_VERSION_COMMIT=$( git log -n 1 --format=%h )
-- echo "Graphviz: abbreviated hash of last commit: $GRAPHVIZ_VERSION_COMMIT"
--fi
-+GRAPHVIZ_VERSION_DATE=0
-
- # initialize version for a "stable" build
- cat >./version.m4 <<EOF
diff --git a/main/gtk+2.0/automake.patch b/main/gtk+2.0/automake.patch
deleted file mode 100644
index 106597974c..0000000000
--- a/main/gtk+2.0/automake.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./configure.in.orig 2012-12-31 14:40:30.297439517 +0000
-+++ ./configure.in 2012-12-31 14:40:51.587629835 +0000
-@@ -51,7 +51,7 @@
- cflags_set=${CFLAGS+set}
-
- AM_INIT_AUTOMAKE([no-define -Wno-portability dist-bzip2])
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADER(config.h)
-
- # Support silent build rules, requires at least automake-1.11. Enable
- # by either passing --enable-silent-rules to configure or passing V=0
-@@ -300,7 +300,6 @@
-
- # Checks for programs.
- AC_ISC_POSIX
--AM_PROG_CC_STDC
- AM_PROG_CC_C_O
- AC_PROG_INSTALL
- AC_PROG_MAKE_SET
diff --git a/main/hylafax/CVE-2018-17141.patch b/main/hylafax/CVE-2018-17141.patch
deleted file mode 100644
index a4ebd446ed..0000000000
--- a/main/hylafax/CVE-2018-17141.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From: Patrice Fournier <patrice.fournier@ifax.com>
-Date: Tue, 18 Sep 2018 03:00:53 +0000 (-0400)
-Subject: Address CVE-2018-17141 and fixes a few vulnerabilities in code supporting JPEG
-X-Git-Tag: HYLAFAX-6_0_7~1
-X-Git-Url: http://git.hylafax.org/HylaFAX?a=commitdiff_plain;h=82fa7bdbffc253de4d3e80a87d47fdbf68eabe36;hp=5b95b384dd1b44b9d2c5c15cc10e50def7c1555d
-
-Address CVE-2018-17141 and fixes a few vulnerabilities in code supporting JPEG
-
-These changes are adapted from Lee's fix for this vulnerability.
-
-Luis Merino, Markus Vervier, and Eric Sesterhenn of X41 D-SEC GmbH
-(Security Advisory: X41-2018-008) discovered an uninitialized pointer write
-and also an out-of-bounds write in FaxModem::writeECMData() that could lead
-to remote code execution with a specially-crafted fax sender.
-
-These changes fix the coding errors and deliberately prevent malicious and
-malfunctioning senders from inadvertently or deliberately setting JPEG and
-MH/MR/MMR/JBIG formats in the same DCS signal.
----
-
-diff --git a/faxd/Class2.c++ b/faxd/Class2.c++
-index 9bd312d..6439719 100644
---- a/faxd/Class2.c++
-+++ b/faxd/Class2.c++
-@@ -485,6 +485,15 @@ Class2Modem::parseClass2Capabilities(const char* cap, Class2Params& params, bool
- } else {
- if (jpscan == 0x1) params.jp = JP_GREY;
- else if (jpscan & 0x2) params.jp = JP_COLOR;
-+ /*
-+ * ITU T.30 does not specify that bits 16 (MR) or 31 (MMR) must be set to zero if color fax is used;
-+ * and ITU T.32 Table 21 provides a data field, "JP", for JPEG support separate from "DF" for data
-+ * format and does not specify that DF is meaningless in DCS when JP is used; but because T.4/T.6
-+ * (MH/MR/MMR), JBIG, and JPEG are distinct formats from each other, we must conclude that any
-+ * indication of JPEG in DCS must, therefore, invalidate any indication in DCS of MH/MR/MMR/JBIG.
-+ * Otherwise, having both df and jp be non-zero will be confusing and possibly cause problems.
-+ */
-+ if (params.jp != JP_NONE) params.df = 0; // Yes, this is DF_1DMH, but there is no "DF_NONE".
- }
- return (true);
- } else {
-diff --git a/faxd/CopyQuality.c++ b/faxd/CopyQuality.c++
-index 6ebc936..d1f2d0f 100644
---- a/faxd/CopyQuality.c++
-+++ b/faxd/CopyQuality.c++
-@@ -38,6 +38,7 @@
- #include <ctype.h>
-
- #define RCVBUFSIZ (32*1024) // XXX
-+#define COLORBUFSIZ (2000*1024) // 1MB is not big enough
-
- static void setupCompression(TIFF*, u_int, u_int, uint32);
-
-@@ -356,7 +357,7 @@ FaxModem::recvPageDLEData(TIFF* tif, bool checkQuality,
- * rather fax-specific.
- */
- recvEOLCount = 0;
-- recvRow = (u_char*) malloc(1024*1000); // 1M should do it?
-+ recvRow = (u_char*) malloc(COLORBUFSIZ);
- fxAssert(recvRow != NULL, "page buffering error (JPEG page).");
- recvPageStart = recvRow;
- }
-@@ -408,8 +409,12 @@ FaxModem::recvPageDLEData(TIFF* tif, bool checkQuality,
- if (params.df == DF_JBIG) {
- flushRawData(tif, 0, (const u_char*) buf, cc);
- } else {
-- memcpy(recvRow, (const char*) buf, cc);
-- recvRow += cc;
-+ /* We don't support reception of a JPEG page bigger than COLORBUFSIZ. */
-+ if (recvRow + cc - recvPageStart > COLORBUFSIZ) cc = recvPageStart + COLORBUFSIZ - recvRow;
-+ if (cc > 0) {
-+ memcpy(recvRow, (const char*) buf, cc);
-+ recvRow += cc;
-+ }
- }
- } while (!fin);
- if (params.df == DF_JBIG) clearSDNORMCount();
-@@ -987,7 +992,7 @@ FaxModem::writeECMData(TIFF* tif, u_char* buf, u_int cc, const Class2Params& par
- case JP_GREY+4:
- case JP_COLOR+4:
- recvEOLCount = 0;
-- recvRow = (u_char*) malloc(1024*1000); // 1M should do it?
-+ recvRow = (u_char*) malloc(COLORBUFSIZ);
- fxAssert(recvRow != NULL, "page buffering error (JPEG page).");
- recvPageStart = recvRow;
- setupStartPage(tif, params);
-@@ -1039,14 +1044,20 @@ FaxModem::writeECMData(TIFF* tif, u_char* buf, u_int cc, const Class2Params& par
- }
- break;
- }
-- if (params.jp != JP_GREY && params.jp != JP_COLOR) {
-- flushRawData(tif, 0, (const u_char*) buf, cc);
-- } else {
-- memcpy(recvRow, (const char*) buf, cc);
-- recvRow += cc;
-- }
-- if (seq & 2 && (params.jp == JP_GREY || params.jp == JP_COLOR)) {
-- fixupJPEG(tif);
-+ switch (dataform) {
-+ case JP_GREY+4:
-+ case JP_COLOR+4:
-+ /* We don't support reception of a JPEG page bigger than COLORBUFSIZ. */
-+ if (recvRow + cc - recvPageStart > COLORBUFSIZ) cc = recvPageStart + COLORBUFSIZ - recvRow;
-+ if (cc > 0) {
-+ memcpy(recvRow, (const char*) buf, cc);
-+ recvRow += cc;
-+ }
-+ if (seq & 2) fixupJPEG(tif);
-+ break;
-+ default:
-+ flushRawData(tif, 0, (const u_char*) buf, cc);
-+ break;
- }
- }
-
-diff --git a/libhylafax/Class2Params.c++ b/libhylafax/Class2Params.c++
-index 0409cbd..81b9a22 100644
---- a/libhylafax/Class2Params.c++
-+++ b/libhylafax/Class2Params.c++
-@@ -303,6 +303,15 @@ Class2Params::setFromDCS(FaxParams& dcs_caps)
- if (dcs_caps.isBitEnabled(FaxParams::BITNUM_FULLCOLOR)) {
- if (jp == JP_GREY) jp = JP_COLOR;
- }
-+ /*
-+ * ITU T.30 does not specify that bits 16 (MR) or 31 (MMR) must be set to zero if color fax is used;
-+ * and ITU T.32 Table 21 provides a data field, "JP", for JPEG support separate from "DF" for data
-+ * format and does not specify that DF is meaningless in DCS when JP is used; but because T.4/T.6
-+ * (MH/MR/MMR), JBIG, and JPEG are distinct formats from each other, we must conclude that any
-+ * indication of JPEG in DCS must, therefore, invalidate any indication in DCS of MH/MR/MMR/JBIG.
-+ * Otherwise, having both df and jp be non-zero will be confusing and possibly cause problems.
-+ */
-+ if (jp != JP_NONE) df = 0; // Yes, this is DF_1DMH, but there is no "DF_NONE".
- if (ec == EC_DISABLE &&
- (df == DF_2DMMR || df == DF_JBIG || jp == JP_GREY || jp == JP_COLOR)) {
- // MMR, JBIG, and JPEG require ECM... we've seen cases where fax
diff --git a/main/hylafax/gcc8.patch b/main/hylafax/gcc8.patch
deleted file mode 100644
index 5f49d9f8e5..0000000000
--- a/main/hylafax/gcc8.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-From http://bugs.hylafax.org/show_bug.cgi?id=971
-
---- a/libhylafax/FaxRecvInfo.c++
-+++ b/libhylafax/FaxRecvInfo.c++
-@@ -112,7 +112,7 @@
- if (cp == NULL || cp[1] != ',' || cp[2] != '"')
- return (false);
- u_int i = 0;
-- while (cp+2 != '\0') {
-+ while (*(cp+2) != '\0') {
- callid[i] = cp+3; // +1 for "/+1 for ,/+1 for "
- if (*cp == '\"') break;
- callid[i].resize(callid[i].next(0,'"'));
diff --git a/main/hylafaxplus/musl-reg-startend.patch b/main/hylafaxplus/musl-reg-startend.patch
deleted file mode 100644
index f101a83d95..0000000000
--- a/main/hylafaxplus/musl-reg-startend.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/util/RE.c++ b/util/RE.c++
-index 77150e8..6a11b1c 100644
---- a/util/RE.c++
-+++ b/util/RE.c++
-@@ -77,8 +77,13 @@ RE::Find(const char* text, u_int length, u_int off)
- else {
- matches[0].rm_so = off;
- matches[0].rm_eo = length;
-- execResult = regexec(&c_pattern, text, c_pattern.re_nsub+1,
-- matches, REG_STARTEND);
-+ char newtext[length-off+1];
-+ strncpy(newtext,&text[off],length-off);
-+ newtext[length-off]='\0';
-+ execResult = regexec(&c_pattern, newtext, c_pattern.re_nsub+1,
-+ matches, 0x0);
-+ for (int j=0;j<c_pattern.re_nsub+1;j++)
-+ matches[j].rm_so+=off, matches[j].rm_eo+=off;
- }
- }
- return (execResult == 0);
diff --git a/main/icu/CVE-2017-7867-7868.patch b/main/icu/CVE-2017-7867-7868.patch
deleted file mode 100644
index df18283c2b..0000000000
--- a/main/icu/CVE-2017-7867-7868.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-Index: source/common/utext.cpp
-===================================================================
---- source/common/utext.cpp (revision 39670)
-+++ source/common/utext.cpp (revision 39671)
-@@ -848,7 +848,13 @@
-
- // Chunk size.
--// Must be less than 85, because of byte mapping from UChar indexes to native indexes.
--// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes
--// to two UChars.)
-+// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes.
-+// Worst case there are six UTF-8 bytes per UChar.
-+// obsolete 6 byte form fd + 5 trails maps to fffd
-+// obsolete 5 byte form fc + 4 trails maps to fffd
-+// non-shortest 4 byte forms maps to fffd
-+// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit
-+// mapToUChars array size must allow for the worst case, 6.
-+// This could be brought down to 4, by treating fd and fc as pure illegal,
-+// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.
- //
- enum { UTF8_TEXT_CHUNK_SIZE=32 };
-@@ -890,5 +896,5 @@
- // one for a supplementary starting in the last normal position,
- // and one for an entry for the buffer limit position.
-- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to
-+ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to
- // correspoding offset in filled part of buf.
- int32_t align;
-@@ -1033,4 +1039,5 @@
- u8b = (UTF8Buf *)ut->p; // the current buffer
- mapIndex = ix - u8b->toUCharsMapStart;
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
- ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- return TRUE;
-@@ -1299,4 +1306,8 @@
- // If index is at the end, there is no character there to look at.
- if (ix != ut->b) {
-+ // Note: this function will only move the index back if it is on a trail byte
-+ // and there is a preceding lead byte and the sequence from the lead
-+ // through this trail could be part of a valid UTF-8 sequence
-+ // Otherwise the index remains unchanged.
- U8_SET_CP_START(s8, 0, ix);
- }
-@@ -1312,5 +1323,8 @@
- uint8_t *mapToNative = u8b->mapToNative;
- uint8_t *mapToUChars = u8b->mapToUChars;
-- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
-+ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
-+ // Note that toUCharsMapStart can be negative. Happens when the remaining
-+ // text from current position to the beginning is less than the buffer size.
-+ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.
- int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region
- // at end of buffer to leave room
-@@ -1339,4 +1353,5 @@
- // Special case ASCII range for speed.
- buf[destIx] = (UChar)c;
-+ U_ASSERT(toUCharsMapStart <= srcIx);
- mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
- mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
-@@ -1368,4 +1383,5 @@
- mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;
- } while (sIx >= srcIx);
-+ U_ASSERT(toUCharsMapStart <= (srcIx+1));
-
- // Set native indexing limit to be the current position.
-@@ -1542,4 +1558,5 @@
- U_ASSERT(index<=ut->chunkNativeLimit);
- int32_t mapIndex = index - u8b->toUCharsMapStart;
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
- int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- U_ASSERT(offset>=0 && offset<=ut->chunkLength);
-Index: source/test/intltest/utxttest.cpp
-===================================================================
---- source/test/intltest/utxttest.cpp (revision 39670)
-+++ source/test/intltest/utxttest.cpp (revision 39671)
-@@ -68,4 +68,6 @@
- case 7: name = "Ticket12130";
- if (exec) Ticket12130(); break;
-+ case 8: name = "Ticket12888";
-+ if (exec) Ticket12888(); break;
- default: name = ""; break;
- }
-@@ -1584,2 +1586,62 @@
- utext_close(&ut);
- }
-+
-+// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal,
-+// six byte utf-8 forms. Original implementation had an assumption that
-+// there would be at most three utf-8 bytes per UTF-16 code unit.
-+// The five and six byte sequences map to a single replacement character.
-+
-+void UTextTest::Ticket12888() {
-+ const char *badString =
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80";
-+
-+ UErrorCode status = U_ZERO_ERROR;
-+ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status));
-+ TEST_SUCCESS(status);
-+ for (;;) {
-+ UChar32 c = utext_next32(ut.getAlias());
-+ if (c == U_SENTINEL) {
-+ break;
-+ }
-+ }
-+ int32_t endIdx = utext_getNativeIndex(ut.getAlias());
-+ if (endIdx != (int32_t)strlen(badString)) {
-+ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx);
-+ return;
-+ }
-+
-+ for (int32_t prevIndex = endIdx; prevIndex>0;) {
-+ UChar32 c = utext_previous32(ut.getAlias());
-+ int32_t currentIndex = utext_getNativeIndex(ut.getAlias());
-+ if (c != 0xfffd) {
-+ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n",
-+ __FILE__, __LINE__, 0xfffd, c, currentIndex);
-+ break;
-+ }
-+ if (currentIndex != prevIndex - 6) {
-+ errln("%s:%d: wrong index. Expected, actual = %d, %d",
-+ __FILE__, __LINE__, prevIndex - 6, currentIndex);
-+ break;
-+ }
-+ prevIndex = currentIndex;
-+ }
-+}
-Index: source/test/intltest/utxttest.h
-===================================================================
---- source/test/intltest/utxttest.h (revision 39670)
-+++ source/test/intltest/utxttest.h (revision 39671)
-@@ -39,4 +39,5 @@
- void Ticket10983();
- void Ticket12130();
-+ void Ticket12888();
-
- private:
diff --git a/main/icu/icu-58.1-iterator-reset.patch b/main/icu/icu-58.1-iterator-reset.patch
deleted file mode 100644
index 24c7fa96de..0000000000
--- a/main/icu/icu-58.1-iterator-reset.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-Index: /icu/trunk/source/common/ulist.c
-===================================================================
---- source/common/ulist.c (revision 39483)
-+++ source/common/ulist.c (revision 39484)
-@@ -30,5 +30,4 @@
-
- int32_t size;
-- int32_t currentIndex;
- };
-
-@@ -52,5 +51,4 @@
- newList->tail = NULL;
- newList->size = 0;
-- newList->currentIndex = -1;
-
- return newList;
-@@ -81,6 +79,7 @@
- p->next->previous = p->previous;
- }
-- list->curr = NULL;
-- list->currentIndex = 0;
-+ if (p == list->curr) {
-+ list->curr = p->next;
-+ }
- --list->size;
- if (p->forceDelete) {
-@@ -151,5 +150,4 @@
- list->head->previous = newItem;
- list->head = newItem;
-- list->currentIndex++;
- }
-
-@@ -194,5 +192,4 @@
- curr = list->curr;
- list->curr = curr->next;
-- list->currentIndex++;
-
- return curr->data;
-@@ -210,5 +207,4 @@
- if (list != NULL) {
- list->curr = list->head;
-- list->currentIndex = 0;
- }
- }
-@@ -273,3 +269,2 @@
- return (UList *)(en->context);
- }
--
-Index: /icu/trunk/source/i18n/ucol_res.cpp
-===================================================================
---- source/i18n/ucol_res.cpp (revision 39483)
-+++ source/i18n/ucol_res.cpp (revision 39484)
-@@ -681,4 +681,5 @@
- }
- memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
-+ ulist_resetList(sink.values); // Initialize the iterator.
- en->context = sink.values;
- sink.values = NULL; // Avoid deletion in the sink destructor.
-Index: /icu/trunk/source/test/intltest/apicoll.cpp
-===================================================================
---- source/test/intltest/apicoll.cpp (revision 39483)
-+++ source/test/intltest/apicoll.cpp (revision 39484)
-@@ -82,14 +82,7 @@
- col = Collator::createInstance(Locale::getEnglish(), success);
- if (U_FAILURE(success)){
-- errcheckln(success, "Default Collator creation failed. - %s", u_errorName(success));
-- return;
-- }
--
-- StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success);
-- if (U_FAILURE(success)){
-- errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success));
-- return;
-- }
-- delete kwEnum;
-+ errcheckln(success, "English Collator creation failed. - %s", u_errorName(success));
-+ return;
-+ }
-
- col->getVersion(versionArray);
-@@ -230,4 +223,27 @@
- delete aFrCol;
- delete junk;
-+}
-+
-+void CollationAPITest::TestKeywordValues() {
-+ IcuTestErrorCode errorCode(*this, "TestKeywordValues");
-+ LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));
-+ if (errorCode.logIfFailureAndReset("English Collator creation failed")) {
-+ return;
-+ }
-+
-+ LocalPointer<StringEnumeration> kwEnum(
-+ col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode));
-+ if (errorCode.logIfFailureAndReset("Get Keyword Values for English Collator failed")) {
-+ return;
-+ }
-+ assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0);
-+ const char *kw;
-+ UBool hasStandard = FALSE;
-+ while ((kw = kwEnum->next(NULL, errorCode)) != NULL) {
-+ if (strcmp(kw, "standard") == 0) {
-+ hasStandard = TRUE;
-+ }
-+ }
-+ assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard);
- }
-
-@@ -2467,4 +2483,5 @@
- TESTCASE_AUTO_BEGIN;
- TESTCASE_AUTO(TestProperty);
-+ TESTCASE_AUTO(TestKeywordValues);
- TESTCASE_AUTO(TestOperators);
- TESTCASE_AUTO(TestDuplicate);
-Index: /icu/trunk/source/test/intltest/apicoll.h
-===================================================================
---- source/test/intltest/apicoll.h (revision 39483)
-+++ source/test/intltest/apicoll.h (revision 39484)
-@@ -36,4 +36,5 @@
- */
- void TestProperty(/* char* par */);
-+ void TestKeywordValues();
-
- /**
diff --git a/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch b/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
deleted file mode 100644
index 40ada6f7ce..0000000000
--- a/main/igmpproxy/0001-Use-standard-unsigned-integer-types.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From ed3dff27f360239910310be6706fd54572398992 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Mon, 3 Mar 2014 12:11:26 +0000
-Subject: [PATCH] Use standard unsigned integer types
-
-Use the stanard unsigned integer types instead of the non-standard
-u_char, u_short and u_int.
-
-This fixes build with musl libc.
-
-(cherry picked from commit b914bcf882c6189be7a0ce6fceb34422372c3606)
-
-Conflicts:
- src/igmp.c
----
- src/igmp.c | 4 ++--
- src/kern.c | 4 ++--
- src/lib.c | 10 +++++-----
- src/os-dragonfly.h | 4 ++--
- src/os-freebsd.h | 4 ++--
- src/os-linux.h | 4 ++--
- src/os-netbsd.h | 4 ++--
- src/os-openbsd.h | 4 ++--
- 8 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/src/igmp.c b/src/igmp.c
-index a0cd27d..92f37e7 100644
---- a/src/igmp.c
-+++ b/src/igmp.c
-@@ -79,7 +79,7 @@ void initIgmp() {
- /**
- * Finds the textual name of the supplied IGMP request.
- */
--char *igmpPacketKind(u_int type, u_int code) {
-+char *igmpPacketKind(unsigned int type, unsigned int code) {
- static char unknown[20];
-
- switch (type) {
-@@ -226,7 +226,7 @@ void buildIgmp(uint32_t src, uint32_t dst, int type, int code, uint32_t group, i
- igmp->igmp_code = code;
- igmp->igmp_group.s_addr = group;
- igmp->igmp_cksum = 0;
-- igmp->igmp_cksum = inetChksum((u_short *)igmp,
-+ igmp->igmp_cksum = inetChksum((unsigned short *)igmp,
- IGMP_MINLEN + datalen);
- }
-
-diff --git a/src/kern.c b/src/kern.c
-index 2055636..12c613f 100644
---- a/src/kern.c
-+++ b/src/kern.c
-@@ -82,7 +82,7 @@ void k_hdr_include(int hdrincl) {
-
- void k_set_ttl(int t) {
- #ifndef RAW_OUTPUT_IS_RAW
-- u_char ttl;
-+ unsigned char ttl;
-
- ttl = t;
- if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_TTL,
-@@ -94,7 +94,7 @@ void k_set_ttl(int t) {
-
-
- void k_set_loop(int l) {
-- u_char loop;
-+ unsigned char loop;
-
- loop = l;
- if (setsockopt(MRouterFD, IPPROTO_IP, IP_MULTICAST_LOOP,
-diff --git a/src/lib.c b/src/lib.c
-index 70a730a..0eed9ce 100644
---- a/src/lib.c
-+++ b/src/lib.c
-@@ -61,9 +61,9 @@ char *fmtInAdr( char *St, struct in_addr InAdr ) {
- * Convert an IP address in u_long (network) format into a printable string.
- */
- char *inetFmt(uint32_t addr, char *s) {
-- register u_char *a;
-+ register unsigned char *a;
-
-- a = (u_char *)&addr;
-+ a = (unsigned char *)&addr;
- sprintf(s, "%u.%u.%u.%u", a[0], a[1], a[2], a[3]);
- return(s);
- }
-@@ -74,15 +74,15 @@ char *inetFmt(uint32_t addr, char *s) {
- * string including the netmask as a number of bits.
- */
- char *inetFmts(uint32_t addr, uint32_t mask, char *s) {
-- register u_char *a, *m;
-+ register unsigned char *a, *m;
- int bits;
-
- if ((addr == 0) && (mask == 0)) {
- sprintf(s, "default");
- return(s);
- }
-- a = (u_char *)&addr;
-- m = (u_char *)&mask;
-+ a = (unsigned char *)&addr;
-+ m = (unsigned char *)&mask;
- bits = 33 - ffs(ntohl(mask));
-
- if (m[3] != 0) sprintf(s, "%u.%u.%u.%u/%d", a[0], a[1], a[2], a[3],
-diff --git a/src/os-dragonfly.h b/src/os-dragonfly.h
-index 735401c..189dfb2 100644
---- a/src/os-dragonfly.h
-+++ b/src/os-dragonfly.h
-@@ -3,12 +3,12 @@
- #include <netinet/ip.h>
- #include <netinet/igmp.h>
-
--static inline u_short ip_data_len(const struct ip *ip)
-+static inline unsigned short ip_data_len(const struct ip *ip)
- {
- return ip->ip_len;
- }
-
--static inline void ip_set_len(struct ip *ip, u_short len)
-+static inline void ip_set_len(struct ip *ip, unsigned short len)
- {
- ip->ip_len = len;
- }
-diff --git a/src/os-freebsd.h b/src/os-freebsd.h
-index ca01cc5..60b897c 100644
---- a/src/os-freebsd.h
-+++ b/src/os-freebsd.h
-@@ -12,12 +12,12 @@
- #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
- #endif
-
--static inline u_short ip_data_len(const struct ip *ip)
-+static inline unsigned short ip_data_len(const struct ip *ip)
- {
- return ip->ip_len;
- }
-
--static inline void ip_set_len(struct ip *ip, u_short len)
-+static inline void ip_set_len(struct ip *ip, unsigned short len)
- {
- ip->ip_len = len;
- }
-diff --git a/src/os-linux.h b/src/os-linux.h
-index 7504b1f..6cdcdc7 100644
---- a/src/os-linux.h
-+++ b/src/os-linux.h
-@@ -4,12 +4,12 @@
- #include <netinet/ip.h>
- #include <netinet/igmp.h>
-
--static inline u_short ip_data_len(const struct ip *ip)
-+static inline unsigned short ip_data_len(const struct ip *ip)
- {
- return ntohs(ip->ip_len) - (ip->ip_hl << 2);
- }
-
--static inline void ip_set_len(struct ip *ip, u_short len)
-+static inline void ip_set_len(struct ip *ip, unsigned short len)
- {
- ip->ip_len = htons(len);
- }
-diff --git a/src/os-netbsd.h b/src/os-netbsd.h
-index 17bd5fa..22f74e5 100644
---- a/src/os-netbsd.h
-+++ b/src/os-netbsd.h
-@@ -8,12 +8,12 @@
- #define IGMP_V2_MEMBERSHIP_REPORT IGMP_v2_HOST_MEMBERSHIP_REPORT
- #define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
-
--static inline u_short ip_data_len(const struct ip *ip)
-+static inline unsigned short ip_data_len(const struct ip *ip)
- {
- return ip->ip_len;
- }
-
--static inline void ip_set_len(struct ip *ip, u_short len)
-+static inline void ip_set_len(struct ip *ip, unsigned short len)
- {
- ip->ip_len = len;
- }
-diff --git a/src/os-openbsd.h b/src/os-openbsd.h
-index 873e5fb..75ddf80 100644
---- a/src/os-openbsd.h
-+++ b/src/os-openbsd.h
-@@ -10,12 +10,12 @@
-
- #define INADDR_ALLRTRS_GROUP INADDR_ALLROUTERS_GROUP
-
--static inline u_short ip_data_len(const struct ip *ip)
-+static inline unsigned short ip_data_len(const struct ip *ip)
- {
- return ntohs(ip->ip_len) - (ip->ip_hl << 2);
- }
-
--static inline void ip_set_len(struct ip *ip, u_short len)
-+static inline void ip_set_len(struct ip *ip, unsigned short len)
- {
- ip->ip_len = htons(len);
- }
---
-1.9.0
-
diff --git a/main/json-glib/fuzzy-compare-for-float.patch b/main/json-glib/fuzzy-compare-for-float.patch
deleted file mode 100644
index 0506ea8a89..0000000000
--- a/main/json-glib/fuzzy-compare-for-float.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-From 70e2648e02232c1a439a7418388f18fee9afb3fe Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sat, 4 Nov 2017 15:43:19 +0000
-Subject: [PATCH] Add float comparison utility macros for tests
-
-We do compare floating point values elsewhere in our code, so we should
-ensure that we're doing that with a certain amount of fuzziness.
----
- json-glib/tests/json-test-utils.h | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
- create mode 100644 json-glib/tests/json-test-utils.h
-
-diff --git a/json-glib/tests/json-test-utils.h b/json-glib/tests/json-test-utils.h
-new file mode 100644
-index 0000000..83a02c6
---- /dev/null
-+++ b/json-glib/tests/json-test-utils.h
-@@ -0,0 +1,21 @@
-+#include <string.h>
-+#include <math.h>
-+#include <float.h>
-+#include <glib.h>
-+#include <json-glib/json-glib.h>
-+
-+#define json_fuzzy_equals(n1,n2,epsilon) \
-+ (((n1) > (n2) ? ((n1) - (n2)) : ((n2) - (n1))) < (epsilon))
-+
-+#define json_assert_fuzzy_equals(n1,n2,epsilon) \
-+ G_STMT_START { \
-+ double __n1 = (n1), __n2 = (n2), __epsilon = (epsilon); \
-+ if (json_fuzzy_equals (__n1, __n2, __epsilon)) ; else { \
-+ g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
-+ #n1 " == " #n2 " (+/- " #epsilon ")", \
-+ __n1, "==", __n2, 'f'); \
-+ } \
-+ } G_STMT_END
-+
-+#define json_assert_almost_equals(n1,n2) \
-+ json_assert_fuzzy_equals (n1, n2, DBL_EPSILON)
---
-2.17.1
-
-From 675e27505776a1d77fa1ffd1974284890caec1f4 Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sat, 4 Nov 2017 15:47:35 +0000
-Subject: [PATCH] Use fuzzy comparison for floating point values
-
-Direct comparison should never be used for floating point values.
-
-Fixes #27 and #28.
----
- json-glib/tests/array.c | 9 ++-------
- json-glib/tests/node.c | 16 +++++++---------
- json-glib/tests/parser.c | 12 +++---------
- json-glib/tests/reader.c | 9 ++-------
- 4 files changed, 14 insertions(+), 32 deletions(-)
-
-diff --git a/json-glib/tests/array.c b/json-glib/tests/array.c
-index 98afeab..426cd72 100644
---- a/json-glib/tests/array.c
-+++ b/json-glib/tests/array.c
-@@ -1,9 +1,4 @@
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
--
--#include <glib.h>
--#include <json-glib/json-glib.h>
-+#include "json-test-utils.h"
-
- static void
- test_empty_array (void)
-@@ -37,7 +32,7 @@ test_add_element (void)
-
- json_array_add_double_element (array, 3.14);
- g_assert_cmpint (json_array_get_length (array), ==, 3);
-- g_assert_cmpfloat (json_array_get_double_element (array, 2), ==, 3.14);
-+ json_assert_fuzzy_equals (json_array_get_double_element (array, 2), 3.14, 0.001);
-
- json_array_add_boolean_element (array, TRUE);
- g_assert_cmpint (json_array_get_length (array), ==, 4);
-diff --git a/json-glib/tests/node.c b/json-glib/tests/node.c
-index 23bda63..80beb78 100644
---- a/json-glib/tests/node.c
-+++ b/json-glib/tests/node.c
-@@ -1,6 +1,4 @@
--#include <glib.h>
--#include <json-glib/json-glib.h>
--#include <string.h>
-+#include "json-test-utils.h"
-
- static void
- test_init_int (void)
-@@ -19,7 +17,7 @@ test_init_double (void)
- JsonNode *node = json_node_new (JSON_NODE_VALUE);
-
- json_node_set_double (node, 3.14159);
-- g_assert_cmpfloat (json_node_get_double (node), ==, 3.14159);
-+ json_assert_fuzzy_equals (json_node_get_double (node), 3.14159, 0.00001);
-
- json_node_free (node);
- }
-@@ -119,13 +117,13 @@ test_get_int (void)
-
- json_node_set_int (node, 0);
- g_assert_cmpint (json_node_get_int (node), ==, 0);
-- g_assert_cmpfloat (json_node_get_double (node), ==, 0.0);
-+ json_assert_almost_equals (json_node_get_double (node), 0.0);
- g_assert (!json_node_get_boolean (node));
- g_assert (!json_node_is_null (node));
-
- json_node_set_int (node, 42);
- g_assert_cmpint (json_node_get_int (node), ==, 42);
-- g_assert_cmpfloat (json_node_get_double (node), ==, 42.0);
-+ json_assert_almost_equals (json_node_get_double (node), 42.0);
- g_assert (json_node_get_boolean (node));
- g_assert (!json_node_is_null (node));
-
-@@ -138,7 +136,7 @@ test_get_double (void)
- JsonNode *node = json_node_new (JSON_NODE_VALUE);
-
- json_node_set_double (node, 3.14);
-- g_assert_cmpfloat (json_node_get_double (node), ==, 3.14);
-+ json_assert_fuzzy_equals (json_node_get_double (node), 3.14, 0.001);
- g_assert_cmpint (json_node_get_int (node), ==, 3);
- g_assert (json_node_get_boolean (node));
-
-@@ -232,9 +230,9 @@ test_gvalue_autopromotion (void)
- g_print ("Expecting a gdouble, got a %s\n", g_type_name (G_VALUE_TYPE (&check)));
-
- g_assert_cmpint (G_VALUE_TYPE (&check), ==, G_TYPE_DOUBLE);
-- g_assert_cmpfloat ((float) g_value_get_double (&check), ==, 3.14159f);
-+ json_assert_fuzzy_equals (g_value_get_double (&check), 3.14159, 0.00001);
- g_assert_cmpint (G_VALUE_TYPE (&value), !=, G_VALUE_TYPE (&check));
-- g_assert_cmpfloat ((gdouble) g_value_get_float (&value), ==, g_value_get_double (&check));
-+ json_assert_almost_equals (g_value_get_float (&value), g_value_get_double (&check));
-
- g_value_unset (&value);
- g_value_unset (&check);
-diff --git a/json-glib/tests/parser.c b/json-glib/tests/parser.c
-index f71584a..8c52a1d 100644
---- a/json-glib/tests/parser.c
-+++ b/json-glib/tests/parser.c
-@@ -1,11 +1,5 @@
--#include "config.h"
--
-+#include "json-test-utils.h"
- #include <stdlib.h>
--#include <stdio.h>
--
--#include <glib.h>
--
--#include <json-glib/json-glib.h>
-
- static const gchar *test_empty_string = "";
- static const gchar *test_empty_array_string = "[ ]";
-@@ -38,13 +32,13 @@ verify_string_value (JsonNode *node)
- static void
- verify_double_value (JsonNode *node)
- {
-- g_assert_cmpfloat (10.2e3, ==, json_node_get_double (node));
-+ json_assert_fuzzy_equals (10.2e3, json_node_get_double (node), 0.1);
- }
-
- static void
- verify_negative_double_value (JsonNode *node)
- {
-- g_assert_cmpfloat (-3.14, ==, json_node_get_double (node));
-+ json_assert_fuzzy_equals (-3.14, json_node_get_double (node), 0.01);
- }
-
- static const struct {
-diff --git a/json-glib/tests/reader.c b/json-glib/tests/reader.c
-index 43a6aac..9bab312 100644
---- a/json-glib/tests/reader.c
-+++ b/json-glib/tests/reader.c
-@@ -1,9 +1,4 @@
--#include <stdlib.h>
--#include <stdio.h>
--
--#include <glib.h>
--
--#include <json-glib/json-glib.h>
-+#include "json-test-utils.h"
-
- static const gchar *test_base_array_data =
- "[ 0, true, null, \"foo\", 3.14, [ false ], { \"bar\" : 42 } ]";
-@@ -78,7 +73,7 @@ test_base_object (void)
- g_assert (json_reader_get_error (reader) == NULL);
-
- json_reader_read_member (reader, "double");
-- g_assert_cmpfloat (json_reader_get_double_value (reader), ==, 42.47);
-+ json_assert_fuzzy_equals (json_reader_get_double_value (reader), 42.47, 0.01);
- json_reader_end_element (reader);
-
- g_object_unref (reader);
---
-2.17.1
-
diff --git a/main/kamailio/kamctl_build.patch b/main/kamailio/kamctl_build.patch
deleted file mode 100644
index 3342ec3f0f..0000000000
--- a/main/kamailio/kamctl_build.patch
+++ /dev/null
@@ -1,236 +0,0 @@
---- a/utils/kamctl/Makefile
-+++ b/utils/kamctl/Makefile
-@@ -25,63 +25,63 @@
- cat kamctl | \
- sed -e "s#/usr/local/sbin#$(bin_target)#g" | \
- sed -e "s#/usr/local/lib/kamailio#$(lib_target)#g" | \
-- sed -e "s#/usr/local/etc/kamailio#$(cfg_target)#g" >/tmp/kamctl
-+ sed -e "s#/usr/local/etc/kamailio#$(cfg_target)#g" >$(basedir)/kamctl
- $(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/kamctl
-- $(INSTALL_BIN) /tmp/kamctl $(bin_prefix)/$(bin_dir)
-- rm -fr /tmp/kamctl
-+ $(INSTALL_BIN) $(basedir)/kamctl $(bin_prefix)/$(bin_dir)
-+ rm -fr $(basedir)/kamctl
- sed -e "s#/usr/local/sbin#$(bin_target)#g" \
-- < kamctl.base > /tmp/kamctl.base
-+ < kamctl.base > $(basedir)/kamctl.base
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl
- $(INSTALL_TOUCH) \
- $(modules_prefix)/$(lib_dir)/kamctl
-- $(INSTALL_CFG) /tmp/kamctl.base \
-+ $(INSTALL_CFG) $(basedir)/kamctl.base \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.base
-- rm -fr /tmp/kamctl.base
-+ rm -fr $(basedir)/kamctl.base
- sed -e "s#/usr/local#$(bin_target)#g" \
-- < kamctl.ctlbase > /tmp/kamctl.ctlbase
-- $(INSTALL_CFG) /tmp/kamctl.ctlbase \
-+ < kamctl.ctlbase > $(basedir)/kamctl.ctlbase
-+ $(INSTALL_CFG) $(basedir)/kamctl.ctlbase \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.ctlbase
-- rm -fr /tmp/kamctl.ctlbase
-+ rm -fr $(basedir)/kamctl.ctlbase
- sed -e "s#/usr/local#$(bin_target)#g" \
-- < kamctl.fifo > /tmp/kamctl.fifo
-- $(INSTALL_CFG) /tmp/kamctl.fifo \
-+ < kamctl.fifo > $(basedir)/kamctl.fifo
-+ $(INSTALL_CFG) $(basedir)/kamctl.fifo \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.fifo
-- rm -fr /tmp/kamctl.fifo
-+ rm -fr $(basedir)/kamctl.fifo
- sed -e "s#/usr/local#$(bin_target)#g" \
-- < kamctl.ser > /tmp/kamctl.ser
-- $(INSTALL_CFG) /tmp/kamctl.ser \
-+ < kamctl.ser > $(basedir)/kamctl.ser
-+ $(INSTALL_CFG) $(basedir)/kamctl.ser \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.ser
-- rm -fr /tmp/kamctl.ser
-+ rm -fr $(basedir)/kamctl.ser
- sed -e "s#/usr/local#$(bin_target)#g" \
-- < kamctl.ser_mi > /tmp/kamctl.ser_mi
-- $(INSTALL_CFG) /tmp/kamctl.ser_mi \
-+ < kamctl.ser_mi > $(basedir)/kamctl.ser_mi
-+ $(INSTALL_CFG) $(basedir)/kamctl.ser_mi \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.ser_mi
-- rm -fr /tmp/kamctl.ser_mi
-+ rm -fr $(basedir)/kamctl.ser_mi
- sed -e "s#/usr/local#$(bin_target)#g" \
-- < kamctl.unixsock > /tmp/kamctl.unixsock
-- $(INSTALL_CFG) /tmp/kamctl.unixsock \
-+ < kamctl.unixsock > $(basedir)/kamctl.unixsock
-+ $(INSTALL_CFG) $(basedir)/kamctl.unixsock \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.unixsock
-- rm -fr /tmp/kamctl.unixsock
-+ rm -fr $(basedir)/kamctl.unixsock
- sed -e "s#/usr/local#$(bin_target)#g" \
-- < kamctl.sqlbase > /tmp/kamctl.sqlbase
-- $(INSTALL_CFG) /tmp/kamctl.sqlbase \
-+ < kamctl.sqlbase > $(basedir)/kamctl.sqlbase
-+ $(INSTALL_CFG) $(basedir)/kamctl.sqlbase \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.sqlbase
-- rm -fr /tmp/kamctl.sqlbase
-+ rm -fr $(basedir)/kamctl.sqlbase
- # install db setup base script
- sed -e "s#/usr/local/sbin#$(bin_target)#g" \
- -e "s#/usr/local/etc/kamailio#$(cfg_target)#g" \
- -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.base > /tmp/kamdbctl.base
-- $(INSTALL_CFG) /tmp/kamdbctl.base \
-+ < kamdbctl.base > $(basedir)/kamdbctl.base
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.base \
- $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.base
-- rm -fr /tmp/kamdbctl.base
-+ rm -fr $(basedir)/kamdbctl.base
- cat kamdbctl | \
- sed -e "s#/usr/local/sbin#$(bin_target)#g" | \
- sed -e "s#/usr/local/lib/kamailio#$(lib_target)#g" | \
-- sed -e "s#/usr/local/etc/kamailio#$(cfg_target)#g" >/tmp/kamdbctl
-+ sed -e "s#/usr/local/etc/kamailio#$(cfg_target)#g" >$(basedir)/kamdbctl
- $(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/kamdbctl
-- $(INSTALL_BIN) /tmp/kamdbctl $(bin_prefix)/$(bin_dir)
-- rm -fr /tmp/kamdbctl
-+ $(INSTALL_BIN) $(basedir)/kamdbctl $(bin_prefix)/$(bin_dir)
-+ rm -fr $(basedir)/kamdbctl
-
- install-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
- sed -e "s#/etc/$(NAME)/$(NAME)\.cfg#$(cfg_target)$(NAME).cfg#g" \
-@@ -105,15 +105,15 @@
- if [ "$(MYSQLON)" = "yes" ]; then \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl ; \
- sed -e "s#/usr/local/sbin#$(bin_target)#g" \
-- < kamctl.mysql > /tmp/kamctl.mysql ; \
-- $(INSTALL_CFG) /tmp/kamctl.mysql \
-+ < kamctl.mysql > $(basedir)/kamctl.mysql ; \
-+ $(INSTALL_CFG) $(basedir)/kamctl.mysql \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.mysql ; \
-- rm -fr /tmp/kamctl.mysql ; \
-+ rm -fr $(basedir)/kamctl.mysql ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.mysql > /tmp/kamdbctl.mysql ; \
-+ < kamdbctl.mysql > $(basedir)/kamdbctl.mysql ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.mysql ; \
-- $(INSTALL_CFG) /tmp/kamdbctl.mysql $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbctl.mysql ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.mysql $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbctl.mysql ; \
- mkdir -p $(data_prefix)/$(data_dir)/mysql ; \
- for FILE in $(wildcard mysql/*) ; do \
- if [ -f $$FILE ] ; then \
-@@ -128,15 +128,15 @@
- if [ "$(PGSQLON)" = "yes" ]; then \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl ; \
- sed -e "s#/usr/local/sbin#$(bin_target)#g" \
-- < kamctl.pgsql > /tmp/kamctl.pgsql ; \
-- $(INSTALL_CFG) /tmp/kamctl.pgsql \
-+ < kamctl.pgsql > $(basedir)/kamctl.pgsql ; \
-+ $(INSTALL_CFG) $(basedir)/kamctl.pgsql \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.pgsql ; \
-- rm -fr /tmp/kamctl.pgsql ; \
-+ rm -fr $(basedir)/kamctl.pgsql ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.pgsql > /tmp/kamdbctl.pgsql ; \
-+ < kamdbctl.pgsql > $(basedir)/kamdbctl.pgsql ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.pgsql ; \
-- $(INSTALL_CFG) /tmp/kamdbctl.pgsql $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbctl.pgsql ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.pgsql $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbctl.pgsql ; \
- mkdir -p $(data_prefix)/$(data_dir)/postgres ; \
- for FILE in $(wildcard postgres/*) ; do \
- if [ -f $$FILE ] ; then \
-@@ -151,20 +151,20 @@
- if [ "$(ORACLEON)" = "yes" ]; then \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl ; \
- sed -e "s#/usr/local/sbin#$(bin_target)#g" \
-- < kamctl.oracle > /tmp/kamctl.oracle ; \
-- $(INSTALL_CFG) /tmp/kamctl.oracle \
-+ < kamctl.oracle > $(basedir)/kamctl.oracle ; \
-+ $(INSTALL_CFG) $(basedir)/kamctl.oracle \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.oracle ; \
-- rm -fr /tmp/kamctl.oracle ; \
-+ rm -fr $(basedir)/kamctl.oracle ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.oracle > /tmp/kamdbctl.oracle ; \
-+ < kamdbctl.oracle > $(basedir)/kamdbctl.oracle ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.oracle ; \
-- $(INSTALL_CFG) /tmp/kamdbctl.oracle $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbctl.oracle ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.oracle $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbctl.oracle ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbfunc.oracle > /tmp/kamdbfunc.oracle ; \
-+ < kamdbfunc.oracle > $(basedir)/kamdbfunc.oracle ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbfunc.oracle ; \
-- $(INSTALL_CFG) /tmp/kamdbfunc.oracle $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbfunc.oracle ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbfunc.oracle $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbfunc.oracle ; \
- mkdir -p $(data_prefix)/$(data_dir)/oracle ; \
- for FILE in $(wildcard oracle/*) ; do \
- if [ -f $$FILE ] ; then \
-@@ -199,15 +199,15 @@
- if [ "$(BERKELEYDBON)" = "yes" ]; then \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl ; \
- sed -e "s#/usr/local/share/kamailio/#$(data_target)#g" \
-- < kamctl.db_berkeley > /tmp/kamctl.db_berkeley ; \
-- $(INSTALL_CFG) /tmp/kamctl.db_berkeley \
-+ < kamctl.db_berkeley > $(basedir)/kamctl.db_berkeley ; \
-+ $(INSTALL_CFG) $(basedir)/kamctl.db_berkeley \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.db_berkeley ; \
-- rm -fr /tmp/kamctl.db_berkeley ; \
-+ rm -fr $(basedir)/kamctl.db_berkeley ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.db_berkeley > /tmp/kamdbctl.db_berkeley ; \
-+ < kamdbctl.db_berkeley > $(basedir)/kamdbctl.db_berkeley ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.db_berkeley ; \
-- $(INSTALL_CFG) /tmp/kamdbctl.db_berkeley $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbctl.db_berkeley ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.db_berkeley $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbctl.db_berkeley ; \
- mkdir -p $(data_prefix)/$(data_dir)/db_berkeley/kamailio ; \
- for FILE in $(wildcard db_berkeley/kamailio/*) ; do \
- if [ -f $$FILE ] ; then \
-@@ -224,15 +224,15 @@
- if [ "$(DBTEXTON)" = "yes" ]; then \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl ; \
- sed -e "s#/usr/local/share/kamailio/#$(data_target)#g" \
-- < kamctl.dbtext > /tmp/kamctl.dbtext ; \
-- $(INSTALL_CFG) /tmp/kamctl.dbtext \
-+ < kamctl.dbtext > $(basedir)/kamctl.dbtext ; \
-+ $(INSTALL_CFG) $(basedir)/kamctl.dbtext \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.dbtext ; \
-- rm -fr /tmp/kamctl.dbtext ; \
-+ rm -fr $(basedir)/kamctl.dbtext ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.dbtext > /tmp/kamdbctl.dbtext ; \
-+ < kamdbctl.dbtext > $(basedir)/kamdbctl.dbtext ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.dbtext ; \
-- $(INSTALL_CFG) /tmp/kamdbctl.dbtext $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbctl.dbtext ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.dbtext $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbctl.dbtext ; \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl/dbtextdb ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/dbtextdb/dbtextdb.py ; \
- $(INSTALL_BIN) dbtextdb/dbtextdb.py $(modules_prefix)/$(lib_dir)/kamctl/dbtextdb/ ; \
-@@ -250,15 +250,15 @@
- if [ "$(SQLITEON)" = "yes" ]; then \
- mkdir -p $(modules_prefix)/$(lib_dir)/kamctl ; \
- sed -e "s#/usr/local/sbin#$(bin_target)#g" \
-- < kamctl.sqlite > /tmp/kamctl.sqlite ; \
-- $(INSTALL_CFG) /tmp/kamctl.sqlite \
-+ < kamctl.sqlite > $(basedir)/kamctl.sqlite ; \
-+ $(INSTALL_CFG) $(basedir)/kamctl.sqlite \
- $(modules_prefix)/$(lib_dir)/kamctl/kamctl.sqlite ; \
-- rm -fr /tmp/kamctl.sqlite ; \
-+ rm -fr $(basedir)/kamctl.sqlite ; \
- sed -e "s#/usr/local/share/kamailio#$(data_target)#g" \
-- < kamdbctl.sqlite > /tmp/kamdbctl.sqlite ; \
-+ < kamdbctl.sqlite > $(basedir)/kamdbctl.sqlite ; \
- $(INSTALL_TOUCH) $(modules_prefix)/$(lib_dir)/kamctl/kamdbctl.sqlite ; \
-- $(INSTALL_CFG) /tmp/kamdbctl.sqlite $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-- rm -fr /tmp/kamdbctl.sqlite ; \
-+ $(INSTALL_CFG) $(basedir)/kamdbctl.sqlite $(modules_prefix)/$(lib_dir)/kamctl/ ; \
-+ rm -fr $(basedir)/kamdbctl.sqlite ; \
- mkdir -p $(data_prefix)/$(data_dir)/db_sqlite ; \
- for FILE in $(wildcard db_sqlite/*) ; do \
- if [ -f $$FILE ] ; then \
diff --git a/main/kbd/bkeymaps.patch b/main/kbd/bkeymaps.patch
deleted file mode 100644
index cea626167f..0000000000
--- a/main/kbd/bkeymaps.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/loadkeys.c b/src/loadkeys.c
-index 8b8e7a1..b3f7fea 100644
---- a/src/loadkeys.c
-+++ b/src/loadkeys.c
-@@ -174,7 +174,8 @@ main(int argc, char *argv[])
- }
-
- /* get console */
-- fd = getfd(console);
-+ if (!(options & OPT_B))
-+ fd = getfd(console);
-
- if (!(options & OPT_M) && !(options & OPT_B)) {
- /* check whether the keyboard is in Unicode mode */
diff --git a/main/keyutils/fix-includes.patch b/main/keyutils/fix-includes.patch
deleted file mode 100644
index df0e7ddf7f..0000000000
--- a/main/keyutils/fix-includes.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- keyutils-1.5.8.orig/key.dns_resolver.c
-+++ keyutils-1.5.8/key.dns_resolver.c
-@@ -56,6 +56,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <time.h>
-+#include <limits.h>
-
- static const char *DNS_PARSE_VERSION = "1.0";
- static const char prog[] = "key.dns_resolver";
diff --git a/main/krb5/CVE-2018-20217.patch b/main/krb5/CVE-2018-20217.patch
deleted file mode 100644
index 80f2d55058..0000000000
--- a/main/krb5/CVE-2018-20217.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 5e6d1796106df8ba6bc1973ee0917c170d929086 Mon Sep 17 00:00:00 2001
-From: Isaac Boukris <iboukris@gmail.com>
-Date: Mon, 3 Dec 2018 02:33:07 +0200
-Subject: [PATCH] Ignore password attributes for S4U2Self requests
-
-For consistency with Windows KDCs, allow protocol transition to work
-even if the password has expired or needs changing.
-
-Also, when looking up an enterprise principal with an AS request,
-treat ERR_KEY_EXP as confirmation that the client is present in the
-realm.
-
-[ghudson@mit.edu: added comment in kdc_process_s4u2self_req(); edited
-commit message]
-
-ticket: 8763 (new)
-tags: pullup
-target_version: 1.17
----
- src/kdc/kdc_util.c | 5 +++++
- src/lib/krb5/krb/s4u_creds.c | 2 +-
- src/tests/gssapi/t_s4u.py | 8 ++++++++
- 3 files changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c
-index 6d53173fb0..6517a213cd 100644
---- a/src/kdc/kdc_util.c
-+++ b/src/kdc/kdc_util.c
-@@ -1607,6 +1607,11 @@ kdc_process_s4u2self_req(kdc_realm_t *kdc_active_realm,
-
- memset(&no_server, 0, sizeof(no_server));
-
-+ /* Ignore password expiration and needchange attributes (as Windows
-+ * does), since S4U2Self is not password authentication. */
-+ princ->pw_expiration = 0;
-+ clear(princ->attributes, KRB5_KDB_REQUIRES_PWCHANGE);
-+
- code = validate_as_request(kdc_active_realm, request, *princ,
- no_server, kdc_time, status, &e_data);
- if (code) {
-diff --git a/src/lib/krb5/krb/s4u_creds.c b/src/lib/krb5/krb/s4u_creds.c
-index d2fdcb3f16..614ed41908 100644
---- a/src/lib/krb5/krb/s4u_creds.c
-+++ b/src/lib/krb5/krb/s4u_creds.c
-@@ -116,7 +116,7 @@ s4u_identify_user(krb5_context context,
- code = k5_get_init_creds(context, &creds, &client, NULL, NULL, 0, NULL,
- opts, krb5_get_as_key_noop, &userid, &use_master,
- NULL);
-- if (code == 0 || code == KRB5_PREAUTH_FAILED) {
-+ if (!code || code == KRB5_PREAUTH_FAILED || code == KRB5KDC_ERR_KEY_EXP) {
- *canon_user = userid.user;
- userid.user = NULL;
- code = 0;
-diff --git a/src/tests/gssapi/t_s4u.py b/src/tests/gssapi/t_s4u.py
-index fd29e1a270..84f3fbd752 100755
---- a/src/tests/gssapi/t_s4u.py
-+++ b/src/tests/gssapi/t_s4u.py
-@@ -19,6 +19,14 @@
- # Get forwardable creds for service1 in the default cache.
- realm.kinit(service1, None, ['-f', '-k'])
-
-+# Try S4U2Self for user with a restricted password.
-+realm.run([kadminl, 'modprinc', '+needchange', realm.user_princ])
-+realm.run(['./t_s4u', 'e:user', '-'])
-+realm.run([kadminl, 'modprinc', '-needchange',
-+ '-pwexpire', '1/1/2000', realm.user_princ])
-+realm.run(['./t_s4u', 'e:user', '-'])
-+realm.run([kadminl, 'modprinc', '-pwexpire', 'never', realm.user_princ])
-+
- # Try krb5 -> S4U2Proxy with forwardable user creds. This should fail
- # at the S4U2Proxy step since the DB2 back end currently has no
- # support for allowing it.
diff --git a/main/krb5/libressl.patch b/main/krb5/libressl.patch
deleted file mode 100644
index ec274cc6ae..0000000000
--- a/main/krb5/libressl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c.orig
-+++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
-@@ -191,7 +191,7 @@
- (*_x509_pp) = PKCS7_cert_from_signer_info(_p7,_si)
- #endif
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-
- /* 1.1 standardizes constructor and destructor names, renaming
- * EVP_MD_CTX_{create,destroy} and deprecating ASN1_STRING_data. */
-@@ -3059,7 +3059,7 @@
- return retval;
- }
-
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-
- /*
- * We need to decode DomainParameters from RFC 3279 section 2.3.3. We would
-@@ -3122,6 +3122,7 @@
-
- #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-
-+#include <openssl/asn1_mac.h>
- /*
- * Do the same decoding (except without decoding j and vparams or checking the
- * sequence length) using the pre-OpenSSL-1.1 asn1_mac.h. Define an internal
diff --git a/main/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/main/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
deleted file mode 100644
index 0d4007d09d..0000000000
--- a/main/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
+++ /dev/null
@@ -1,366 +0,0 @@
-From 88adbe1a855b7aa95bd925c80ed83c86f3fc42e3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 6 Nov 2016 09:39:31 -0800
-Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- include/bsd/err.h | 10 ++++++++--
- include/bsd/libutil.h | 10 ++++++++--
- include/bsd/md5.h | 10 ++++++++--
- include/bsd/nlist.h | 10 ++++++++--
- include/bsd/readpassphrase.h | 10 ++++++++--
- include/bsd/stdio.h | 10 ++++++++--
- include/bsd/stdlib.h | 10 ++++++++--
- include/bsd/string.h | 10 ++++++++--
- include/bsd/stringlist.h | 10 ++++++++--
- include/bsd/unistd.h | 10 ++++++++--
- include/bsd/vis.h | 10 ++++++++--
- include/bsd/wchar.h | 10 ++++++++--
- src/hash/sha512.h | 10 ++++++++--
- 13 files changed, 104 insertions(+), 26 deletions(-)
-
-diff --git a/include/bsd/err.h b/include/bsd/err.h
-index 12fd051..43dfc32 100644
---- a/include/bsd/err.h
-+++ b/include/bsd/err.h
-@@ -42,7 +42,10 @@
-
- #include <stdarg.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- void warnc(int code, const char *format, ...)
- __printflike(2, 3);
- void vwarnc(int code, const char *format, va_list ap)
-@@ -51,6 +54,9 @@ void errc(int status, int code, const char *format, ...)
- __printflike(3, 4);
- void verrc(int status, int code, const char *format, va_list ap)
- __printflike(3, 0);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
-diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
-index ebb6160..28b919d 100644
---- a/include/bsd/libutil.h
-+++ b/include/bsd/libutil.h
-@@ -53,7 +53,10 @@ struct pidfh {
- ino_t pf_ino;
- };
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- int humanize_number(char *buf, size_t len, int64_t bytes,
- const char *suffix, int scale, int flags);
- int expand_number(const char *_buf, uint64_t *_num);
-@@ -66,7 +69,10 @@ int pidfile_close(struct pidfh *pfh);
- int pidfile_remove(struct pidfh *pfh);
-
- char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- /* humanize_number(3) */
- #define HN_DECIMAL 0x01
-diff --git a/include/bsd/md5.h b/include/bsd/md5.h
-index 9a75fad..3531fd6 100644
---- a/include/bsd/md5.h
-+++ b/include/bsd/md5.h
-@@ -30,7 +30,10 @@ typedef struct MD5Context {
- #include <sys/cdefs.h>
- #include <sys/types.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- void MD5Init(MD5_CTX *);
- void MD5Update(MD5_CTX *, const uint8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
-@@ -49,6 +52,9 @@ char *MD5FileChunk(const char *, char *, off_t, off_t)
- char *MD5Data(const uint8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH)));
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif /* _MD5_H_ */
-diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
-index 2730237..0389ab7 100644
---- a/include/bsd/nlist.h
-+++ b/include/bsd/nlist.h
-@@ -30,8 +30,14 @@
- #include <sys/cdefs.h>
- #include <a.out.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- extern int nlist(const char *filename, struct nlist *list);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
-diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h
-index e1dacc3..76e0d33 100644
---- a/include/bsd/readpassphrase.h
-+++ b/include/bsd/readpassphrase.h
-@@ -34,8 +34,14 @@
- #include <sys/cdefs.h>
- #include <sys/types.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- char * readpassphrase(const char *, char *, size_t, int);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif /* !_READPASSPHRASE_H_ */
-diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
-index 7697425..b5b3efd 100644
---- a/include/bsd/stdio.h
-+++ b/include/bsd/stdio.h
-@@ -41,7 +41,10 @@
- #include <sys/cdefs.h>
- #include <sys/types.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- const char *fmtcheck(const char *, const char *);
-
- /* XXX: The function requires cooperation from the system libc to store the
-@@ -69,7 +72,10 @@ FILE *funopen(const void *cookie,
- #define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL)
-
- int fpurge(FILE *fp);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
- #endif
-diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
-index 0604cad..b9f0515 100644
---- a/include/bsd/stdlib.h
-+++ b/include/bsd/stdlib.h
-@@ -46,7 +46,10 @@
- #include <sys/stat.h>
- #include <stdint.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- uint32_t arc4random(void);
- void arc4random_stir(void);
- void arc4random_addrandom(u_char *dat, int datlen);
-@@ -73,6 +76,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
- const char **errstr);
-
- char *getbsize(int *headerlenp, long *blocksizep);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
-diff --git a/include/bsd/string.h b/include/bsd/string.h
-index ee2f953..fbf8c54 100644
---- a/include/bsd/string.h
-+++ b/include/bsd/string.h
-@@ -36,16 +36,22 @@
- #include <sys/cdefs.h>
- #include <sys/types.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- size_t strlcpy(char *dst, const char *src, size_t siz);
- size_t strlcat(char *dst, const char *src, size_t siz);
- char *strnstr(const char *str, const char *find, size_t str_len);
- void strmode(mode_t mode, char *str);
-
- #if !defined(__GLIBC__) || \
- (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 25) || !defined(_GNU_SOURCE)))
- void explicit_bzero(void *buf, size_t len);
- #endif
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
-diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h
-index e3c42e9..40d0a52 100644
---- a/include/bsd/stringlist.h
-+++ b/include/bsd/stringlist.h
-@@ -43,12 +43,18 @@ typedef struct _stringlist {
- size_t sl_cur;
- } StringList;
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- StringList *sl_init(void);
- int sl_add(StringList *, char *);
- void sl_free(StringList *, int);
- char *sl_find(StringList *, const char *);
- int sl_delete(StringList *, const char *, int);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif /* _STRINGLIST_H */
-diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
-index 1f9c5f8..5b2f4c7 100644
---- a/include/bsd/unistd.h
-+++ b/include/bsd/unistd.h
-@@ -45,7 +45,10 @@
- #define S_ISTXT S_ISVTX
- #endif
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- extern int optreset;
-
- #ifdef LIBBSD_OVERLAY
-@@ -68,6 +71,9 @@ void setproctitle(const char *fmt, ...)
- __printflike(1, 2);
-
- int getpeereid(int s, uid_t *euid, gid_t *egid);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
-diff --git a/include/bsd/vis.h b/include/bsd/vis.h
-index 835d2d6..63c951e 100644
---- a/include/bsd/vis.h
-+++ b/include/bsd/vis.h
-@@ -74,7 +74,10 @@
-
- #include <sys/cdefs.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- char *vis(char *, int, int, int);
- int strvis(char *, const char *, int);
- int strvisx(char *, const char *, size_t, int);
-@@ -83,6 +86,9 @@ int strunvis(char *, const char *);
- int strunvisx(char *, const char *, int);
- ssize_t strnunvis(char *, const char *, size_t);
- int unvis(char *, int, int *, int);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif /* !_VIS_H_ */
-diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h
-index 33a500e..aa70742 100644
---- a/include/bsd/wchar.h
-+++ b/include/bsd/wchar.h
-@@ -43,12 +43,18 @@
- #include <sys/cdefs.h>
- #include <sys/types.h>
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- wchar_t *fgetwln(FILE *stream, size_t *len);
-
- size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
- size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif
- #endif
-diff --git a/src/hash/sha512.h b/src/hash/sha512.h
-index 4f368a1..27ddc24 100644
---- a/src/hash/sha512.h
-+++ b/src/hash/sha512.h
-@@ -39,7 +39,10 @@ typedef struct SHA512Context {
- unsigned char buf[128];
- } SHA512_CTX;
-
--__BEGIN_DECLS
-+/* __BEGIN_DECLS */
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- void SHA512_Init(SHA512_CTX *);
- void SHA512_Update(SHA512_CTX *, const void *, size_t);
-@@ -48,6 +51,9 @@ char *SHA512_End(SHA512_CTX *, char *);
- char *SHA512_File(const char *, char *);
- char *SHA512_FileChunk(const char *, char *, off_t, off_t);
- char *SHA512_Data(const void *, unsigned int, char *);
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-+/* __END_DECLS */
-
- #endif /* !_SHA512_H_ */
---
-2.10.2
-
diff --git a/main/libfprint/0001-imgdev-fix-enum-mismatch.patch b/main/libfprint/0001-imgdev-fix-enum-mismatch.patch
deleted file mode 100644
index 19bc7f69f6..0000000000
--- a/main/libfprint/0001-imgdev-fix-enum-mismatch.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 9f408bf51b7740e87c3d0b90e5adc5de3c37c052 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Tue, 7 Oct 2014 08:18:41 +0300
-Subject: imgdev: fix enum mismatch for dev_change_state() call
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This bug has existed long time, but it was uncovered by commit
-e215b0509448 which enabled multiple enrollment rounds.
-
-In practice this broke (at least) URU4000 driver state machine
-causing it to enter indefinite loop - due to the invalid state
-change callback.
-
-Patch originally posted at:
-http://lists.freedesktop.org/archives/fprint/2014-June/000603.html
-
-Test and verification results:
-http://lists.freedesktop.org/archives/fprint/2014-June/000607.html
-
-Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-
-diff --git a/libfprint/imgdev.c b/libfprint/imgdev.c
-index f960ee3..3b5d3f3 100644
---- a/libfprint/imgdev.c
-+++ b/libfprint/imgdev.c
-@@ -159,7 +159,7 @@ void fpi_imgdev_report_finger_status(struct fp_img_dev *imgdev,
- r > 0 && r != FP_ENROLL_COMPLETE && r != FP_ENROLL_FAIL) {
- imgdev->action_result = 0;
- imgdev->action_state = IMG_ACQUIRE_STATE_AWAIT_FINGER_ON;
-- dev_change_state(imgdev, IMG_ACQUIRE_STATE_AWAIT_FINGER_ON);
-+ dev_change_state(imgdev, IMGDEV_STATE_AWAIT_FINGER_ON);
- }
- break;
- case IMG_ACTION_VERIFY:
---
-cgit v0.10.2
-
diff --git a/main/libgcab/configure.patch b/main/libgcab/configure.patch
deleted file mode 100644
index f9f834bf38..0000000000
--- a/main/libgcab/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Description: Replace version from tarball
-Author: Stephen Kitt <skitt@debian.org>
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,5 +1,5 @@
- AC_PREREQ(2.57)
--AC_INIT([gcab], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
-+AC_INIT([gcab], m4_esyscmd([echo -n $(cat .tarball-version)]),
- [https://bugzilla.gnome.org/enter_bug.cgi?product=msitools&component=gcab])
- AC_CONFIG_SRCDIR([gcab.c])
- AC_CONFIG_AUX_DIR([build-aux])
diff --git a/main/libgcrypt/random-Fix-hang-of-_gcry_rndjent_get_version.patch b/main/libgcrypt/random-Fix-hang-of-_gcry_rndjent_get_version.patch
deleted file mode 100644
index cb2a1c340d..0000000000
--- a/main/libgcrypt/random-Fix-hang-of-_gcry_rndjent_get_version.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 355f5b7f69075c010fe33aa5b10ac60c08fae0c7 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Sun, 17 Jun 2018 18:53:58 -0500
-Subject: [PATCH] random: Fix hang of _gcry_rndjent_get_version.
-
-* random/rndjent.c (_gcry_rndjent_get_version): Move locking.
-
---
-
-While the protection for jent_rng_collector is needed,
-_gcry_rndjent_poll is also acquiring the lock for the variable.
-Thus, it hangs.
-
-This change is sub-optimal, the lock is once released after the call
-of _gcry_rndjent_poll. It might be good to modify the API of
-_gcry_rndjent_poll to explicitly allow this use case of forcing
-initialization keeping the lock.
-
-Comments and change log entry by gniibe.
-
-GnuPG-bug-id: 4034
-Fixes-commit: 0de2a22fcf6607d0aecb550feefa414cee3731b2
----
- random/rndjent.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/random/rndjent.c b/random/rndjent.c
-index 0c5a820..3740ddd 100644
---- a/random/rndjent.c
-+++ b/random/rndjent.c
-@@ -334,9 +334,10 @@ _gcry_rndjent_get_version (int *r_active)
- {
- if (r_active)
- {
-- lock_rng ();
- /* Make sure the RNG is initialized. */
- _gcry_rndjent_poll (NULL, 0, 0);
-+
-+ lock_rng ();
- /* To ease debugging we store 2 for a clock_gettime based
- * implementation and 1 for a rdtsc based code. */
- *r_active = jent_rng_collector? is_rng_available () : 0;
---
-2.8.0.rc3
-
diff --git a/main/libical/automake.patch b/main/libical/automake.patch
deleted file mode 100644
index 757220a62e..0000000000
--- a/main/libical/automake.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./configure.in.orig 2012-12-31 20:03:51.355227119 +0000
-+++ ./configure.in 2012-12-31 20:04:03.445327143 +0000
-@@ -5,7 +5,7 @@
- AC_CANONICAL_SYSTEM
- AM_INIT_AUTOMAKE
-
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADER(config.h)
-
- dnl Initialize maintainer mode
- AM_MAINTAINER_MODE
diff --git a/main/libnotify/skip-tests.patch b/main/libnotify/skip-tests.patch
deleted file mode 100644
index 164ac428ec..0000000000
--- a/main/libnotify/skip-tests.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 1f8525e..c55a3ce 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -190,7 +190,7 @@ am__define_uniq_tagged_files = \
- ETAGS = etags
- CTAGS = ctags
- CSCOPE = cscope
--DIST_SUBDIRS = libnotify docs tools tests
-+DIST_SUBDIRS = libnotify docs tools
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- distdir = $(PACKAGE)-$(VERSION)
- top_distdir = $(distdir)
diff --git a/main/libogg/nocxx.patch b/main/libogg/nocxx.patch
deleted file mode 100644
index beb1ab9006..0000000000
--- a/main/libogg/nocxx.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/configure 2004-12-07 21:34:23.205172545 +0000
-+++ b/configure 2004-12-07 21:37:17.726654782 +0000
-@@ -5148,10 +5148,8 @@
- :
- else
- { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
--See \`config.log' for more details." >&5
--echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
--See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }
-+See \`config.log' for more details." >&5;}
-+ { echo "C++ sucks, ignoring ..." >&5; }; }
- fi
-
- ac_ext=cc
diff --git a/main/libraw1394/fix-types.patch b/main/libraw1394/fix-types.patch
deleted file mode 100644
index d82cf815af..0000000000
--- a/main/libraw1394/fix-types.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff -ru libraw1394-2.1.0.orig/src/fw-iso.c libraw1394-2.1.0/src/fw-iso.c
---- libraw1394-2.1.0.orig/src/fw-iso.c 2012-06-27 23:10:19.000000000 +0300
-+++ libraw1394-2.1.0/src/fw-iso.c 2013-09-30 17:38:30.070506505 +0300
-@@ -303,7 +303,7 @@
- }
-
- static int handle_iso_event(raw1394handle_t handle,
-- struct epoll_closure *closure, __uint32_t events)
-+ struct epoll_closure *closure, uint32_t events)
- {
- fw_handle_t fwhandle = handle->mode.fw;
- struct fw_cdev_event_iso_interrupt *interrupt;
-diff -ru libraw1394-2.1.0.orig/src/fw.c libraw1394-2.1.0/src/fw.c
---- libraw1394-2.1.0.orig/src/fw.c 2012-07-08 21:27:52.000000000 +0300
-+++ libraw1394-2.1.0/src/fw.c 2013-09-30 17:38:30.070506505 +0300
-@@ -187,7 +187,7 @@
-
- static int
- handle_echo_pipe(raw1394handle_t handle,
-- struct epoll_closure *ec, __uint32_t events)
-+ struct epoll_closure *ec, uint32_t events)
- {
- quadlet_t value;
-
-@@ -258,7 +258,7 @@
-
- static int
- handle_device_event(raw1394handle_t handle,
-- struct epoll_closure *ec, __uint32_t events)
-+ struct epoll_closure *ec, uint32_t events)
- {
- fw_handle_t fwhandle = handle->mode.fw;
- union fw_cdev_event *u;
-@@ -421,7 +421,7 @@
-
- static int
- handle_inotify(raw1394handle_t handle, struct epoll_closure *ec,
-- __uint32_t events)
-+ uint32_t events)
- {
- fw_handle_t fwhandle = handle->mode.fw;
- struct inotify_event *event;
-diff -ru libraw1394-2.1.0.orig/src/fw.h libraw1394-2.1.0/src/fw.h
---- libraw1394-2.1.0.orig/src/fw.h 2012-07-08 21:27:52.000000000 +0300
-+++ libraw1394-2.1.0/src/fw.h 2013-09-30 17:38:42.330440087 +0300
-@@ -12,6 +12,7 @@
- #ifndef LIBRAW1394_FW_H
- #define LIBRAW1394_FW_H
-
-+#include <stdint.h>
- #include <stdlib.h>
- #include <byteswap.h>
-
-@@ -48,7 +49,7 @@
-
- struct epoll_closure {
- int (*func)(raw1394handle_t handle,
-- struct epoll_closure *closure, __uint32_t events);
-+ struct epoll_closure *closure, uint32_t events);
- };
-
- struct port {
diff --git a/main/libvirt/fix-fortify-virnetlink.patch b/main/libvirt/fix-fortify-virnetlink.patch
deleted file mode 100644
index 5b18494133..0000000000
--- a/main/libvirt/fix-fortify-virnetlink.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-avoid working around old and broken libnl-1.
-
-http://www.redhat.com/archives/libvir-list/2012-August/msg01699.html
-http://www.redhat.com/archives/libvir-list/2012-August/msg01699.html
-
-The workaround breaks fortify:
-
-... -c util/virnetdev.c -fPIC -DPIC -o util/.libs/libvirt_util_la-virnetdev.o
-In file included from ../gnulib/lib/stdio.h:43:0,
- from /usr/include/netlink/netlink.h:16,
- from /usr/include/netlink/msg.h:15,
- from util/virnetlink.h:33,
- from util/virnetdev.h:29,
- from util/virnetdev.c:25:
-/usr/include/fortify/stdio.h: In function 'snprintf':
-/usr/include/fortify/stdio.h:93:2: error: invalid use of '__builtin_va_arg_pack ()'
- return __snprintf_orig(s, n, fmt, __builtin_va_arg_pack());
- ^
-
-Remove the workaround and require fixed libnl.
-
---- ./src/util/virnetlink.h.orig
-+++ ./src/util/virnetlink.h
-@@ -24,17 +24,7 @@
- # include "virmacaddr.h"
-
- # if defined(__linux__) && defined(HAVE_LIBNL)
--
--/* Work around a bug where older libnl-1 headers expected older gcc
-- * semantics of 'extern inline' that conflict with C99 semantics. */
--# ifdef HAVE_LIBNL1
--# define inline
--# endif
- # include <netlink/msg.h>
--# ifdef HAVE_LIBNL1
--# undef inline
--# endif
--
- # else
-
- struct nl_msg;
diff --git a/main/llvm8/disable-FileSystemTest.CreateDir-perms-assert.patch b/main/llvm8/disable-FileSystemTest.CreateDir-perms-assert.patch
deleted file mode 100644
index e73ce9b6f0..0000000000
--- a/main/llvm8/disable-FileSystemTest.CreateDir-perms-assert.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Do not assert permissions of file created in /tmp directory.
-
-This assertion fails, probably due to some specific setup of /tmp
-on build servers.
-
- FAIL: LLVM-Unit :: Support/SupportTests/FileSystemTest.CreateDir (1293 of 17222)
- ******************** TEST 'LLVM-Unit :: Support/SupportTests/FileSystemTest.CreateDir' FAILED ********************
- Note: Google Test filter = FileSystemTest.CreateDir
- [==========] Running 1 test from 1 test case.
- [----------] Global test environment set-up.
- [----------] 1 test from FileSystemTest
- [ RUN ] FileSystemTest.CreateDir
- /home/buildozer/aports/testing/llvm3.9/src/llvm-3.9.1.src/unittests/Support/Path.cpp:591: Failure
- Value of: fs::perms::owner_read | fs::perms::owner_exe
- Actual: 320
- Expected: Status.permissions() & fs::perms::all_all
- Which is: 448
-
---- a/unittests/Support/Path.cpp
-+++ b/unittests/Support/Path.cpp
-@@ -579,23 +579,23 @@
- ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "foo"));
-
- #ifdef LLVM_ON_UNIX
-- // Set a 0000 umask so that we can test our directory permissions.
-- mode_t OldUmask = ::umask(0000);
--
-- fs::file_status Status;
-- ASSERT_NO_ERROR(
-- fs::create_directory(Twine(TestDirectory) + "baz500", false,
-- fs::perms::owner_read | fs::perms::owner_exe));
-- ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz500", Status));
-- ASSERT_EQ(Status.permissions() & fs::perms::all_all,
-- fs::perms::owner_read | fs::perms::owner_exe);
-- ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "baz777", false,
-- fs::perms::all_all));
-- ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz777", Status));
-- ASSERT_EQ(Status.permissions() & fs::perms::all_all, fs::perms::all_all);
--
-- // Restore umask to be safe.
-- ::umask(OldUmask);
-+// // Set a 0000 umask so that we can test our directory permissions.
-+// mode_t OldUmask = ::umask(0000);
-+//
-+// fs::file_status Status;
-+// ASSERT_NO_ERROR(
-+// fs::create_directory(Twine(TestDirectory) + "baz500", false,
-+// fs::perms::owner_read | fs::perms::owner_exe));
-+// ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz500", Status));
-+// ASSERT_EQ(Status.permissions() & fs::perms::all_all,
-+// fs::perms::owner_read | fs::perms::owner_exe);
-+// ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "baz777", false,
-+// fs::perms::all_all));
-+// ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz777", Status));
-+// ASSERT_EQ(Status.permissions() & fs::perms::all_all, fs::perms::all_all);
-+//
-+// // Restore umask to be safe.
-+// ::umask(OldUmask);
- #endif
-
- #ifdef LLVM_ON_WIN32
diff --git a/main/llvm9/disable-FileSystemTest.CreateDir-perms-assert.patch b/main/llvm9/disable-FileSystemTest.CreateDir-perms-assert.patch
deleted file mode 100644
index e73ce9b6f0..0000000000
--- a/main/llvm9/disable-FileSystemTest.CreateDir-perms-assert.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Do not assert permissions of file created in /tmp directory.
-
-This assertion fails, probably due to some specific setup of /tmp
-on build servers.
-
- FAIL: LLVM-Unit :: Support/SupportTests/FileSystemTest.CreateDir (1293 of 17222)
- ******************** TEST 'LLVM-Unit :: Support/SupportTests/FileSystemTest.CreateDir' FAILED ********************
- Note: Google Test filter = FileSystemTest.CreateDir
- [==========] Running 1 test from 1 test case.
- [----------] Global test environment set-up.
- [----------] 1 test from FileSystemTest
- [ RUN ] FileSystemTest.CreateDir
- /home/buildozer/aports/testing/llvm3.9/src/llvm-3.9.1.src/unittests/Support/Path.cpp:591: Failure
- Value of: fs::perms::owner_read | fs::perms::owner_exe
- Actual: 320
- Expected: Status.permissions() & fs::perms::all_all
- Which is: 448
-
---- a/unittests/Support/Path.cpp
-+++ b/unittests/Support/Path.cpp
-@@ -579,23 +579,23 @@
- ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "foo"));
-
- #ifdef LLVM_ON_UNIX
-- // Set a 0000 umask so that we can test our directory permissions.
-- mode_t OldUmask = ::umask(0000);
--
-- fs::file_status Status;
-- ASSERT_NO_ERROR(
-- fs::create_directory(Twine(TestDirectory) + "baz500", false,
-- fs::perms::owner_read | fs::perms::owner_exe));
-- ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz500", Status));
-- ASSERT_EQ(Status.permissions() & fs::perms::all_all,
-- fs::perms::owner_read | fs::perms::owner_exe);
-- ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "baz777", false,
-- fs::perms::all_all));
-- ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz777", Status));
-- ASSERT_EQ(Status.permissions() & fs::perms::all_all, fs::perms::all_all);
--
-- // Restore umask to be safe.
-- ::umask(OldUmask);
-+// // Set a 0000 umask so that we can test our directory permissions.
-+// mode_t OldUmask = ::umask(0000);
-+//
-+// fs::file_status Status;
-+// ASSERT_NO_ERROR(
-+// fs::create_directory(Twine(TestDirectory) + "baz500", false,
-+// fs::perms::owner_read | fs::perms::owner_exe));
-+// ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz500", Status));
-+// ASSERT_EQ(Status.permissions() & fs::perms::all_all,
-+// fs::perms::owner_read | fs::perms::owner_exe);
-+// ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "baz777", false,
-+// fs::perms::all_all));
-+// ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz777", Status));
-+// ASSERT_EQ(Status.permissions() & fs::perms::all_all, fs::perms::all_all);
-+//
-+// // Restore umask to be safe.
-+// ::umask(OldUmask);
- #endif
-
- #ifdef LLVM_ON_WIN32
diff --git a/main/lua-curl/fix-build-with-curl-7.62.0.patch b/main/lua-curl/fix-build-with-curl-7.62.0.patch
deleted file mode 100644
index fbd129bdab..0000000000
--- a/main/lua-curl/fix-build-with-curl-7.62.0.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Fix build with curl 7.62.0
-
-curl 7.62.0 deprecates the CURLE_SSL_CACERT error code, and unifies it
-with CURLE_PEER_FAILED_VERIFICATION. Adjust the errors list to match.
-
-This fixes the following build failure:
-
-src/lcerr_easy.h: In function 'lcurl_err_easy_mnemo':
-src/lcerror.c:32:22: error: duplicate case value
- #define ERR_ENTRY(E) case CURLE_##E: return #E;
- ^
-src/lcerr_easy.h:74:1: note: in expansion of macro 'ERR_ENTRY'
- ERR_ENTRY ( SSL_CACERT )
- ^~~~~~~~~
-src/lcerror.c:32:22: note: previously used here
- #define ERR_ENTRY(E) case CURLE_##E: return #E;
- ^
-src/lcerr_easy.h:65:1: note: in expansion of macro 'ERR_ENTRY'
- ERR_ENTRY ( PEER_FAILED_VERIFICATION )
- ^~~~~~~~~
----
- src/lcerr_easy.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/lcerr_easy.h b/src/lcerr_easy.h
-index 94ad143..895c6d8 100644
---- a/src/lcerr_easy.h
-+++ b/src/lcerr_easy.h
-@@ -62,7 +62,11 @@ ERR_ENTRY ( UNKNOWN_TELNET_OPTION ) /* User specified an unknown option */
- #endif
- ERR_ENTRY ( TELNET_OPTION_SYNTAX )
- ERR_ENTRY ( OBSOLETE50 )
-+#if LCURL_CURL_VER_GE(7,62,0)
-+ERR_ENTRY ( OBSOLETE51 )
-+#else
- ERR_ENTRY ( PEER_FAILED_VERIFICATION )
-+#endif
- ERR_ENTRY ( GOT_NOTHING )
- ERR_ENTRY ( SSL_ENGINE_NOTFOUND )
- ERR_ENTRY ( SSL_ENGINE_SETFAILED )
-@@ -71,7 +75,11 @@ ERR_ENTRY ( RECV_ERROR )
- ERR_ENTRY ( OBSOLETE57 )
- ERR_ENTRY ( SSL_CERTPROBLEM )
- ERR_ENTRY ( SSL_CIPHER )
-+#if LCURL_CURL_VER_GE(7,62,0)
-+ERR_ENTRY ( PEER_FAILED_VERIFICATION )
-+#else
- ERR_ENTRY ( SSL_CACERT )
-+#endif
- ERR_ENTRY ( BAD_CONTENT_ENCODING )
- ERR_ENTRY ( LDAP_INVALID_URL )
- ERR_ENTRY ( FILESIZE_EXCEEDED )
---
-2.19.2
-
diff --git a/main/lua-dbi/fix-table-maxn.patch b/main/lua-dbi/fix-table-maxn.patch
deleted file mode 100644
index a5036ab496..0000000000
--- a/main/lua-dbi/fix-table-maxn.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 23bac7124f27c7e36431932e77c68fca91c96c25 Mon Sep 17 00:00:00 2001
-From: sparked435 <aaron@zadzmo.org>
-Date: Thu, 24 Aug 2017 15:05:49 -0400
-Subject: [PATCH] Fix minor post-5.1 bug: table.maxn() has been removed. Should
- only trigger if no drivers are available, an error condition anyway.
-
-Patch-Source: https://github.com/mwild1/luadbi/commit/23bac7124f27c7e36431932e77c68fca91c96c25
----
- DBI.lua | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/DBI.lua b/DBI.lua
-index 4dc77d2..e1f504a 100644
---- a/DBI.lua
-+++ b/DBI.lua
-@@ -28,8 +28,8 @@ local function available_drivers()
- end
-
- -- no drivers available
-- if table.maxn(available) < 1 then
-- available = {'(None)'}
-+ if #available < 1 then
-+ available = {'(None)'}
- end
-
- return available
diff --git a/main/mg/missing-defines.patch b/main/mg/missing-defines.patch
deleted file mode 100644
index 58f5e109fa..0000000000
--- a/main/mg/missing-defines.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/fileio.c b/fileio.c
-index 4bb1f46..c937eb0 100644
---- a/fileio.c
-+++ b/fileio.c
-@@ -27,6 +27,14 @@
- #include "kbd.h"
- #include "pathnames.h"
-
-+#ifndef MAXNAMLEN
-+#define MAXNAMLEN 255
-+#endif
-+
-+#ifndef DEFFILEMODE
-+#define DEFFILEMODE 0666
-+#endif
-+
- static char *bkuplocation(const char *);
- static int bkupleavetmp(const char *);
-
-diff --git a/re_search.c b/re_search.c
-index 287030a..da44f00 100644
---- a/re_search.c
-+++ b/re_search.c
-@@ -34,6 +34,10 @@
- #define RE_NMATCH 10 /* max number of matches */
- #define REPLEN 256 /* max length of replacement string */
-
-+#ifndef REG_STARTEND
-+#define REG_STARTEND 4
-+#endif
-+
- char re_pat[NPAT]; /* regex pattern */
- int re_srch_lastdir = SRCH_NOPR; /* last search flags */
- int casefoldsearch = TRUE; /* does search ignore case? */
diff --git a/main/mg/tree.h b/main/mg/tree.h
deleted file mode 100644
index 1cce727868..0000000000
--- a/main/mg/tree.h
+++ /dev/null
@@ -1,765 +0,0 @@
-/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */
-/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
-/* $FreeBSD$ */
-
-/*-
- * Copyright 2002 Niels Provos <provos@citi.umich.edu>
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#ifndef _SYS_TREE_H_
-#define _SYS_TREE_H_
-
-#include <sys/cdefs.h>
-
-/*
- * This file defines data structures for different types of trees:
- * splay trees and red-black trees.
- *
- * A splay tree is a self-organizing data structure. Every operation
- * on the tree causes a splay to happen. The splay moves the requested
- * node to the root of the tree and partly rebalances it.
- *
- * This has the benefit that request locality causes faster lookups as
- * the requested nodes move to the top of the tree. On the other hand,
- * every lookup causes memory writes.
- *
- * The Balance Theorem bounds the total access time for m operations
- * and n inserts on an initially empty tree as O((m + n)lg n). The
- * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
- *
- * A red-black tree is a binary search tree with the node color as an
- * extra attribute. It fulfills a set of conditions:
- * - every search path from the root to a leaf consists of the
- * same number of black nodes,
- * - each red node (except for the root) has a black parent,
- * - each leaf node is black.
- *
- * Every operation on a red-black tree is bounded as O(lg n).
- * The maximum height of a red-black tree is 2lg (n+1).
- */
-
-#define SPLAY_HEAD(name, type) \
-struct name { \
- struct type *sph_root; /* root of the tree */ \
-}
-
-#define SPLAY_INITIALIZER(root) \
- { NULL }
-
-#define SPLAY_INIT(root) do { \
- (root)->sph_root = NULL; \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_ENTRY(type) \
-struct { \
- struct type *spe_left; /* left element */ \
- struct type *spe_right; /* right element */ \
-}
-
-#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
-#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
-#define SPLAY_ROOT(head) (head)->sph_root
-#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
-
-/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
-#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- (head)->sph_root = tmp; \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_LINKLEFT(head, tmp, field) do { \
- SPLAY_LEFT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_LINKRIGHT(head, tmp, field) do { \
- SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
- tmp = (head)->sph_root; \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
-} while (/*CONSTCOND*/ 0)
-
-#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
- SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
- SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
- SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
- SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
-} while (/*CONSTCOND*/ 0)
-
-/* Generates prototypes and inline functions */
-
-#define SPLAY_PROTOTYPE(name, type, field, cmp) \
-void name##_SPLAY(struct name *, struct type *); \
-void name##_SPLAY_MINMAX(struct name *, int); \
-struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
-struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
- \
-/* Finds the node with the same key as elm */ \
-static __inline struct type * \
-name##_SPLAY_FIND(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) \
- return(NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) \
- return (head->sph_root); \
- return (NULL); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_NEXT(struct name *head, struct type *elm) \
-{ \
- name##_SPLAY(head, elm); \
- if (SPLAY_RIGHT(elm, field) != NULL) { \
- elm = SPLAY_RIGHT(elm, field); \
- while (SPLAY_LEFT(elm, field) != NULL) { \
- elm = SPLAY_LEFT(elm, field); \
- } \
- } else \
- elm = NULL; \
- return (elm); \
-} \
- \
-static __inline struct type * \
-name##_SPLAY_MIN_MAX(struct name *head, int val) \
-{ \
- name##_SPLAY_MINMAX(head, val); \
- return (SPLAY_ROOT(head)); \
-}
-
-/* Main splay operation.
- * Moves node close to the key of elm to top
- */
-#define SPLAY_GENERATE(name, type, field, cmp) \
-struct type * \
-name##_SPLAY_INSERT(struct name *head, struct type *elm) \
-{ \
- if (SPLAY_EMPTY(head)) { \
- SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
- } else { \
- int __comp; \
- name##_SPLAY(head, elm); \
- __comp = (cmp)(elm, (head)->sph_root); \
- if(__comp < 0) { \
- SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
- SPLAY_RIGHT(elm, field) = (head)->sph_root; \
- SPLAY_LEFT((head)->sph_root, field) = NULL; \
- } else if (__comp > 0) { \
- SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
- SPLAY_LEFT(elm, field) = (head)->sph_root; \
- SPLAY_RIGHT((head)->sph_root, field) = NULL; \
- } else \
- return ((head)->sph_root); \
- } \
- (head)->sph_root = (elm); \
- return (NULL); \
-} \
- \
-struct type * \
-name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *__tmp; \
- if (SPLAY_EMPTY(head)) \
- return (NULL); \
- name##_SPLAY(head, elm); \
- if ((cmp)(elm, (head)->sph_root) == 0) { \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
- (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
- } else { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
- name##_SPLAY(head, elm); \
- SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
- } \
- return (elm); \
- } \
- return (NULL); \
-} \
- \
-void \
-name##_SPLAY(struct name *head, struct type *elm) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
- int __comp; \
-\
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
- __left = __right = &__node; \
-\
- while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if ((cmp)(elm, __tmp) > 0){ \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-} \
- \
-/* Splay with either the minimum or the maximum element \
- * Used to find minimum or maximum element in tree. \
- */ \
-void name##_SPLAY_MINMAX(struct name *head, int __comp) \
-{ \
- struct type __node, *__left, *__right, *__tmp; \
-\
- SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
- __left = __right = &__node; \
-\
- while (1) { \
- if (__comp < 0) { \
- __tmp = SPLAY_LEFT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp < 0){ \
- SPLAY_ROTATE_RIGHT(head, __tmp, field); \
- if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKLEFT(head, __right, field); \
- } else if (__comp > 0) { \
- __tmp = SPLAY_RIGHT((head)->sph_root, field); \
- if (__tmp == NULL) \
- break; \
- if (__comp > 0) { \
- SPLAY_ROTATE_LEFT(head, __tmp, field); \
- if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
- break; \
- } \
- SPLAY_LINKRIGHT(head, __left, field); \
- } \
- } \
- SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
-}
-
-#define SPLAY_NEGINF -1
-#define SPLAY_INF 1
-
-#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
-#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
-#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
-#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
-#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
-#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
- : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
-
-#define SPLAY_FOREACH(x, name, head) \
- for ((x) = SPLAY_MIN(name, head); \
- (x) != NULL; \
- (x) = SPLAY_NEXT(name, head, x))
-
-/* Macros that define a red-black tree */
-#define RB_HEAD(name, type) \
-struct name { \
- struct type *rbh_root; /* root of the tree */ \
-}
-
-#define RB_INITIALIZER(root) \
- { NULL }
-
-#define RB_INIT(root) do { \
- (root)->rbh_root = NULL; \
-} while (/*CONSTCOND*/ 0)
-
-#define RB_BLACK 0
-#define RB_RED 1
-#define RB_ENTRY(type) \
-struct { \
- struct type *rbe_left; /* left element */ \
- struct type *rbe_right; /* right element */ \
- struct type *rbe_parent; /* parent element */ \
- int rbe_color; /* node color */ \
-}
-
-#define RB_LEFT(elm, field) (elm)->field.rbe_left
-#define RB_RIGHT(elm, field) (elm)->field.rbe_right
-#define RB_PARENT(elm, field) (elm)->field.rbe_parent
-#define RB_COLOR(elm, field) (elm)->field.rbe_color
-#define RB_ROOT(head) (head)->rbh_root
-#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
-
-#define RB_SET(elm, parent, field) do { \
- RB_PARENT(elm, field) = parent; \
- RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
- RB_COLOR(elm, field) = RB_RED; \
-} while (/*CONSTCOND*/ 0)
-
-#define RB_SET_BLACKRED(black, red, field) do { \
- RB_COLOR(black, field) = RB_BLACK; \
- RB_COLOR(red, field) = RB_RED; \
-} while (/*CONSTCOND*/ 0)
-
-#ifndef RB_AUGMENT
-#define RB_AUGMENT(x) do {} while (0)
-#endif
-
-#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
- (tmp) = RB_RIGHT(elm, field); \
- if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \
- RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_LEFT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (/*CONSTCOND*/ 0)
-
-#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
- (tmp) = RB_LEFT(elm, field); \
- if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \
- RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
- } \
- RB_AUGMENT(elm); \
- if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
- if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
- RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
- else \
- RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
- } else \
- (head)->rbh_root = (tmp); \
- RB_RIGHT(tmp, field) = (elm); \
- RB_PARENT(elm, field) = (tmp); \
- RB_AUGMENT(tmp); \
- if ((RB_PARENT(tmp, field))) \
- RB_AUGMENT(RB_PARENT(tmp, field)); \
-} while (/*CONSTCOND*/ 0)
-
-/* Generates prototypes and inline functions */
-#define RB_PROTOTYPE(name, type, field, cmp) \
- RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
-#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
- RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
-#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
-attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
-attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
-attr struct type *name##_RB_REMOVE(struct name *, struct type *); \
-attr struct type *name##_RB_INSERT(struct name *, struct type *); \
-attr struct type *name##_RB_FIND(struct name *, struct type *); \
-attr struct type *name##_RB_NFIND(struct name *, struct type *); \
-attr struct type *name##_RB_NEXT(struct type *); \
-attr struct type *name##_RB_PREV(struct type *); \
-attr struct type *name##_RB_MINMAX(struct name *, int); \
- \
-
-/* Main rb operation.
- * Moves node close to the key of elm to top
- */
-#define RB_GENERATE(name, type, field, cmp) \
- RB_GENERATE_INTERNAL(name, type, field, cmp,)
-#define RB_GENERATE_STATIC(name, type, field, cmp) \
- RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
-#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
-attr void \
-name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
-{ \
- struct type *parent, *gparent, *tmp; \
- while ((parent = RB_PARENT(elm, field)) != NULL && \
- RB_COLOR(parent, field) == RB_RED) { \
- gparent = RB_PARENT(parent, field); \
- if (parent == RB_LEFT(gparent, field)) { \
- tmp = RB_RIGHT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field);\
- elm = gparent; \
- continue; \
- } \
- if (RB_RIGHT(parent, field) == elm) { \
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_RIGHT(head, gparent, tmp, field); \
- } else { \
- tmp = RB_LEFT(gparent, field); \
- if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
- RB_COLOR(tmp, field) = RB_BLACK; \
- RB_SET_BLACKRED(parent, gparent, field);\
- elm = gparent; \
- continue; \
- } \
- if (RB_LEFT(parent, field) == elm) { \
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- tmp = parent; \
- parent = elm; \
- elm = tmp; \
- } \
- RB_SET_BLACKRED(parent, gparent, field); \
- RB_ROTATE_LEFT(head, gparent, tmp, field); \
- } \
- } \
- RB_COLOR(head->rbh_root, field) = RB_BLACK; \
-} \
- \
-attr void \
-name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
-{ \
- struct type *tmp; \
- while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
- elm != RB_ROOT(head)) { \
- if (RB_LEFT(parent, field) == elm) { \
- tmp = RB_RIGHT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- tmp = RB_RIGHT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
- struct type *oleft; \
- if ((oleft = RB_LEFT(tmp, field)) \
- != NULL) \
- RB_COLOR(oleft, field) = RB_BLACK;\
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_RIGHT(head, tmp, oleft, field);\
- tmp = RB_RIGHT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_RIGHT(tmp, field)) \
- RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
- RB_ROTATE_LEFT(head, parent, tmp, field);\
- elm = RB_ROOT(head); \
- break; \
- } \
- } else { \
- tmp = RB_LEFT(parent, field); \
- if (RB_COLOR(tmp, field) == RB_RED) { \
- RB_SET_BLACKRED(tmp, parent, field); \
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- tmp = RB_LEFT(parent, field); \
- } \
- if ((RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
- (RB_RIGHT(tmp, field) == NULL || \
- RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
- RB_COLOR(tmp, field) = RB_RED; \
- elm = parent; \
- parent = RB_PARENT(elm, field); \
- } else { \
- if (RB_LEFT(tmp, field) == NULL || \
- RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
- struct type *oright; \
- if ((oright = RB_RIGHT(tmp, field)) \
- != NULL) \
- RB_COLOR(oright, field) = RB_BLACK;\
- RB_COLOR(tmp, field) = RB_RED; \
- RB_ROTATE_LEFT(head, tmp, oright, field);\
- tmp = RB_LEFT(parent, field); \
- } \
- RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
- RB_COLOR(parent, field) = RB_BLACK; \
- if (RB_LEFT(tmp, field)) \
- RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
- RB_ROTATE_RIGHT(head, parent, tmp, field);\
- elm = RB_ROOT(head); \
- break; \
- } \
- } \
- } \
- if (elm) \
- RB_COLOR(elm, field) = RB_BLACK; \
-} \
- \
-attr struct type * \
-name##_RB_REMOVE(struct name *head, struct type *elm) \
-{ \
- struct type *child, *parent, *old = elm; \
- int color; \
- if (RB_LEFT(elm, field) == NULL) \
- child = RB_RIGHT(elm, field); \
- else if (RB_RIGHT(elm, field) == NULL) \
- child = RB_LEFT(elm, field); \
- else { \
- struct type *left; \
- elm = RB_RIGHT(elm, field); \
- while ((left = RB_LEFT(elm, field)) != NULL) \
- elm = left; \
- child = RB_RIGHT(elm, field); \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
- if (RB_PARENT(elm, field) == old) \
- parent = elm; \
- (elm)->field = (old)->field; \
- if (RB_PARENT(old, field)) { \
- if (RB_LEFT(RB_PARENT(old, field), field) == old)\
- RB_LEFT(RB_PARENT(old, field), field) = elm;\
- else \
- RB_RIGHT(RB_PARENT(old, field), field) = elm;\
- RB_AUGMENT(RB_PARENT(old, field)); \
- } else \
- RB_ROOT(head) = elm; \
- RB_PARENT(RB_LEFT(old, field), field) = elm; \
- if (RB_RIGHT(old, field)) \
- RB_PARENT(RB_RIGHT(old, field), field) = elm; \
- if (parent) { \
- left = parent; \
- do { \
- RB_AUGMENT(left); \
- } while ((left = RB_PARENT(left, field)) != NULL); \
- } \
- goto color; \
- } \
- parent = RB_PARENT(elm, field); \
- color = RB_COLOR(elm, field); \
- if (child) \
- RB_PARENT(child, field) = parent; \
- if (parent) { \
- if (RB_LEFT(parent, field) == elm) \
- RB_LEFT(parent, field) = child; \
- else \
- RB_RIGHT(parent, field) = child; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = child; \
-color: \
- if (color == RB_BLACK) \
- name##_RB_REMOVE_COLOR(head, parent, child); \
- return (old); \
-} \
- \
-/* Inserts a node into the RB tree */ \
-attr struct type * \
-name##_RB_INSERT(struct name *head, struct type *elm) \
-{ \
- struct type *tmp; \
- struct type *parent = NULL; \
- int comp = 0; \
- tmp = RB_ROOT(head); \
- while (tmp) { \
- parent = tmp; \
- comp = (cmp)(elm, parent); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- RB_SET(elm, parent, field); \
- if (parent != NULL) { \
- if (comp < 0) \
- RB_LEFT(parent, field) = elm; \
- else \
- RB_RIGHT(parent, field) = elm; \
- RB_AUGMENT(parent); \
- } else \
- RB_ROOT(head) = elm; \
- name##_RB_INSERT_COLOR(head, elm); \
- return (NULL); \
-} \
- \
-/* Finds the node with the same key as elm */ \
-attr struct type * \
-name##_RB_FIND(struct name *head, struct type *elm) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- int comp; \
- while (tmp) { \
- comp = cmp(elm, tmp); \
- if (comp < 0) \
- tmp = RB_LEFT(tmp, field); \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- return (NULL); \
-} \
- \
-/* Finds the first node greater than or equal to the search key */ \
-attr struct type * \
-name##_RB_NFIND(struct name *head, struct type *elm) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- struct type *res = NULL; \
- int comp; \
- while (tmp) { \
- comp = cmp(elm, tmp); \
- if (comp < 0) { \
- res = tmp; \
- tmp = RB_LEFT(tmp, field); \
- } \
- else if (comp > 0) \
- tmp = RB_RIGHT(tmp, field); \
- else \
- return (tmp); \
- } \
- return (res); \
-} \
- \
-/* ARGSUSED */ \
-attr struct type * \
-name##_RB_NEXT(struct type *elm) \
-{ \
- if (RB_RIGHT(elm, field)) { \
- elm = RB_RIGHT(elm, field); \
- while (RB_LEFT(elm, field)) \
- elm = RB_LEFT(elm, field); \
- } else { \
- if (RB_PARENT(elm, field) && \
- (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- else { \
- while (RB_PARENT(elm, field) && \
- (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
- elm = RB_PARENT(elm, field); \
- elm = RB_PARENT(elm, field); \
- } \
- } \
- return (elm); \
-} \
- \
-/* ARGSUSED */ \
-attr struct type * \
-name##_RB_PREV(struct type *elm) \
-{ \
- if (RB_LEFT(elm, field)) { \
- elm = RB_LEFT(elm, field); \
- while (RB_RIGHT(elm, field)) \
- elm = RB_RIGHT(elm, field); \
- } else { \
- if (RB_PARENT(elm, field) && \
- (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \
- elm = RB_PARENT(elm, field); \
- else { \
- while (RB_PARENT(elm, field) && \
- (elm == RB_LEFT(RB_PARENT(elm, field), field)))\
- elm = RB_PARENT(elm, field); \
- elm = RB_PARENT(elm, field); \
- } \
- } \
- return (elm); \
-} \
- \
-attr struct type * \
-name##_RB_MINMAX(struct name *head, int val) \
-{ \
- struct type *tmp = RB_ROOT(head); \
- struct type *parent = NULL; \
- while (tmp) { \
- parent = tmp; \
- if (val < 0) \
- tmp = RB_LEFT(tmp, field); \
- else \
- tmp = RB_RIGHT(tmp, field); \
- } \
- return (parent); \
-}
-
-#define RB_NEGINF -1
-#define RB_INF 1
-
-#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
-#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
-#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
-#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y)
-#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
-#define RB_PREV(name, x, y) name##_RB_PREV(y)
-#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
-#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
-
-#define RB_FOREACH(x, name, head) \
- for ((x) = RB_MIN(name, head); \
- (x) != NULL; \
- (x) = name##_RB_NEXT(x))
-
-#define RB_FOREACH_FROM(x, name, y) \
- for ((x) = (y); \
- ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
- (x) = (y))
-
-#define RB_FOREACH_SAFE(x, name, head, y) \
- for ((x) = RB_MIN(name, head); \
- ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
- (x) = (y))
-
-#define RB_FOREACH_REVERSE(x, name, head) \
- for ((x) = RB_MAX(name, head); \
- (x) != NULL; \
- (x) = name##_RB_PREV(x))
-
-#define RB_FOREACH_REVERSE_FROM(x, name, y) \
- for ((x) = (y); \
- ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
- (x) = (y))
-
-#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
- for ((x) = RB_MAX(name, head); \
- ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
- (x) = (y))
-
-#endif /* _SYS_TREE_H_ */
diff --git a/main/newt/parallel-build.patch b/main/newt/parallel-build.patch
deleted file mode 100644
index 5502dc982e..0000000000
--- a/main/newt/parallel-build.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./Makefile.in.orig 2013-10-21 09:24:07.662175351 +0000
-+++ ./Makefile.in 2013-10-21 09:24:45.692593150 +0000
-@@ -111,7 +111,7 @@
- $(LIBNEWT): $(LIBOBJS)
- ar rv $@ $^
-
--newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
-+newt.o $(SHAREDDIR)/newt.o: newt.c Makefile $(SHAREDDIR)
-
- veryclean: clean
- rm -f .depend *.pc
-@@ -133,7 +133,7 @@
- ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT)
- ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
-
--$(SHAREDDIR)/%.o : %.c
-+$(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
- $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
-
- install: $(LIBNEWT) install-sh whiptail
diff --git a/main/ngircd/client_user_len.patch b/main/ngircd/client_user_len.patch
deleted file mode 100644
index 34884acbbb..0000000000
--- a/main/ngircd/client_user_len.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/ngircd/defines.h.orig
-+++ ./src/ngircd/defines.h
-@@ -96,7 +96,7 @@
- #define CLIENT_PASS_LEN 21
-
- /** Max. length of user name ("login"; incl. NULL), RFC 2812, section 1.2.1. */
--#define CLIENT_USER_LEN 10
-+#define CLIENT_USER_LEN 64
-
- /** Max. length of "real names" (including NULL). */
- #define CLIENT_NAME_LEN 32
diff --git a/main/ngrep/no-strip.patch b/main/ngrep/no-strip.patch
deleted file mode 100644
index b9c20e7865..0000000000
--- a/main/ngrep/no-strip.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./configure.in.orig
-+++ ./configure.in
-@@ -161,7 +161,6 @@
- dnl OS-specific options
- dnl
-
--STRIPFLAG="-s"
- HAVE_DUMB_UDPHDR="0"
-
- case "$target_os" in
diff --git a/main/open-iscsi/ldflags.patch b/main/open-iscsi/ldflags.patch
deleted file mode 100644
index f039f99284..0000000000
--- a/main/open-iscsi/ldflags.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/usr/Makefile b/usr/Makefile
-index f9445ad..6d8ff62 100644
---- a/usr/Makefile
-+++ b/usr/Makefile
-@@ -60,14 +60,14 @@ all: $(PROGRAMS)
-
- iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
- iscsid.o session_mgmt.o discoveryd.o mntcheck.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lisns -lcrypto -lrt -lmount $(ISCSI_LIB)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lisns -lcrypto -lrt -lmount $(ISCSI_LIB) $(LDFLAGS)
-
- iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o mntcheck.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lisns -lcrypto -lmount $(ISCSI_LIB)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lisns -lcrypto -lmount $(ISCSI_LIB) $(LDFLAGS)
-
- iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
- iscsistart.o statics.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt $(ISCSI_LIB)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt $(ISCSI_LIB) $(LDFLAGS)
- clean:
- rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
-
-diff --git a/utils/Makefile b/utils/Makefile
-index f65f1e7..472a1b4 100644
---- a/utils/Makefile
-+++ b/utils/Makefile
-@@ -7,7 +7,7 @@ PROGRAMS = iscsi-iname
- all: $(PROGRAMS)
-
- iscsi-iname: md5.o iscsi-iname.o
-- $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@
-+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@ $(LDFLAGS)
-
- clean:
- rm -f *.o $(PROGRAMS) .depend
diff --git a/main/open-iscsi/open-iscsi-include-sysmacros.patch b/main/open-iscsi/open-iscsi-include-sysmacros.patch
deleted file mode 100644
index 42d60201e3..0000000000
--- a/main/open-iscsi/open-iscsi-include-sysmacros.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/iscsiuio/src/unix/libs/bnx2x.c
-+++ b/iscsiuio/src/unix/libs/bnx2x.c
-@@ -47,6 +47,7 @@
- #include <sys/mman.h>
- #include <sys/ioctl.h>
- #include <sys/types.h>
-+#include <sys/sysmacros.h>
- #include <sys/stat.h>
- #include <sys/user.h>
- #include <fcntl.h>
---- a/iscsiuio/src/unix/libs/bnx2.c
-+++ b/iscsiuio/src/unix/libs/bnx2.c
-@@ -42,6 +42,7 @@
- #include <arpa/inet.h>
- #include <sys/mman.h>
- #include <sys/types.h>
-+#include <sys/sysmacros.h>
- #include <sys/stat.h>
- #include <sys/user.h>
- #include <fcntl.h>
diff --git a/main/open-iscsi/static-inline.patch b/main/open-iscsi/static-inline.patch
deleted file mode 100644
index 3be54b6a31..0000000000
--- a/main/open-iscsi/static-inline.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/iscsiuio/src/uip/ipv6.c b/iscsiuio/src/uip/ipv6.c
-index ced98a6..05efa73 100644
---- a/iscsiuio/src/uip/ipv6.c
-+++ b/iscsiuio/src/uip/ipv6.c
-@@ -49,7 +49,7 @@
- #include "dhcpv6.h"
- #include "ping.h"
-
--inline int best_match_bufcmp(u8_t *a, u8_t *b, int len)
-+static inline int best_match_bufcmp(u8_t *a, u8_t *b, int len)
- {
- int i;
-
diff --git a/main/openldap/CVE-2017-9287.patch b/main/openldap/CVE-2017-9287.patch
deleted file mode 100644
index 1599c13315..0000000000
--- a/main/openldap/CVE-2017-9287.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0cee1ffb6021b1aae3fcc9581699da1c85a6dd6e Mon Sep 17 00:00:00 2001
-From: Ryan Tandy <ryan@nardis.ca>
-Date: Wed, 17 May 2017 20:07:39 -0700
-Subject: [PATCH] ITS#8655 fix double free on paged search with pagesize 0
-
-Fixes a double free when a search includes the Paged Results control
-with a page size of 0 and the search base matches the filter.
----
- servers/slapd/back-mdb/search.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c
-index 301d1a4..43442aa 100644
---- a/servers/slapd/back-mdb/search.c
-+++ b/servers/slapd/back-mdb/search.c
-@@ -1066,7 +1066,8 @@ notfound:
- /* check size limit */
- if ( get_pagedresults(op) > SLAP_CONTROL_IGNORED ) {
- if ( rs->sr_nentries >= ((PagedResultsState *)op->o_pagedresults_state)->ps_size ) {
-- mdb_entry_return( op, e );
-+ if (e != base)
-+ mdb_entry_return( op, e );
- e = NULL;
- send_paged_response( op, rs, &lastid, tentries );
- goto done;
---
-1.7.10.4
-
diff --git a/main/p11-kit/strerror_l.patch b/main/p11-kit/strerror_l.patch
deleted file mode 100644
index bb9ab581ca..0000000000
--- a/main/p11-kit/strerror_l.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-reported upstream:
-https://github.com/p11-glue/p11-kit/issues/147
-
---- ./common/message.c.orig
-+++ ./common/message.c
-@@ -118,7 +118,7 @@
- buffer[length] = 0;
-
- snprintf (strerr, sizeof (strerr), "Unknown error %d", errnum);
--#ifdef HAVE_STRERROR_L
-+#if defined(HAVE_STRERROR_L) && defined(__GLIBC__)
- loc = uselocale ((locale_t) 0);
- if (loc != NULL)
- strncpy (strerr, strerror_l (errnum, loc), sizeof (strerr));
diff --git a/main/partimage/libressl.patch b/main/partimage/libressl.patch
deleted file mode 100644
index 47285c1121..0000000000
--- a/main/partimage/libressl.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/src/client/netclient.cpp b/src/client/netclient.cpp
-index 30b8d5c..c761473 100644
---- a/src/client/netclient.cpp
-+++ b/src/client/netclient.cpp
-@@ -43,7 +43,7 @@ CNetClient::CNetClient(bool bMustLogin, bool bUseSSL):CNet()
- {
- showDebug(3, "initializing client ssl\n");
- SSLeay_add_ssl_algorithms();
-- meth = SSLv2_client_method();
-+ meth = TLS_client_method();
- SSL_load_error_strings();
- ctx = SSL_CTX_new(meth);
- if (!ctx)
-diff --git a/src/server/netserver.cpp b/src/server/netserver.cpp
-index b3ba1c7..6bd9944 100644
---- a/src/server/netserver.cpp
-+++ b/src/server/netserver.cpp
-@@ -39,7 +39,7 @@ CNetServer::CNetServer(unsigned short int port):CNet()
- {
- SSL_load_error_strings();
- SSLeay_add_ssl_algorithms();
-- meth = SSLv23_server_method();
-+ meth = TLS_server_method();
- ctx = SSL_CTX_new(meth);
- if (!ctx)
- {
diff --git a/main/perl-params-classify/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch b/main/perl-params-classify/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch
deleted file mode 100644
index a3964c8e2b..0000000000
--- a/main/perl-params-classify/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 0d301779bd42da52b4f8e13a667499846fc2cc55 Mon Sep 17 00:00:00 2001
-From: Reini Urban <rurban@cpanel.net>
-Date: Tue, 14 Jun 2016 17:08:24 +0200
-Subject: [PATCH] Fix 5.25 or 5.22/24 with PERL_OP_PARENT
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes RT #114490
-
-Signed-off-by: Petr Písař <ppisar@redhat.com>
----
- lib/Params/Classify.xs | 36 ++++++++++++++++++++++++++----------
- 1 file changed, 26 insertions(+), 10 deletions(-)
-
-diff --git a/lib/Params/Classify.xs b/lib/Params/Classify.xs
-index 15a5ad5..f4012fd 100644
---- a/lib/Params/Classify.xs
-+++ b/lib/Params/Classify.xs
-@@ -123,6 +123,22 @@ static void *THX_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, void *from)
- # define sv_is_regexp(sv) 0
- #endif /* <5.11.0 */
-
-+
-+#ifndef OpSIBLING
-+# ifdef PERL_OP_PARENT
-+# define OpSIBLING(o) (0 + (o)->op_moresib ? (o)->op_sibparent : NULL)
-+# define OpMAYBESIB_set(o, sib, parent) \
-+ ((o)->op_sibparent = ((o)->op_moresib = cBOOL(sib)) ? (sib) : (parent))
-+# else
-+# define OpSIBLING(o) (0 + (o)->op_sibling)
-+# if PERL_VERSION_GE(5,11,0)
-+# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
-+# else
-+# define OpMAYBESIB_set(o, sib, parent) ((o)->op_moresib = cBOOL(sib), (o)->op_sibling = (sib))
-+# endif
-+# endif
-+#endif
-+
- #define sv_is_undef(sv) (!sv_is_glob(sv) && !sv_is_regexp(sv) && !SvOK(sv))
-
- #define sv_is_string(sv) \
-@@ -631,8 +647,8 @@ static OP *myck_entersub(pTHX_ OP *op)
- OP *(*ppfunc)(pTHX);
- I32 cvflags;
- pushop = cUNOPx(op)->op_first;
-- if(!pushop->op_sibling) pushop = cUNOPx(pushop)->op_first;
-- for(cvop = pushop; cvop->op_sibling; cvop = cvop->op_sibling) ;
-+ if(!OpSIBLING(pushop)) pushop = cUNOPx(pushop)->op_first;
-+ for(cvop = pushop; OpSIBLING(cvop); cvop = OpSIBLING(cvop)) ;
- if(!(cvop->op_type == OP_RV2CV &&
- !(cvop->op_private & OPpENTERSUB_AMPER) &&
- (cv = rvop_cv(cUNOPx(cvop)->op_first)) &&
-@@ -641,20 +657,20 @@ static OP *myck_entersub(pTHX_ OP *op)
- return nxck_entersub(aTHX_ op);
- cvflags = CvXSUBANY(cv).any_i32;
- op = nxck_entersub(aTHX_ op); /* for prototype checking */
-- aop = pushop->op_sibling;
-- bop = aop->op_sibling;
-+ aop = OpSIBLING(pushop);
-+ bop = OpSIBLING(aop);
- if(bop == cvop) {
- if(!(cvflags & PC_ALLOW_UNARY)) return op;
- unary:
-- pushop->op_sibling = bop;
-- aop->op_sibling = NULL;
-+ OpMAYBESIB_set(pushop, bop, NULL);
-+ OpMAYBESIB_set(aop, NULL, NULL);
- op_free(op);
- op = newUNOP(OP_NULL, 0, aop);
- op->op_type = OP_RAND;
- op->op_ppaddr = ppfunc;
- op->op_private = (U8)cvflags;
- return op;
-- } else if(bop && bop->op_sibling == cvop) {
-+ } else if(bop && OpSIBLING(bop) == cvop) {
- if(!(cvflags & PC_ALLOW_BINARY)) return op;
- if(ppfunc == THX_pp_check_sclass &&
- (cvflags & PC_TYPE_MASK) == SCLASS_REF) {
-@@ -673,9 +689,9 @@ static OP *myck_entersub(pTHX_ OP *op)
- cvflags &= ~PC_TYPE_MASK;
- ppfunc = THX_pp_check_dyn_battr;
- }
-- pushop->op_sibling = cvop;
-- aop->op_sibling = NULL;
-- bop->op_sibling = NULL;
-+ OpMAYBESIB_set(pushop, cvop, NULL);
-+ OpMAYBESIB_set(aop, NULL, NULL);
-+ OpMAYBESIB_set(bop, NULL, NULL);
- op_free(op);
- op = newBINOP(OP_NULL, 0, aop, bop);
- op->op_type = OP_RAND;
---
-2.9.4
-
diff --git a/main/py3-future/re-enable-python3-5.patch b/main/py3-future/re-enable-python3-5.patch
deleted file mode 100644
index a5f6fecd6b..0000000000
--- a/main/py3-future/re-enable-python3-5.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From ad0ea5e11a329a1070461b4d611a34ba702a93b8 Mon Sep 17 00:00:00 2001
-From: py <pengyu.py@gmail.com>
-Date: Mon, 4 Jul 2016 11:04:26 +0800
-Subject: [PATCH 1/2] Revert "Revert "Enable Py3.5 tests on Travis and add
- Py3.5 trove classifier to setup.py""
-
-Travis-CI supports Py3.5 now.
-
-This reverts commit 6caac864d578c378479e0f2b8d78d6b3ba115075.
----
- .travis.yml | 1 +
- setup.py | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/.travis.yml b/.travis.yml
-index 6e20573..da167c1 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -1,6 +1,7 @@
- language: python
-
- python:
-+ - "3.5"
- - "3.4"
- - "3.3"
- - "2.7"
-diff --git a/setup.py b/setup.py
-index 7c81a09..79b7125 100755
---- a/setup.py
-+++ b/setup.py
-@@ -106,6 +106,7 @@
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.3",
- "Programming Language :: Python :: 3.4",
-+ "Programming Language :: Python :: 3.5",
- "License :: OSI Approved",
- "License :: OSI Approved :: MIT License",
- "Development Status :: 4 - Beta",
-
-From 0c2c021a935489bed280e37442ec2d3f79241d1a Mon Sep 17 00:00:00 2001
-From: py <pengyu.py@gmail.com>
-Date: Mon, 4 Jul 2016 11:17:54 +0800
-Subject: [PATCH 2/2] pep461 should pass under py35
-
-revert d141ee8953e9995d0bc6ed84d073db2fa2a0eee8
----
- tests/test_future/test_bytes.py | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/tests/test_future/test_bytes.py b/tests/test_future/test_bytes.py
-index f30e740..4ca5d40 100644
---- a/tests/test_future/test_bytes.py
-+++ b/tests/test_future/test_bytes.py
-@@ -7,6 +7,8 @@
- from future.builtins import *
- from future import utils
-
-+import sys
-+
- from numbers import Integral
- from future.tests.base import unittest, expectedFailurePY2
-
-@@ -534,13 +536,14 @@ def test_maketrans(self):
- self.assertRaises(ValueError, bytes.maketrans, b'abc', b'xyzq')
- self.assertRaises(TypeError, bytes.maketrans, 'abc', 'def')
-
-- @unittest.expectedFailure
- def test_mod(self):
- """
- From Py3.5 test suite (post-PEP 461).
-
- The bytes mod code is in _PyBytes_Format() in bytesobject.c in Py3.5.
- """
-+ if sys.version_info[:2] < (3, 5):
-+ return
- b = b'hello, %b!'
- orig = b
- b = b % b'world'
-@@ -551,13 +554,12 @@ def test_mod(self):
- a = b % (b'seventy-nine', 79)
- self.assertEqual(a, b'seventy-nine / 100 = 79%')
-
-- @unittest.expectedFailure
- def test_imod(self):
- """
- From Py3.5 test suite (post-PEP 461)
- """
-- # if (3, 0) <= sys.version_info[:2] < (3, 5):
-- # raise unittest.SkipTest('bytes % not yet implemented on Py3.0-3.4')
-+ if sys.version_info[:2] < (3, 5):
-+ return
- b = bytes(b'hello, %b!')
- orig = b
- b %= b'world'
-diff --git a/setup.py b/setup.py
-index 79b7125..58ba534 100755
---- a/setup.py
-+++ b/setup.py
-@@ -147,14 +147,6 @@ try:
- 'xmlrpc'
- ])
-
-- if sys.version_info[0] >= 3:
-- # Do any of the above folders exist in build/lib?
-- files = os.listdir(os.path.join('build', 'lib'))
-- if len(set(files) & set(SYSTEM_MODULES)) > 0:
-- print('ERROR: Your build folder is in an inconsistent state for '
-- 'a Python 3.x install. Please remove it manually and run '
-- 'setup.py again.', file=sys.stderr)
-- sys.exit(1)
- except OSError:
- pass
-
diff --git a/main/rp-pppoe/kmode.patch b/main/rp-pppoe/kmode.patch
deleted file mode 100644
index 37eef58f75..0000000000
--- a/main/rp-pppoe/kmode.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up rp-pppoe-3.11/src/configure.orig rp-pppoe-3.11/src/configure
---- rp-pppoe-3.11/src/configure.orig 2012-08-17 12:31:25.000000000 -0600
-+++ rp-pppoe-3.11/src/configure 2013-02-11 14:23:05.000000000 -0700
-@@ -3679,6 +3679,7 @@ do :
- #include<net/ethernet.h>
- #include<linux/if.h>
- #include<linux/in.h>
-+#include<linux/in6.h>
-
- "
- if test "x$ac_cv_header_linux_if_pppox_h" = x""yes; then :
-@@ -4525,6 +4526,7 @@ else
- #include <net/ethernet.h>
- #include <linux/if.h>
- #include <linux/in.h>
-+#include <linux/in6.h>
- #include <linux/if_pppox.h>
- int main()
- {
diff --git a/main/rtnppd/Makefile.patch b/main/rtnppd/Makefile.patch
deleted file mode 100644
index 1d7e257248..0000000000
--- a/main/rtnppd/Makefile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- rtnppd.orig/Makefile Tue Mar 30 14:46:20 2010
-+++ rtnppd/Makefile Tue Mar 30 14:46:30 2010
-@@ -23,8 +23,8 @@
-
- # Use PostgreSQL-server (with includes in /usr/include/pgsql
- # and libs in /usr/lib
--#CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql
--#LIBS = -lpq
-+CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql
-+LIBS = -lpq
-
- PREFIX = /usr/local
- INCLUDES = -I./
diff --git a/main/samba/qsort-compar.patch b/main/samba/qsort-compar.patch
deleted file mode 100644
index 3b2e11a15b..0000000000
--- a/main/samba/qsort-compar.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/source4/dsdb/samdb/ldb_modules/count_attrs.c b/source4/dsdb/samdb/ldb_modules/count_attrs.c
-index b0d1b22..29f1b94 100644
---- a/source4/dsdb/samdb/ldb_modules/count_attrs.c
-+++ b/source4/dsdb/samdb/ldb_modules/count_attrs.c
-@@ -222,7 +222,7 @@ static const char **get_sorted_attrs(TALLOC_CTX *mem_ctx,
- attrs[i] = a;
- }
-
-- qsort(attrs, n_attrs, sizeof(char *), (__compar_fn_t)strcasecmp_ptr);
-+ qsort(attrs, n_attrs, sizeof(char *), (int (*)(const void *, const void *))strcasecmp_ptr);
- return attrs;
- }
-
-@@ -313,7 +313,7 @@ static int count_attrs_search_callback(struct ldb_request *req,
- }
-
- qsort(found_attrs, msg->num_elements, sizeof(char *),
-- (__compar_fn_t)strcasecmp_ptr);
-+ (int (*)(const void *, const void *))strcasecmp_ptr);
-
-
- /* find and report duplicates */
diff --git a/main/sqsh/readline-6.3.patch b/main/sqsh/readline-6.3.patch
deleted file mode 100644
index 7a8250dcce..0000000000
--- a/main/sqsh/readline-6.3.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/sqsh_readline.c b/src/sqsh_readline.c
-index 2ec565d..f30c119 100644
---- a/src/sqsh_readline.c
-+++ b/src/sqsh_readline.c
-@@ -159,7 +159,7 @@ int sqsh_readline_init()
-
- rl_readline_name = "sqsh" ;
- rl_completion_entry_function = (rl_compentry_func_t*)sqsh_completion ;
-- rl_attempted_completion_function = (CPPFunction*)sqsh_completion ;
-+ rl_attempted_completion_function = (rl_completion_func_t*)sqsh_completion ;
-
- /*
- * sqsh-2.1.8 - Remove '@' and '$' from the readline default list of word break
diff --git a/main/squark/0001-fix-missing-symbols-from-lua-module.patch b/main/squark/0001-fix-missing-symbols-from-lua-module.patch
deleted file mode 100644
index 9eddab7eb9..0000000000
--- a/main/squark/0001-fix-missing-symbols-from-lua-module.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From bd36f7e1710fd429c80ef1814beb81db909c177d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Fri, 21 Nov 2014 12:02:46 +0200
-Subject: [PATCH] fix missing symbols from lua module
-
----
- src/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index 8814b15..f8acd32 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -7,7 +7,7 @@ common-objs += filterdb.o authdb.o blob.o addr.o config.o reporting.o
- squark-filter-objs += squark-filter.o $(common-objs)
- squark-auth-snmp-objs += squark-auth-snmp.o $(common-objs)
- squark-auth-ip-objs += squark-auth-ip.o $(common-objs)
--squarkdb.so-objs += lua-squarkdb.o filterdb.o blob.o
-+squarkdb.so-objs += lua-squarkdb.o filterdb.o blob.o reporting.o
-
- CFLAGS_config.o += -DSQUARK_VERSION=\"$(FULL_VERSION)\" \
- -DCONFDIR=\"$(CONFDIR)\" \
---
-2.2.0
-
diff --git a/main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch b/main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch
deleted file mode 100644
index fe3fb1bf48..0000000000
--- a/main/squark/0002-filter-default-path-is-const-and-thus-non-writable.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From bdb5a17e3570ee5bde564f894444125be16a233c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Thu, 27 Nov 2014 15:45:31 +0200
-Subject: [PATCH] filter: default path is const and thus non-writable
-
-fix crash that would happen in blob_lowercase due to trying to
-write rodata.
----
- src/squark-filter.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/src/squark-filter.c b/src/squark-filter.c
-index 827540e..5ffcedf 100644
---- a/src/squark-filter.c
-+++ b/src/squark-filter.c
-@@ -168,8 +168,7 @@ static int url_parse(blob_t uri, struct url_info *nfo)
- else
- nfo->port = 80;
- }
-- if (blob_is_null(nfo->path))
-- nfo->path = BLOB_STR("/");
-+ if (blob_is_null(nfo->path)) nfo->path = slash;
-
- /* significant host name */
- nfo->significant_host = nfo->host;
-@@ -275,7 +274,7 @@ static int url_classify(struct url_info *url, struct sqdb *db)
-
- /* and then search for path matches -- construct hashing
- * string of url decoded path */
-- blob_lowercase(url->path); /* filter DB stores all URLs in lowercase */
-+ if (url->path.ptr != slash.ptr) blob_lowercase(url->path); /* filter DB stores all URLs in lowercase */
- blob_push_urldecode(&keybuf, url->path);
- keylimits = blob_pushed(BLOB_BUF(buffer), keybuf);
-
---
-2.2.0
-
diff --git a/main/stfl/libiconv.patch b/main/stfl/libiconv.patch
deleted file mode 100644
index e96f8024de..0000000000
--- a/main/stfl/libiconv.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile b/Makefile
-index d481e68..55aa66e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -22,7 +22,7 @@ include Makefile.cfg
-
- export CC = gcc -pthread
- export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
--export LDLIBS += -lncursesw
-+export LDLIBS += -lncursesw -liconv
-
- SONAME := libstfl.so.0
- VERSION := 0.22
diff --git a/main/stfl/libs.patch b/main/stfl/libs.patch
deleted file mode 100644
index ce093ceaed..0000000000
--- a/main/stfl/libs.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff --git a/Makefile b/Makefile
-index d481e68..f7452b5 100644
---- a/Makefile
-+++ b/Makefile
-@@ -22,7 +22,7 @@ include Makefile.cfg
-
- export CC = gcc -pthread
- export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
--export LDLIBS += -lncursesw
-+export LDLIBS += -lncursesw -liconv
-
- SONAME := libstfl.so.0
- VERSION := 0.22
-@@ -39,7 +39,7 @@ libstfl.a: public.o base.o parser.o dump.o style.o binding.o iconv.o \
-
- libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \
- $(patsubst %.c,%.o,$(wildcard widgets/*.c))
-- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
-+ $(CC) -shared $(LDLIBS) -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
-
- clean:
- rm -f libstfl.a example core core.* *.o Makefile.deps
-@@ -65,6 +65,7 @@ install: all stfl.pc
- install -m 644 stfl.pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/
- install -m 644 libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)
- ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libstfl.so
-+ ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/$(SONAME)
-
- stfl.pc: stfl.pc.in
- sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@
-diff --git a/Makefile.cfg b/Makefile.cfg
-index af3e102..346682e 100644
---- a/Makefile.cfg
-+++ b/Makefile.cfg
-@@ -19,7 +19,7 @@
- #
-
- export libdir ?= lib
--export prefix ?= /usr/local
-+export prefix ?= /usr
- export DESTDIR ?= /
-
- ifneq ($(shell spl-config --cflags 2>/dev/null),)
-diff --git a/python/Makefile.snippet b/python/Makefile.snippet
-index 8fd4052..af95b01 100644
---- a/python/Makefile.snippet
-+++ b/python/Makefile.snippet
-@@ -33,8 +33,7 @@ python/_stfl.so python/stfl.py python/stfl.pyc: libstfl.a stfl.h python/stfl.i s
-
- install_python: python/_stfl.so python/stfl.py python/stfl.pyc
- mkdir -p $(DESTDIR)$(PYTHON_SITEARCH)/
-- mkdir -p $(DESTDIR)$(PYTHON_SITEARCH)/lib-dynload/
-- cp python/_stfl.so $(DESTDIR)$(PYTHON_SITEARCH)/lib-dynload/
-+ cp python/_stfl.so $(DESTDIR)$(PYTHON_SITEARCH)//
- cp python/stfl.pyc $(DESTDIR)$(PYTHON_SITEARCH)/
- cp python/stfl.py $(DESTDIR)$(PYTHON_SITEARCH)/
-
diff --git a/main/xen/musl-support.patch b/main/xen/musl-support.patch
deleted file mode 100644
index ec9bd7722d..0000000000
--- a/main/xen/musl-support.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- xen-4.3.1.orig/m4/ptyfuncs.m4
-+++ xen-4.3.1/m4/ptyfuncs.m4
-@@ -22,7 +22,6 @@
- #endif
- int main(void) {
- openpty(0,0,0,0,0);
-- login_tty(0);
- }
- ])],[
- break
---- xen-4.3.1.orig/tools/libxl/libxl_bootloader.c
-+++ xen-4.3.1/tools/libxl/libxl_bootloader.c
-@@ -85,6 +85,21 @@
-
- /*----- synchronous subroutines -----*/
-
-+static int setup_console_tty(int fd)
-+{
-+ (void) setsid();
-+#ifdef TIOCSCTTY
-+ if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
-+ return (-1);
-+#endif
-+ (void) dup2(fd, 0);
-+ (void) dup2(fd, 1);
-+ (void) dup2(fd, 2);
-+ if (fd > 2)
-+ (void) close(fd);
-+ return (0);
-+}
-+
- static int setup_xenconsoled_pty(libxl__egc *egc, libxl__bootloader_state *bl,
- char *slave_path, size_t slave_path_len)
- {
-@@ -548,7 +563,7 @@
-
- if (!pid) {
- /* child */
-- r = login_tty(libxl__carefd_fd(bl->ptys[0].slave));
-+ r = setup_console_tty(libxl__carefd_fd(bl->ptys[0].slave));
- if (r) { LOGED(ERROR, bl->domid, "login_tty failed"); exit(-1); }
- libxl__exec(gc, -1, -1, -1, bl->args[0], (char **) bl->args, env);
- exit(-1);
---- xen-4.3.1.orig/tools/firmware/hvmloader/acpi/acpi2_0.h
-+++ b/tools/libacpi/acpi2_0.h
-@@ -366,7 +366,7 @@
- /*
- * Table Signatures.
- */
--#define ACPI_2_0_RSDP_SIGNATURE ASCII64('R','S','D',' ','P','T','R',' ')
-+#define ACPI_2_0_RSDP_SIGNATURE 0x2052545020445352LL /* "RSD PTR " */
- #define ACPI_2_0_FACS_SIGNATURE ASCII32('F','A','C','S')
- #define ACPI_2_0_FADT_SIGNATURE ASCII32('F','A','C','P')
- #define ACPI_2_0_MADT_SIGNATURE ASCII32('A','P','I','C')
---- xen-4.3.1.orig/tools/blktap2/vhd/lib/libvhd-journal.c
-+++ xen-4.3.1/tools/blktap2/vhd/lib/libvhd-journal.c
-@@ -30,6 +30,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
-+#include <sys/stat.h>
-
- #include "atomicio.h"
- #include "libvhd-journal.h"
---- xen-4.9.0.orig/tools/libxl/libxl_arm_acpi.c
-+++ xen-4.9.0/tools/libxl/libxl_arm_acpi.c
-@@ -37,7 +37,7 @@ typedef int64_t s64;
- #define BITS_PER_LONG 32
- #endif
- #endif
--#define ACPI_MACHINE_WIDTH __BITS_PER_LONG
-+#define ACPI_MACHINE_WIDTH BITS_PER_LONG
- #define COMPILER_DEPENDENT_INT64 int64_t
- #define COMPILER_DEPENDENT_UINT64 uint64_t
diff --git a/main/xen/qemu-coroutine-gthread.patch b/main/xen/qemu-coroutine-gthread.patch
deleted file mode 100644
index 4b9b3329e4..0000000000
--- a/main/xen/qemu-coroutine-gthread.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./tools/Makefile.orig
-+++ ./tools/Makefile
-@@ -202,6 +202,7 @@
- --localstatedir=/var \
- --disable-kvm \
- --disable-docs \
-+ --with-coroutine=gthread \
- --disable-guest-agent \
- --python=$(PYTHON) \
- $(IOEMU_CONFIGURE_CROSS); \
diff --git a/main/xf86-video-modesetting/0001-modesetting-24bpp-are-too-confusing-shadow-our-way-o.patch b/main/xf86-video-modesetting/0001-modesetting-24bpp-are-too-confusing-shadow-our-way-o.patch
deleted file mode 100644
index ea8b621e5d..0000000000
--- a/main/xf86-video-modesetting/0001-modesetting-24bpp-are-too-confusing-shadow-our-way-o.patch
+++ /dev/null
@@ -1,424 +0,0 @@
-From dc5dbdb1ee12155ec85e03ea22a4e3e671612def Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied@redhat.com>
-Date: Mon, 20 Jan 2014 01:26:00 -0500
-Subject: [PATCH 1/2] modesetting: 24bpp are too confusing, shadow our way out.
-
-So we have 2 places where gpus with 24bpp frontbuffers are still
-in use, cirrus (in qemu) and some early variants of the mgag200
-server chips.
-
-Currently we seem to get a lot of broken rendering in qt, mesa, gnome
-if we expose the frontbuffer as 24bpp, nobody seems to test this
-anymore upstream so client side apps are constantly broken, so lets
-just make -modesetting expose a 24/32 shadow frontbuffer, and use
-the shadow update hook to convert down to the actual 24bpp front,
-this might be slower, but its correct and really anyone that wants
-this already has enough problems.
-
-Signed-off-by: Dave Airlie <airlied@redhat.com>
----
- src/Makefile.am | 3 +-
- src/driver.c | 37 ++++++++-----
- src/drmmode_display.c | 34 ++++++------
- src/drmmode_display.h | 1 +
- src/sh3224.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++
- src/sh3224.h | 7 +++
- 6 files changed, 193 insertions(+), 29 deletions(-)
- create mode 100644 src/sh3224.c
- create mode 100644 src/sh3224.h
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 3cc4624..6d31fba 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -36,4 +36,5 @@ modesetting_drv_la_SOURCES = \
- driver.c \
- driver.h \
- drmmode_display.c \
-- drmmode_display.h
-+ drmmode_display.h \
-+ sh3224.c
-diff --git a/src/driver.c b/src/driver.c
-index b84624e..c617960 100644
---- a/src/driver.c
-+++ b/src/driver.c
-@@ -62,6 +62,7 @@
- #include "compat-api.h"
- #include "driver.h"
-
-+#include "sh3224.h"
- static void AdjustFrame(ADJUST_FRAME_ARGS_DECL);
- static Bool CloseScreen(CLOSE_SCREEN_ARGS_DECL);
- static Bool EnterVT(VT_FUNC_ARGS_DECL);
-@@ -663,9 +664,13 @@ PreInit(ScrnInfoPtr pScrn, int flags)
- #endif
- #endif
- drmmode_get_default_bpp(pScrn, &ms->drmmode, &defaultdepth, &defaultbpp);
-- if (defaultdepth == 24 && defaultbpp == 24)
-- bppflags = SupportConvert32to24 | Support24bppFb;
-- else
-+ if (defaultdepth == 24 && defaultbpp == 24) {
-+ ms->drmmode.force_24_32 = TRUE;
-+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-+ "Using 24bpp hw front buffer with 32bpp shadow\n");
-+ defaultbpp = 32;
-+ bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb;
-+ } else
- bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb;
-
- if (!xf86SetDepthBpp
-@@ -725,11 +730,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
- ms->drmmode.sw_cursor = TRUE;
- }
-
-- ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value);
-- if (!ret) {
-- prefer_shadow = !!value;
-- }
--
- ms->cursor_width = 64;
- ms->cursor_height = 64;
- ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_WIDTH, &value);
-@@ -741,9 +741,19 @@ PreInit(ScrnInfoPtr pScrn, int flags)
- ms->cursor_height = value;
- }
-
-- ms->drmmode.shadow_enable = xf86ReturnOptValBool(ms->Options, OPTION_SHADOW_FB, prefer_shadow);
-+ if (ms->drmmode.force_24_32) {
-+ prefer_shadow = TRUE;
-+ ms->drmmode.shadow_enable = TRUE;
-+ } else {
-+ ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value);
-+ if (!ret) {
-+ prefer_shadow = !!value;
-+ }
-+
-+ ms->drmmode.shadow_enable = xf86ReturnOptValBool(ms->Options, OPTION_SHADOW_FB, prefer_shadow);
-+ }
-
-- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ShadowFB: preferred %s, enabled %s\n", prefer_shadow ? "YES" : "NO", ms->drmmode.shadow_enable ? "YES" : "NO");
-+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ShadowFB: preferred %s, enabled %s\n", prefer_shadow ? "YES" : "NO", ms->drmmode.shadow_enable ? (ms->drmmode.force_24_32 ? "FORCE" : "YES") : "NO");
- if (drmmode_pre_init(pScrn, &ms->drmmode, pScrn->bitsPerPixel / 8) == FALSE) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "KMS setup failed\n");
- goto fail;
-@@ -758,8 +768,9 @@ msShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
- ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
- modesettingPtr ms = modesettingPTR(pScrn);
- int stride;
-+ int kernbpp = (ms->drmmode.force_24_32 && pScrn->bitsPerPixel == 32) ? 24 : 32;
-
-- stride = (pScrn->displayWidth * pScrn->bitsPerPixel) / 8;
-+ stride = (pScrn->displayWidth * kernbpp) / 8;
- *size = stride;
-
- return ((uint8_t *)ms->drmmode.front_bo->ptr + row * stride + offset);
-@@ -773,10 +784,11 @@ CreateScreenResources(ScreenPtr pScreen)
- PixmapPtr rootPixmap;
- Bool ret;
- void *pixels;
-+ Bool use_ms_shadow = ms->drmmode.force_24_32 && pScrn->bitsPerPixel == 32;
- pScreen->CreateScreenResources = ms->createScreenResources;
- ret = pScreen->CreateScreenResources(pScreen);
- pScreen->CreateScreenResources = CreateScreenResources;
--
-+
- if (!drmmode_set_desired_modes(pScrn, &ms->drmmode))
- return FALSE;
-
-@@ -797,7 +809,7 @@ CreateScreenResources(ScreenPtr pScreen)
- FatalError("Couldn't adjust screen pixmap\n");
-
- if (ms->drmmode.shadow_enable) {
-- if (!shadowAdd(pScreen, rootPixmap, msUpdatePacked,
-+ if (!shadowAdd(pScreen, rootPixmap, use_ms_shadow ? ms_shadowUpdate32to24 : msUpdatePacked,
- msShadowWindow, 0, 0))
- return FALSE;
- }
-diff --git a/src/drmmode_display.c b/src/drmmode_display.c
-index 25641ce..324b527 100644
---- a/src/drmmode_display.c
-+++ b/src/drmmode_display.c
-@@ -314,13 +314,13 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
- uint32_t fb_id;
- drmModeModeInfo kmode;
- int height;
--
-+ int bpp = (drmmode->force_24_32 && pScrn->bitsPerPixel == 32) ? 24 : 32;
- height = pScrn->virtualY;
-
- if (drmmode->fb_id == 0) {
- ret = drmModeAddFB(drmmode->fd,
- pScrn->virtualX, height,
-- pScrn->depth, pScrn->bitsPerPixel,
-+ pScrn->depth, bpp,
- drmmode->front_bo->pitch,
- drmmode->front_bo->handle,
- &drmmode->fb_id);
-@@ -1142,7 +1142,8 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
- int cpp = (scrn->bitsPerPixel + 7) / 8;
- PixmapPtr ppix = screen->GetScreenPixmap(screen);
- void *new_pixels;
--
-+ int kernbpp = (drmmode->force_24_32 && scrn->bitsPerPixel == 32) ? 24 : 32;
-+ int kerncpp = (kernbpp + 7) / 8;
- if (scrn->virtualX == width && scrn->virtualY == height)
- return TRUE;
-
-@@ -1156,7 +1157,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
- old_fb_id = drmmode->fb_id;
- old_front = drmmode->front_bo;
-
-- drmmode->front_bo = dumb_bo_create(drmmode->fd, width, height, scrn->bitsPerPixel);
-+ drmmode->front_bo = dumb_bo_create(drmmode->fd, width, height, kernbpp);
- if (!drmmode->front_bo)
- goto fail;
-
-@@ -1164,10 +1165,10 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
-
- scrn->virtualX = width;
- scrn->virtualY = height;
-- scrn->displayWidth = pitch / cpp;
-+ scrn->displayWidth = pitch / kerncpp;
-
- ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
-- scrn->bitsPerPixel, pitch,
-+ kernbpp, pitch,
- drmmode->front_bo->handle,
- &drmmode->fb_id);
- if (ret)
-@@ -1190,7 +1191,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
- free(drmmode->shadow_fb);
- drmmode->shadow_fb = new_shadow;
- screen->ModifyPixmapHeader(ppix, width, height, -1, -1,
-- pitch, drmmode->shadow_fb);
-+ scrn->displayWidth * cpp, drmmode->shadow_fb);
- }
-
- #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0)
-@@ -1220,7 +1221,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
- drmmode->front_bo = old_front;
- scrn->virtualX = old_width;
- scrn->virtualY = old_height;
-- scrn->displayWidth = old_pitch / cpp;
-+ scrn->displayWidth = old_pitch / kerncpp;
- drmmode->fb_id = old_fb_id;
-
- return FALSE;
-@@ -1246,7 +1247,10 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
- xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
-
- drmmode->scrn = pScrn;
-- drmmode->cpp = cpp;
-+ if (drmmode->force_24_32 && cpp == 4)
-+ drmmode->cpp = 3;
-+ else
-+ drmmode->cpp = cpp;
- drmmode->mode_res = drmModeGetResources(drmmode->fd);
- if (!drmmode->mode_res)
- return FALSE;
-@@ -1511,25 +1515,25 @@ Bool drmmode_create_initial_bos(ScrnInfo
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- int width;
- int height;
-- int bpp = pScrn->bitsPerPixel;
-+ int kernbpp = (drmmode->force_24_32 && pScrn->bitsPerPixel == 32) ? 24 : 32;
- int i;
-- int cpp = (bpp + 7) / 8;
-+ int kerncpp = (kernbpp + 7) / 8;
-
- width = pScrn->virtualX;
- height = pScrn->virtualY;
-
-- drmmode->front_bo = dumb_bo_create(drmmode->fd, width, height, bpp);
-+ drmmode->front_bo = dumb_bo_create(drmmode->fd, width, height, kernbpp);
- if (!drmmode->front_bo)
- return FALSE;
-- pScrn->displayWidth = drmmode->front_bo->pitch / cpp;
-+ pScrn->displayWidth = drmmode->front_bo->pitch / kerncpp;
-
- width = ms->cursor_width;
- height = ms->cursor_height;
-- bpp = 32;
-+ kernbpp = 32;
- for (i = 0; i < xf86_config->num_crtc; i++) {
- xf86CrtcPtr crtc = xf86_config->crtc[i];
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-- drmmode_crtc->cursor_bo = dumb_bo_create(drmmode->fd, width, height, bpp);
-+ drmmode_crtc->cursor_bo = dumb_bo_create(drmmode->fd, width, height, kernbpp);
- }
- return TRUE;
- }
-diff --git a/src/drmmode_display.h b/src/drmmode_display.h
-index 745c484..fe05e90 100644
---- a/src/drmmode_display.h
-+++ b/src/drmmode_display.h
-@@ -67,6 +67,7 @@ typedef struct {
- Bool shadow_enable;
- void *shadow_fb;
-
-+ Bool force_24_32;
- #ifdef HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS
- DevPrivateKeyRec pixmapPrivateKeyRec;
- #endif
-diff --git a/src/sh3224.c b/src/sh3224.c
-new file mode 100644
-index 0000000..cb8accd
---- /dev/null
-+++ b/src/sh3224.c
-@@ -0,0 +1,140 @@
-+/*
-+ *
-+ * Copyright © 2000 Keith Packard
-+ *
-+ * Permission to use, copy, modify, distribute, and sell this software and its
-+ * documentation for any purpose is hereby granted without fee, provided that
-+ * the above copyright notice appear in all copies and that both that
-+ * copyright notice and this permission notice appear in supporting
-+ * documentation, and that the name of Keith Packard not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Keith Packard makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-+ * PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include "shadow.h"
-+#include "fb.h"
-+
-+#include "sh3224.h"
-+#define Get8(a) ((CARD32) READ(a))
-+
-+#if BITMAP_BIT_ORDER == MSBFirst
-+#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
-+#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \
-+ (WRITE((a+1), (CARD8) ((p) >> 8))), \
-+ (WRITE((a+2), (CARD8) (p))))
-+#else
-+#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
-+#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \
-+ (WRITE((a+1), (CARD8) ((p) >> 8))), \
-+ (WRITE((a+2), (CARD8) ((p) >> 16))))
-+#endif
-+
-+static void
-+sh24_32BltLine(CARD8 *srcLine,
-+ CARD8 *dstLine,
-+ int width)
-+{
-+ CARD32 *src;
-+ CARD8 *dst;
-+ int w;
-+ CARD32 pixel;
-+
-+ src = (CARD32 *) srcLine;
-+ dst = dstLine;
-+ w = width;
-+
-+ while (((long)dst & 3) && w) {
-+ w--;
-+ pixel = READ(src++);
-+ Put24(dst, pixel);
-+ dst += 3;
-+ }
-+ /* Do four aligned pixels at a time */
-+ while (w >= 4) {
-+ CARD32 s0, s1;
-+
-+ s0 = READ(src++);
-+ s1 = READ(src++);
-+#if BITMAP_BIT_ORDER == LSBFirst
-+ WRITE((CARD32 *) dst, (s0 & 0xffffff) | (s1 << 24));
-+#else
-+ WRITE((CARD32 *) dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
-+#endif
-+ s0 = READ(src++);
-+#if BITMAP_BIT_ORDER == LSBFirst
-+ WRITE((CARD32 *) (dst + 4),
-+ ((s1 & 0xffffff) >> 8) | (s0 << 16));
-+#else
-+ WRITE((CARD32 *) (dst + 4),
-+ (s1 << 16) | ((s0 & 0xffffff) >> 8));
-+#endif
-+ s1 = READ(src++);
-+#if BITMAP_BIT_ORDER == LSBFirst
-+ WRITE((CARD32 *) (dst + 8),
-+ ((s0 & 0xffffff) >> 16) | (s1 << 8));
-+#else
-+ WRITE((CARD32 *) (dst + 8), (s0 << 24) | (s1 & 0xffffff));
-+#endif
-+ dst += 12;
-+ w -= 4;
-+ }
-+ while (w--) {
-+ pixel = READ(src++);
-+ Put24(dst, pixel);
-+ dst += 3;
-+ }
-+}
-+
-+void
-+ms_shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf)
-+{
-+ RegionPtr damage = shadowDamage(pBuf);
-+ PixmapPtr pShadow = pBuf->pPixmap;
-+ int nbox = RegionNumRects(damage);
-+ BoxPtr pbox = RegionRects(damage);
-+ FbStride shaStride;
-+ int shaBpp;
-+ _X_UNUSED int shaXoff, shaYoff;
-+ int x, y, w, h;
-+ CARD32 winSize;
-+ FbBits *shaBase, *shaLine;
-+ CARD8 *winBase = NULL, *winLine;
-+
-+ fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff,
-+ shaYoff);
-+
-+ /* just get the initial window base + stride */
-+ winBase = (*pBuf->window)(pScreen, 0, 0, SHADOW_WINDOW_WRITE,
-+ &winSize, pBuf->closure);
-+
-+ while (nbox--) {
-+ x = pbox->x1;
-+ y = pbox->y1;
-+ w = pbox->x2 - pbox->x1;
-+ h = pbox->y2 - pbox->y1;
-+
-+ winLine = winBase + y * winSize + (x * 3);
-+ shaLine = shaBase + y * shaStride + ((x * shaBpp) >> FB_SHIFT);
-+
-+ while (h--) {
-+ sh24_32BltLine((CARD8 *)shaLine, (CARD8 *)winLine, w);
-+ winLine += winSize;
-+ shaLine += shaStride;
-+ }
-+ pbox++;
-+ }
-+}
-diff --git a/src/sh3224.h b/src/sh3224.h
-new file mode 100644
-index 0000000..fc301f9
---- /dev/null
-+++ b/src/sh3224.h
-@@ -0,0 +1,7 @@
-+#ifndef SH3224_H
-+#define SH3224_H
-+
-+void
-+ms_shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf);
-+
-+#endif
---
-1.8.3.1
-
diff --git a/main/xf86-video-modesetting/drmmode_shadow.patch b/main/xf86-video-modesetting/drmmode_shadow.patch
deleted file mode 100644
index 0ac80078b8..0000000000
--- a/main/xf86-video-modesetting/drmmode_shadow.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 91571cce03adc58a10b5d76307629efc7c994c3e Mon Sep 17 00:00:00 2001
-From: Rob Clark <robdclark@gmail.com>
-Date: Tue, 26 Aug 2014 17:31:26 -0400
-Subject: modesetting: Don't pretend to support rotation
-
-It only ends in tears
-
-Signed-off-by: Rob Clark <robdclark@gmail.com>
-Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-
-diff --git a/src/drmmode_display.c b/src/drmmode_display.c
-index c533324..12aa987 100644
---- a/src/drmmode_display.c
-+++ b/src/drmmode_display.c
-@@ -568,17 +568,6 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
- }
- #endif
-
--static void *drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
--{
-- return NULL;
--}
--
--static PixmapPtr drmmode_shadow_create(xf86CrtcPtr crtc, void *data, int width,
-- int height)
--{
-- return NULL;
--}
--
- static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
- .dpms = drmmode_crtc_dpms,
- .set_mode_major = drmmode_set_mode_major,
-@@ -593,8 +582,6 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
- #ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
- .set_scanout_pixmap = drmmode_set_scanout_pixmap,
- #endif
-- .shadow_allocate = drmmode_shadow_allocate,
-- .shadow_create = drmmode_shadow_create,
- };
-
- static void
---
-cgit v0.10.2
-
diff --git a/main/xf86-video-qxl/mibstore.patch b/main/xf86-video-qxl/mibstore.patch
deleted file mode 100644
index 4f11f1d01f..0000000000
--- a/main/xf86-video-qxl/mibstore.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 819b1f62efbecf33db7bb0b4402a798262ae4574 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Thu, 10 Jan 2013 03:55:47 +0000
-Subject: Remove mibstore.h
-
-Signed-off-by: Adam Jackson <ajax@redhat.com>
----
-diff --git a/src/uxa/uxa-priv.h b/src/uxa/uxa-priv.h
-index ad83963..e3c581c 100644
---- a/src/uxa/uxa-priv.h
-+++ b/src/uxa/uxa-priv.h
-@@ -45,7 +45,6 @@
- #include "pixmapstr.h"
- #include "windowstr.h"
- #include "servermd.h"
--#include "mibstore.h"
- #include "colormapst.h"
- #include "gcstruct.h"
- #include "input.h"
---
-cgit v0.9.0.2-2-gbebe