code:
diff -ru strace-4.8.orig/defs.h strace-4.8/defs.h
--- strace-4.8.orig/defs.h	2013-05-14 14:10:42.000000000 +0000
+++ strace-4.8/defs.h	2013-09-20 14:30:38.785856744 +0000
@@ -155,7 +155,7 @@
     || defined(METAG) \
     || defined(TILE) \
     || defined(XTENSA) \
-    ) && defined(__GLIBC__)
+    ) && defined(__linux__)
 # include <sys/ptrace.h>
 #else
 /* Work around awkward prototype in ptrace.h. */
@@ -222,7 +222,7 @@
 # define PTRACE_EVENT_EXIT	6
 #endif

-#if !defined(__GLIBC__)
+#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER)
 # define PTRACE_PEEKUSER PTRACE_PEEKUSR
 # define PTRACE_POKEUSER PTRACE_POKEUSR
 #endif
diff -ru strace-4.8.orig/desc.c strace-4.8/desc.c
--- strace-4.8.orig/desc.c	2013-05-01 22:39:10.000000000 +0000
+++ strace-4.8/desc.c	2013-09-20 14:30:38.795856744 +0000
@@ -299,7 +299,7 @@
 #ifdef X32
 	tprintf(", start=%lld, len=%lld", fl.l_start, fl.l_len);
 #else
-	tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len);
+	tprintf(", start=%ld, len=%ld", (long) fl.l_start, (long) fl.l_len);
 #endif
 	if (getlk)
 		tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
diff -ru strace-4.8.orig/file.c strace-4.8/file.c
--- strace-4.8.orig/file.c	2013-05-06 18:23:01.000000000 +0000
+++ strace-4.8/file.c	2013-09-20 14:30:38.795856744 +0000
@@ -632,7 +632,7 @@
 	return 0;
 }

-#if _LFS64_LARGEFILE
+#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
 int
 sys_truncate64(struct tcb *tcp)
 {
@@ -654,7 +654,7 @@
 	return 0;
 }

-#if _LFS64_LARGEFILE
+#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
 int
 sys_ftruncate64(struct tcb *tcp)
 {
@@ -2322,7 +2322,7 @@
 	return 0;
 }

-#if _LFS64_LARGEFILE
+#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
 int
 sys_getdents64(struct tcb *tcp)
 {
diff -ru strace-4.8.orig/net.c strace-4.8/net.c
--- strace-4.8.orig/net.c	2013-05-17 22:20:02.000000000 +0000
+++ strace-4.8/net.c	2013-09-20 14:30:38.805856744 +0000
@@ -95,12 +95,14 @@
 #endif

 /* Under Linux these are enums so we can't test for them with ifdef. */
+#if !defined(IPPROTO_MAX)
 #define IPPROTO_EGP IPPROTO_EGP
 #define IPPROTO_PUP IPPROTO_PUP
 #define IPPROTO_IDP IPPROTO_IDP
 #define IPPROTO_IGMP IPPROTO_IGMP
 #define IPPROTO_RAW IPPROTO_RAW
 #define IPPROTO_MAX IPPROTO_MAX
+#endif

 static const struct xlat domains[] = {
 #ifdef PF_UNSPEC
diff -ru strace-4.8.orig/process.c strace-4.8/process.c
--- strace-4.8.orig/process.c	2013-05-17 22:22:19.000000000 +0000
+++ strace-4.8/process.c	2013-09-20 14:30:38.805856744 +0000
@@ -2857,7 +2857,7 @@
 		if (umove(tcp, tcp->u_arg[2], &p) < 0)
 			tprintf(", %#lx", tcp->u_arg[2]);
 		else
-			tprintf(", { %d }", p.__sched_priority);
+			tprintf(", { %d }", p.sched_priority);
 	}
 	return 0;
 }
@@ -2872,7 +2872,7 @@
 		if (umove(tcp, tcp->u_arg[1], &p) < 0)
 			tprintf("%#lx", tcp->u_arg[1]);
 		else
-			tprintf("{ %d }", p.__sched_priority);
+			tprintf("{ %d }", p.sched_priority);
 	}
 	return 0;
 }
@@ -2885,7 +2885,7 @@
 		if (umove(tcp, tcp->u_arg[1], &p) < 0)
 			tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
 		else
-			tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
+			tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
 	}
 	return 0;
 }
diff -ru strace-4.8.orig/signal.c strace-4.8/signal.c
--- strace-4.8.orig/signal.c	2013-05-23 13:41:23.000000000 +0000
+++ strace-4.8/signal.c	2013-09-20 14:30:38.815856744 +0000
@@ -59,6 +59,7 @@
 #ifdef IA64
 # include <asm/ptrace_offsets.h>
 #endif
+#include <asm/ptrace.h>

 #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
 typedef struct {
diff -ru strace-4.8.orig/strace.c strace-4.8/strace.c
--- strace-4.8.orig/strace.c	2013-05-28 21:49:16.000000000 +0000
+++ strace-4.8/strace.c	2013-09-20 14:30:38.815856744 +0000
@@ -506,7 +506,7 @@
 				perror_msg_and_die("dup2");
 			close(fds[0]);
 		}
-		execl(_PATH_BSHELL, "sh", "-c", command, NULL);
+		execl(_PATH_BSHELL, "sh", "-c", command, (void*) 0);
 		perror_msg_and_die("Can't execute '%s'", _PATH_BSHELL);
 	}

diff -ru strace-4.8.orig/syscall.c strace-4.8/syscall.c
--- strace-4.8.orig/syscall.c	2013-05-14 14:10:42.000000000 +0000
+++ strace-4.8/syscall.c	2013-09-20 14:30:38.825856744 +0000
@@ -72,13 +72,7 @@
 # include <elf.h>
 #endif

-#if defined(AARCH64)
-# include <asm/ptrace.h>
-#endif
-
-#if defined(XTENSA)
-# include <asm/ptrace.h>
-#endif
+#include <asm/ptrace.h>

 #ifndef ERESTARTSYS
 # define ERESTARTSYS	512
diff -ru strace-4.8.orig/time.c strace-4.8/time.c
--- strace-4.8.orig/time.c	2012-05-01 21:17:51.000000000 +0000
+++ strace-4.8/time.c	2013-09-20 14:32:49.165856719 +0000
@@ -774,7 +774,11 @@
 			/* _pad[0] is the _tid field which might not be
 			   present in the userlevel definition of the
 			   struct.  */
+#if defined(__GLIBC__)
 			tprintf("{%d}", sev._sigev_un._pad[0]);
+#else
+			tprintf("{%d}", (int) sev.__pad[0]);
+#endif
 		else if (sev.sigev_notify == SIGEV_THREAD)
 			tprintf("{%p, %p}", sev.sigev_notify_function,
 				sev.sigev_notify_attributes);


code:
--- strace-4.8.org/defs.h
+++ strace-4.8/defs.h
@@ -155,6 +155,7 @@
     || defined(METAG) \
     || defined(TILE) \
     || defined(XTENSA) \
+    || defined(POWERPC) \
     ) && defined(__linux__)
 # include <sys/ptrace.h>
 #else

repo_name: aarf/bkauler

license: unknown


code:
--- strace-4.8.org/signal.c
+++ strace-4.8/signal.c
@@ -59,7 +59,9 @@
 #ifdef IA64
 # include <asm/ptrace_offsets.h>
 #endif
+#ifndef POWERPC
 #include <asm/ptrace.h>
+#endif

 #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
 typedef struct {


code:
--- strace-4.8.org/syscall.c
+++ strace-4.8/syscall.c
@@ -72,7 +72,9 @@
 # include <elf.h>
 #endif

+#ifndef POWERPC
 #include <asm/ptrace.h>
+#endif

 #ifndef ERESTARTSYS
 # define ERESTARTSYS	512


code:
--- stunnel-5.02.org/src/ssl.c	2014-07-12 06:13:07.356889656 +0000
+++ stunnel-5.02/src/ssl.c	2014-07-12 06:15:39.032889896 +0000
@@ -195,6 +195,7 @@
     }
     s_log(LOG_DEBUG, "RAND_screen failed to sufficiently seed PRNG");
 #else
+#ifdef HAVE_RAND_EGD
     if(global->egd_sock) {
         if((bytes=RAND_egd(global->egd_sock))==-1) {
             s_log(LOG_WARNING, "EGD Socket %s failed", global->egd_sock);
@@ -207,6 +208,7 @@
                          so no need to check if seeded sufficiently */
         }
     }
+#endif
     /* try the good-old default /dev/urandom, if available  */
     totbytes+=add_rand_file(global, "/dev/urandom");
     if(RAND_status())


code:
/* (C) 2013 rofl0r, based on design ideas of Rich Felker.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/

#define _BSD_SOURCE
#include <unistd.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <crypt.h>
#include <string.h>
#include <grp.h>
#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>

#if 1 || defined(IN_KDEVELOP_PARSER)
#define HAVE_SHADOW
#endif
#ifdef HAVE_SHADOW
#include <shadow.h>
#else
#warning "shadow support disabled, did you forget to pass -DHAVE_SHADOW ?"
#endif

#if !defined(_Noreturn) && __STDC_VERSION__+0 < 201112L
#ifdef __GNUC__
#define _Noreturn __attribute__((noreturn))
#else
#define _Noreturn
#endif
#endif

static const char usage_text[] =
"Usage: su [OPTION] name\n"
"available options:\n"
"- : start login shell\n"
"-c command : run command and return\n"
"-s shell   : use shell provided as argument (root only)\n"
"if name is omitted, root is assumed.\n";

static _Noreturn void usage(void) {
	dprintf(1, usage_text);
	exit(1);
}

static _Noreturn void perror_exit(const char* msg) {
	perror(msg);
	exit(1);
}

static int directory_exists(const char* dir) {
	struct stat st;
	return stat(dir, &st) == 0 && S_ISDIR(st.st_mode);
}

static time_t get_mtime(const char *fn) {
	struct stat st;
	if(stat(fn, &st)) return -1;
	return st.st_mtime;
}

static void touch(const char* fn) {
	int fd = open(fn, O_RDWR | O_CREAT | O_TRUNC, 0600);
	if(fd != -1) close(fd);
}

/* returns index of username argument, 0 if no username passed, -1 on syntax error
 * cmd_index will be set to the index of a -c argument, or 0 if its missing
 * shell_index will be set to the index of a -s argument, or 0 if its missing
 * login_shell will be set to 1 if the login shell option - was passed, 0 otherwise */
static int parse_args(int argc, char** argv,
	             int *login_shell, int* cmd_index, int *shell_index) {

	*login_shell = 0;
	*cmd_index   = 0;
	*shell_index = 0;

	int i, wantarg = 0, res = 0;
	char *p;

	for(i = 1; i < argc; i++) {
		if(wantarg) {
			wantarg = 0;
			continue;
		}
		p = argv[i];
		if(p[0] != '-') {
			if(res) return -1;
			res = i;
		} else if(!p[1]) {
			*login_shell = 1;
		} else if((p[1] == 'c' || p[1] == 's') && !p[2]) {
			if(i == argc - 1) return -1;
			wantarg = 1;
			if(p[1] == 'c') *cmd_index = i + 1;
			else *shell_index = i + 1;
		} else {
			return -1;
		}
	}
	if(wantarg) return -1;
	return res;
}

/* return 1 if the password check succeeded, 0 otherwise */
int check_pass(const char* name, const char *pass, struct passwd *pwd) {
        const char *encpw;
#ifdef HAVE_SHADOW
	struct spwd *shpwd = getspnam(name);
	if(!shpwd) return 0;
	encpw = shpwd->sp_pwdp;
#else
	(void) name;
	encpw = pwd->pw_passwd;
#endif
	if(!encpw || !strcmp(encpw, "x")) return 0;
	const char* actpw = crypt(pass, encpw);
	if(!actpw) perror_exit("crypt");
	if(strcmp(actpw, encpw)) return 0;
	return 1;
}

extern char** environ;

#define SU_DIR "/var/lib/su"
#define LOGIN_DELAY_SECS 1
#define STRIFY2(x) #x
#define STRIFY(x) STRIFY2(x)
#define LOGIN_DELAY_SECS_STR STRIFY(LOGIN_DELAY_SECS)

int main(int argc, char** argv) {
	int login_shell, cmd_index, shell_index, name_index;
	name_index = parse_args(argc, argv, &login_shell, &cmd_index, &shell_index);
	if(name_index == -1) usage();

	int uid = getuid();
	int is_root = (uid == 0);
	if(shell_index && !is_root) usage();

	const char* name = name_index ? argv[name_index] : "root";

	char uidfn[256];
	snprintf(uidfn, sizeof uidfn, "%s/%d", SU_DIR, uid);

	if(!directory_exists(SU_DIR)) {
		if(geteuid() == 0 && mkdir(SU_DIR, 0700) == -1)
			dprintf(2, "creation of directory " SU_DIR
			           " for bruteforce prevention failed, consider creating it manually\n");
	}

	char* pass = 0;

	if(!is_root) {
		time_t mtime = get_mtime(uidfn);
		if(mtime != -1 && mtime + LOGIN_DELAY_SECS > time(0)) {
			dprintf(2, "you need to wait for " LOGIN_DELAY_SECS_STR
			           " seconds before retrying.\n");
			return 1;
		}
		pass = getpass("enter password:");
		dprintf(1, "\n");
		if(!pass) perror_exit("getpass");
	}

	struct passwd *pwd = getpwnam(name);
	if(!pwd) goto failed;
	if(!is_root && !check_pass(name, pass, pwd)) {
		failed:
                touch(uidfn);
                dprintf(2, "login failed\n");
		return 1;
	}

	if(initgroups(name, pwd->pw_gid)) perror_exit("initgroups");
	if(setgid(pwd->pw_gid)) perror_exit("setgid");
	if(setuid(pwd->pw_uid)) perror_exit("setuid");

	char* const* new_argv;
	char shellbuf[256];
	char* shell = shell_index ? argv[shell_index] : pwd->pw_shell;
	char* shell_argv0 = shell;
	if(login_shell) {
		snprintf(shellbuf, sizeof shellbuf, "-%s", shell);
		shell_argv0 = shellbuf;
		setenv("LOGNAME", name, 1);
		if(getenv("USER")) setenv("USER", name, 1);
	}
	if(cmd_index) {
		new_argv = (char* const[]) {shell_argv0, argv[cmd_index-1], argv[cmd_index], 0};
	} else {
		new_argv = (char* const[]) {shell_argv0, 0};
	}

	setenv("HOME", pwd->pw_dir, 1);
	if(login_shell) chdir(pwd->pw_dir);

	if(execve(shell, new_argv, environ)) perror_exit("execve");
	return 1;
}


code:
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <stdio.h>
#define chk(X) if((X) == -1) { perror(#X); exit(1); }

int main(int argc, char **argv)
{
	uid_t uid = getuid();
	uid_t gid = getgid();

	char *tarballs=getenv("C");
	if(!tarballs) tarballs = "./tarballs";

	chk(unshare(CLONE_NEWUSER|CLONE_NEWNS));

	char buf[32];

	int fd = open("/proc/self/uid_map", O_RDWR);
	write(fd, buf, snprintf(buf, sizeof buf, "0 %u 1\n", uid));
	close(fd);

	fd = open("/proc/self/gid_map", O_RDWR);
	write(fd, buf, snprintf(buf, sizeof buf, "0 %u 1\n", gid));
	close(fd);

	setgroups(0, 0);

	chdir(argv[1]);
	chk(mount("/dev", "./dev", 0, MS_BIND|MS_REC, 0));
	chk(mount("/proc", "./proc", 0, MS_BIND|MS_REC, 0));
	chk(mount(tarballs, "./src/tarballs", 0, MS_BIND, 0));

	chk(chroot("."));

	chk(execv(argv[2], argv+2));
}


code:
--- subversion-1.8.3.org/subversion/bindings/swig/perl/native/Makefile.PL.in	2013-10-23 19:54:34.600374393 +0000
+++ subversion-1.8.3/subversion/bindings/swig/perl/native/Makefile.PL.in	2013-10-23 19:56:22.143370532 +0000
@@ -43,6 +43,8 @@
                                 fs_base fs_util fs_fs/);

 my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
+my @aprdeps = `pkg-config --libs apr-util-1`;
+push @ldmodules, @aprdeps;

 my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
 my $cppflags = '@CPPFLAGS@';


code:
--- subversion-1.8.3.org/configure
+++ subversion-1.8.3/configure
@@ -18377,10 +18377,9 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O dynamic module iteration functions" >&5
 $as_echo_n "checking for Mach-O dynamic module iteration functions... " >&6; }
   if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+  {     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */


code:
--- sweep-0.9.3.org/src/driver_alsa.c	2013-01-07 23:35:17.091000004 +0000
+++ sweep-0.9.3/src/driver_alsa.c	2013-01-07 23:36:06.998000004 +0000
@@ -109,6 +109,7 @@
   /* The standard command line options for this are -D or --device.
    * The default fallback should be plughw.
    */
+  names = g_list_append (names, "default");
   names = g_list_append (names, "plughw:0,0");
   names = g_list_append (names, "plughw:0,1");
   names = g_list_append (names, "plughw:1,0");


code:
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../tar/tar-1.13.18-manpage.patch
# Copyright (C) 2004 - 2005 The T2 SDE Project
# Copyright (C) 1998 - 2003 ROCK Linux Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

--- ./tar.1.manpage	Mon Oct 30 12:52:03 2000
+++ ./tar.1	Mon Oct 30 12:56:15 2000
@@ -0,0 +1,336 @@
+.\" @(#)tar.1 1.13.14 2000/10/30 Bero;
+.TH TAR 1 "30 October 2000"
+.SH NAME
+tar \- The GNU version of the tar archiving utility
+.SH SYNOPSIS
+.B tar
+[
+.B \-
+]
+.B A --catenate --concatenate \||\| c --create \||\| d --diff --compare \||\| r --append \||\| t --list \||\| u --update \||\| x -extract --get
+[
+.B --atime-preserve
+]
+[
+.B -b, --block-size N
+]
+[
+.B -B, --read-full-blocks
+]
+[
+.B -C, --directory DIR
+]
+[
+.B --checkpoint
+]
+[
+.B -f, --file [HOSTNAME:]F
+]
+[
+.B --force-local
+]
+[
+.B -F, --info-script F --new-volume-script F
+]
+[
+.B -G, --incremental
+]
+[
+.B -g, --listed-incremental F
+]
+[
+.B -h, --dereference
+]
+[
+.B -i, --ignore-zeros
+]
+[
+.B -j, -I, --bzip
+]
+[
+.B --ignore-failed-read
+]
+[
+.B -k, --keep-old-files
+]
+[
+.B -K, --starting-file F
+]
+[
+.B -l, --one-file-system
+]
+[
+.B -L, --tape-length N
+]
+[
+.B -m, --modification-time
+]
+[
+.B -M, --multi-volume
+]
+[
+.B -N, --after-date DATE, --newer DATE
+]
+[
+.B -o, --old-archive, --portability
+]
+[
+.B -O, --to-stdout
+]
+[
+.B -p, --same-permissions, --preserve-permissions
+]
+[
+.B -P, --absolute-paths
+]
+[
+.B --preserve
+]
+[
+.B -R, --record-number
+]
+[
+.B --remove-files
+]
+[
+.B -s, --same-order, --preserve-order
+]
+[
+.B --same-owner
+]
+[
+.B -S, --sparse
+]
+[
+.B -T, --files-from=F
+]
+[
+.B --null
+]
+[
+.B --totals
+]
+[
+.B -v, --verbose
+]
+[
+.B -V, --label NAME
+]
+[
+.B --version
+]
+[
+.B -w, --interactive, --confirmation
+]
+[
+.B -W, --verify
+]
+[
+.B --exclude FILE
+]
+[
+.B -X, --exclude-from FILE
+]
+[
+.B -Z, --compress, --uncompress
+]
+[
+.B -z, --gzip, --ungzip
+]
+[
+.B --use-compress-program PROG
+]
+[
+.B --block-compress
+]
+[
+.B -[0-7][lmh]
+]
+.TP
+.I filename1 [ filename2, ... filenameN ]
+.TP
+.I directory1 [ directory2, ...directoryN ]
+.SH DESCRIPTION
+.LP
+This manual page documents the GNU version of
+.B tar
+, an archiving program designed to store and extract files from
+an archive file known as a
+.IR tarfile.
+A
+.IR tarfile
+may be made on a tape drive, however, it is also common
+to write a
+.IR tarfile
+to a normal file.
+The first argument to
+.B tar
+must be one of the options:
+.BR Acdrtux ,
+followed by any optional functions.
+The final arguments to
+.B tar
+are the names of the files or directories which should be archived. The use
+of a directory name always implies that the subdirectories below should be
+included in the archive.
+.SH "FUNCTION LETTERS"
+.TP
+.B One of the following options must be used:
+.TP
+.B -A, --catenate, --concatenate
+append tar files to an archive
+.TP
+.B -c, --create
+create a new archive
+.TP
+.B -d, --diff, --compare
+find differences between archive and file system
+.TP
+.B --delete
+delete from the archive (not for use on mag tapes!)
+.TP
+.B -r, --append
+append files to the end of an archive
+.TP
+.B -t, --list
+list the contents of an archive
+.TP
+.B -u, --update
+only append files that are newer than copy in archive
+.TP
+.B -x, --extract, --get
+extract files from an archive
+.SH "OTHER OPTIONS"
+.TP
+.B --atime-preserve
+don't change access times on dumped files
+.TP
+.B -b, --block-size N
+block size of Nx512 bytes (default N=20)
+.TP
+.B -B, --read-full-blocks
+reblock as we read (for reading 4.2BSD pipes)
+.TP
+.B -C, --directory DIR
+change to directory DIR
+.TP
+.B --checkpoint
+print directory names while reading the archive
+.TP
+.B -f, --file [HOSTNAME:]F
+use archive file or device F (default /dev/rmt0)
+.TP
+.B --force-local
+archive file is local even if has a colon
+.TP
+.B -F, --info-script F --new-volume-script F
+run script at end of each tape (implies -M)
+.TP
+.B -G, --incremental
+create/list/extract old GNU-format incremental backup
+.TP
+.B -g, --listed-incremental F
+create/list/extract new GNU-format incremental backup
+.TP
+.B -h, --dereference
+don't dump symlinks; dump the files they point to
+.TP
+.B -i, --ignore-zeros
+ignore blocks of zeros in archive (normally mean EOF)
+.TP
+.B -j, -I, --bzip
+filter the archive through bzip2. Note: -I is deprecated and may get a
+different meaning in the near future.
+.TP
+.B --ignore-failed-read
+don't exit with non-zero status on unreadable files
+.TP
+.B -k, --keep-old-files
+keep existing files; don't overwrite them from archive
+.TP
+.B -K, --starting-file F
+begin at file F in the archive
+.TP
+.B -l, --one-file-system
+stay in local file system when creating an archive
+.TP
+.B -L, --tape-length N
+change tapes after writing N*1024 bytes
+.TP
+.B -m, --modification-time
+don't extract file modified time
+.TP
+.B -M, --multi-volume
+create/list/extract multi-volume archive
+.TP
+.B -N, --after-date DATE, --newer DATE
+only store files newer than DATE
+.TP
+.B -o, --old-archive, --portability
+write a V7 format archive, rather than ANSI format
+.TP
+.B -O, --to-stdout
+extract files to standard output
+.TP
+.B -p, --same-permissions, --preserve-permissions
+extract all protection information
+.TP
+.B -P, --absolute-paths
+don't strip leading `/'s from file names
+.TP
+.B --preserve
+like -p -s
+.TP
+.B -R, --record-number
+show record number within archive with each message
+.TP
+.B --remove-files
+remove files after adding them to the archive
+.TP
+.B -s, --same-order, --preserve-order
+list of names to extract is sorted to match archive
+.TP
+.B --same-owner
+create extracted files with the same ownership
+.TP
+.B -S, --sparse
+handle sparse files efficiently
+.TP
+.B -T, --files-from=F
+get names to extract or create from file F
+.TP
+.B --null
+-T reads null-terminated names, disable -C
+.TP
+.B --totals
+print total bytes written with --create
+.TP
+.B -v, --verbose
+verbosely list files processed
+.TP
+.B -V, --label NAME
+create archive with volume name NAME
+.TP
+.B --version
+print tar program version number
+.TP
+.B -w, --interactive, --confirmation
+ask for confirmation for every action
+.TP
+.B -W, --verify
+attempt to verify the archive after writing it
+.TP
+.B --exclude FILE
+exclude file FILE
+.TP
+.B -X, --exclude-from FILE
+exclude files listed in FILE
+.TP
+.B -Z, --compress, --uncompress
+filter the archive through compress
+.TP
+.B -z, --gzip, --ungzip
+filter the archive through gzip
+.TP
+.B --use-compress-program PROG
+filter the archive through PROG (which must accept -d)


code:
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../tar/compar_does_not_need_fd.h.patch
# Copyright (C) 2004 - 2005 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---
--- ./src/compare.c.orig	2004-06-24 13:49:08.444825752 +0200
+++ ./src/compare.c	2004-06-24 13:47:15.575984424 +0200
@@ -31,9 +31,11 @@
   };
 #endif

+#if 0
 #if HAVE_LINUX_FD_H
 # include <linux/fd.h>
 #endif
+#endif

 #include <quotearg.h>


code:
--- tcl8.6.0.org/generic/tcl.h
+++ tcl8.6.0/generic/tcl.h
@@ -17,6 +17,8 @@
 #ifndef _TCL
 #define _TCL

+#include <sys/stat.h>
+
 /*
  * For C++ compilers, use extern "C"
  */


code:
--- tdb-1.0.6.org/tdbtool.c	2013-01-02 19:20:57.987000003 +0000
+++ tdb-1.0.6/tdbtool.c	2013-01-02 19:22:26.781000004 +0000
@@ -169,23 +169,21 @@

 static void help(void)
 {
-	printf("
-tdbtool:
-  create    dbname     : create a database
-  open      dbname     : open an existing database
-  erase                : erase the database
-  dump      dumpname   : dump the database as strings
-  insert    key  data  : insert a record
-  store     key  data  : store a record (replace)
-  show      key        : show a record by key
-  delete    key        : delete a record by key
-  list                 : print the database hash table and freelist
-  free                 : print the database freelist
-  1 | first            : print the first record
-  n | next             : print the next record
-  q | quit             : terminate
-  \\n                   : repeat 'next' command
-");
+	printf("tdbtool: \n"
+"  create    dbname     : create a database\n"
+"  open      dbname     : open an existing database\n"
+"  erase                : erase the database\n"
+"  dump      dumpname   : dump the database as strings\n"
+"  insert    key  data  : insert a record\n"
+"  store     key  data  : store a record (replace)\n"
+"  show      key        : show a record by key\n"
+"  delete    key        : delete a record by key\n"
+"  list                 : print the database hash table and freelist\n"
+"  free                 : print the database freelist\n"
+"  1 | first            : print the first record\n"
+"  n | next             : print the next record\n"
+"  q | quit             : terminate\n"
+"  \\n                   : repeat 'next' command\n");
 }

 static void terror(char *why)


code:
--- termcap-1.3.1.org/Makefile.in	1995-08-17 00:54:29.000000000 +0000
+++ termcap-1.3.1/Makefile.in	2012-10-13 03:13:56.988000002 +0000
@@ -24,8 +24,8 @@
 AR = ar
 RANLIB = @RANLIB@

-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
+INSTALL = install -D
+INSTALL_DATA = $(INSTALL) -m 644

 MAKEINFO = makeinfo

@@ -42,12 +42,6 @@
 # Directory in which to install termcap.h.
 includedir = $(prefix)/include

-# Directory in which to optionally also install termcap.h,
-# so compilers besides gcc can find it by default.
-# If it is empty or not defined, termcap.h will only be installed in
-# includedir.
-oldincludedir = /usr/include
-
 # Directory in which to install the documentation info files.
 infodir = $(prefix)/info

@@ -72,13 +66,10 @@
 	$(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<

 install: all installdirs @installdata@
-	$(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
-	-$(RANLIB) $(libdir)/libtermcap.a
-	cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
-	-cd $(srcdir); test -z "$(oldincludedir)" || \
-	  $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
+	$(INSTALL_DATA) libtermcap.a $(DESTDIR)$(libdir)/libtermcap.a
+	cd $(srcdir); $(INSTALL_DATA) termcap.h $(DESTDIR)$(includedir)/termcap.h
 	cd $(srcdir); for f in termcap.info*; \
-	do $(INSTALL_DATA) $$f $(infodir)/$$f; done
+	do $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$f; done

 uninstall: @uninstalldata@
 	rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
--- termcap-1.3.1.org/termcap.h	1995-07-26 18:09:50.000000000 +0000
+++ termcap-1.3.1/termcap.h	2012-10-13 03:17:18.366000002 +0000
@@ -18,6 +18,9 @@
 #ifndef _TERMCAP_H
 #define _TERMCAP_H 1

+/* prevent ncurses headers from defining different prototypes */
+#define NCURSES_TERMCAP_H_incl
+
 #if __STDC__

 extern int tgetent (char *buffer, const char *termtype);
--- termcap-1.3.1.org/tparam.c
+++ termcap-1.3.1/tparam.c
@@ -17,21 +17,14 @@
 Boston, MA 02111-1307, USA.  */

 /* Emacs config.h may rename various library functions such as malloc.  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif

 #ifdef emacs
 #include "lisp.h"		/* for xmalloc */
 #else

-#ifdef STDC_HEADERS
 #include <stdlib.h>
 #include <string.h>
-#else
-char *malloc ();
-char *realloc ();
-#endif
+#include <unistd.h>

 /* Do this after the include, in case string.h prototypes bcopy.  */
 #if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)


code:
--- mozilla.org/toolkit/xre/nsEmbedFunctions.cpp	2013-10-19 02:31:47.174025997 +0000
+++ mozilla/toolkit/xre/nsEmbedFunctions.cpp	2013-10-19 03:34:37.435890659 +0000
@@ -43,7 +43,6 @@
 #include "nsIDirectoryService.h"
 #include "nsIEventQueueService.h"
 #include "nsILocalFile.h"
-#include "nsIToolkitChromeRegistry.h"

 #include "nsAppDirectoryServiceDefs.h"
 #include "nsArrayEnumerator.h"
--- mozilla.org/toolkit/xre/nsXREDirProvider.cpp 2013-10-19 02:31:47.174025997 +0000
+++ mozilla/toolkit/xre/nsXREDirProvider.cpp	2013-10-19 03:44:02.896870362 +0000
@@ -48,7 +48,6 @@
 #include "nsILocalFile.h"
 #include "nsIObserverService.h"
 #include "nsIProfileChangeStatus.h"
-#include "nsIToolkitChromeRegistry.h"

 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceDefs.h"
@@ -493,6 +492,7 @@

     rv = NS_NewArrayEnumerator(aResult, directories);
   }
+#if 0
   else if (!strcmp(aProperty, NS_CHROME_MANIFESTS_FILE_LIST)) {
     nsCOMArray<nsIFile> manifests;

@@ -531,6 +531,7 @@

     rv = NS_NewArrayEnumerator(aResult, manifests);
   }
+#endif
   else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {
     // NS_APP_CHROME_DIR_LIST is only used to get default (native) icons
     // for OS window decoration.
--- mozilla.org/toolkit/xre/nsAppRunner.cpp	2013-10-19 02:31:47.174025997 +0000
+++ mozilla/toolkit/xre/nsAppRunner.cpp	2013-10-19 04:13:28.710806976 +0000
@@ -87,7 +87,6 @@
 #include "nsIStringBundle.h"
 #include "nsISupportsPrimitives.h"
 #include "nsITimelineService.h"
-#include "nsIToolkitChromeRegistry.h"
 #include "nsIToolkitProfile.h"
 #include "nsIToolkitProfileService.h"
 #include "nsIURI.h"
@@ -744,11 +743,6 @@
                                   nativeFactory);
   NS_ENSURE_SUCCESS(rv, rv);

-  // Inform the chrome registry about OS accessibility
-  nsCOMPtr<nsIToolkitChromeRegistry> cr (do_GetService(NS_CHROMEREGISTRY_CONTRACTID));
-  if (cr)
-    cr->CheckForOSAccessibility();
-
   nsCOMPtr<nsIWindowCreator> creator (do_GetService(NS_APPSTARTUP_CONTRACTID));
   if (!creator) return NS_ERROR_UNEXPECTED;

@@ -1176,7 +1170,7 @@
   if (NS_FAILED(rv))
     return rv;

-#elif
+#else
 #error Oops, you need platform-specific code here
 #endif


code:
--- mozilla.org/nsprpub/pr/src/misc/prnetdb.c	2013-10-19 02:31:47.750025976 +0000
+++ mozilla/nsprpub/pr/src/misc/prnetdb.c	2013-10-19 02:40:50.985006476 +0000
@@ -118,6 +118,11 @@
 #define _PR_HAVE_5_ARG_GETPROTO_R
 #endif

+#undef _PR_HAVE_GETPROTO_R
+#undef _PR_HAVE_GETPROTO_R_INT
+#undef _PR_HAVE_GETPROTO_R_POINTER
+#undef _PR_HAVE_5_ARG_GETPROTO_R
+
 #if !defined(_PR_HAVE_GETPROTO_R)
 PRLock* _getproto_lock = NULL;
 #endif


code:
--- mozilla.org/security/coreconf/arch.mk	2013-10-19 02:31:47.639025980 +0000
+++ mozilla/security/coreconf/arch.mk	2013-10-19 03:08:56.880945959 +0000
@@ -151,10 +151,7 @@
 endif

 ifeq ($(OS_ARCH),Linux)
-    OS_RELEASE := $(subst ., ,$(OS_RELEASE))
-    ifneq ($(words $(OS_RELEASE)),1)
-	OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE))
-    endif
+    OS_RELEASE := 2.6
 endif

 #


code:
--- mozilla/xpcom/glue/nsBaseHashtable.h	2014-11-11 12:09:22.261528202 +0100
+++ mozilla.org/xpcom/glue/nsBaseHashtable.h	2014-11-11 12:08:24.022525238 +0100
@@ -142,7 +142,7 @@
    */
   PRBool Put(KeyType aKey, UserDataType aData)
   {
-    EntryType* ent = PutEntry(aKey);
+    EntryType* ent = this->PutEntry(aKey);

     if (!ent)
       return PR_FALSE;
--- mozilla.org/xpcom/glue/nsClassHashtable.h	2014-11-11 12:32:14.062598011 +0100
+++ mozilla/xpcom/glue/nsClassHashtable.h	2014-11-11 12:32:38.989599280 +0100
@@ -98,7 +98,7 @@
 nsClassHashtable<KeyClass,T>::Get(KeyType aKey, T** retVal) const
 {
   typename nsBaseHashtable<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);

   if (ent)
   {
--- mozilla.org/xpcom/glue/nsBaseHashtable.h	2014-11-11 12:35:49.544608977 +0100
+++ mozilla/xpcom/glue/nsBaseHashtable.h	2014-11-11 12:36:55.165612316 +0100
@@ -156,7 +156,7 @@
    * remove the data for the associated key
    * @param aKey the key to remove from the hashtable
    */
-  void Remove(KeyType aKey) { RemoveEntry(aKey); }
+  void Remove(KeyType aKey) { this->RemoveEntry(aKey); }

   /**
    * function type provided by the application for enumeration.
--- mozilla.org/xpcom/glue/nsInterfaceHashtable.h	2014-11-11 12:35:49.543608977 +0100
+++ mozilla/xpcom/glue/nsInterfaceHashtable.h	2014-11-11 12:37:10.285613086 +0100
@@ -111,7 +111,7 @@
   (KeyType aKey, UserDataType* pInterface) const
 {
   typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);

   if (ent)
   {
--- mozilla.org/xpcom/glue/nsInterfaceHashtable.h	2014-11-11 12:43:38.837632859 +0100
+++ mozilla/xpcom/glue/nsInterfaceHashtable.h	2014-11-11 12:44:00.669633970 +0100
@@ -139,7 +139,7 @@
   (KeyType aKey, PRBool* aFound) const
 {
   typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);

   if (ent)
   {
--- mozilla.org/xpcom/glue/nsBaseHashtable.h	2014-11-11 12:48:37.214648043 +0100
+++ mozilla/xpcom/glue/nsBaseHashtable.h	2014-11-11 12:49:34.765650971 +0100
@@ -123,7 +123,7 @@
    */
   PRBool Get(KeyType aKey, UserDataType* pData) const
   {
-    EntryType* ent = GetEntry(aKey);
+    EntryType* ent = this->GetEntry(aKey);

     if (!ent)
       return PR_FALSE;
--- mozilla.org/xpcom/glue/nsRefPtrHashtable.h	2014-11-11 12:54:25.812665783 +0100
+++ mozilla/xpcom/glue/nsRefPtrHashtable.h	2014-11-11 12:55:21.125668597 +0100
@@ -112,7 +112,7 @@
   (KeyType aKey, UserDataType* pRefPtr) const
 {
   typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);

   if (ent)
   {
@@ -140,7 +140,7 @@
   (KeyType aKey, PRBool* aFound) const
 {
   typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);

   if (ent)
   {
@@ -168,7 +168,7 @@
   PR_Lock(this->mLock);

   typename nsBaseHashtableMT<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);

   if (ent)
   {


code:
--- mozilla.org/mailnews/compose/src/nsMsgCompUtils.cpp	2013-10-19 02:31:48.006025967 +0000
+++ mozilla/mailnews/compose/src/nsMsgCompUtils.cpp	2013-10-21 20:52:56.959451512 +0000
@@ -517,9 +517,14 @@

     if (!userAgentString.IsEmpty())
     {
+	if(!userAgentOverride) {
+		PUSH_STRING("User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8");
+		PUSH_NEWLINE ();
+	} else {
       PUSH_STRING ("User-Agent: ");
       PUSH_STRING(userAgentString.get());
       PUSH_NEWLINE ();
+	}
     }
   }


code:
diff --git a/examples/spin.c b/examples/spin.c
index 339bf00..3353668 100644
--- a/examples/spin.c
+++ b/examples/spin.c
@@ -10,6 +10,7 @@

 #include <math.h>
 #include <stdio.h>
+#include <stdlib.h>

 #include <GL/glx.h>
 #include <GL/gl.h>
diff --git a/src/api.c b/src/api.c
index d5df704..27f2d70 100644
--- a/src/api.c
+++ b/src/api.c
@@ -444,12 +444,13 @@ void glLightf(int light,int type,float v)
 void glLightModeli(int pname,int param)
 {
   GLParam p[6];
-  int i;

   p[0].op=OP_LightModel;
   p[1].i=pname;
   p[2].f=(float)param;
-  for(i=0;i<4;i++) p[3+i].f=0;
+  p[3].f=0;
+  p[4].f=0;
+  p[5].f=0;

   gl_add_op(p);
 }
diff --git a/src/glx.c b/src/glx.c
index 2c01812..f904c8f 100644
--- a/src/glx.c
+++ b/src/glx.c
@@ -115,7 +115,7 @@ static int create_ximage(TinyGLXContext *ctx,
 {
   int major,minor;
   Bool pixmaps;
-  unsigned char *framebuffer;
+  char *framebuffer;
   int (*old_handler)(Display *,XErrorEvent *);

   if (XShmQueryVersion(ctx->display,&major,&minor,&pixmaps))
@@ -301,7 +301,7 @@ Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,

       /* Open the Z Buffer - 256 colors */
       zb=ZB_open(xsize,ysize,ZB_MODE_INDEX,ZB_NB_COLORS,
-                 color_indexes,palette,NULL);
+                 color_indexes,(int*)palette,NULL);
       if (zb == NULL) {
         fprintf(stderr, "Error while initializing Z buffer\n");
         exit(1);
diff --git a/src/vertex.c b/src/vertex.c
index b194e97..c9e7c8b 100644
--- a/src/vertex.c
+++ b/src/vertex.c
@@ -1,4 +1,5 @@
 #include "zgl.h"
+#include <string.h>

 void glopNormal(GLContext * c, GLParam * p)
 {
diff --git a/src/zbuffer.c b/src/zbuffer.c
index c0b0fae..1a498f1 100644
--- a/src/zbuffer.c
+++ b/src/zbuffer.c
@@ -243,15 +243,16 @@ static void ZB_copyFrameBufferRGB24(ZBuffer * zb,
                                     int linesize)
 {
     unsigned short *q;
-    unsigned int *p, *p1, w0, w1, w2, v0, v1;
+    unsigned int *p, w0, w1, w2, v0, v1;
+    union { unsigned int* i; char* c; } p1;
     int y, n;

     q = zb->pbuf;
-    p1 = (unsigned int *) buf;
+    p1.i = (unsigned int *) buf;
     linesize = linesize * 3;

     for (y = 0; y < zb->ysize; y++) {
-	p = p1;
+	p = p1.i;
 	n = zb->xsize >> 2;
 	do {
 	    v0 = *(unsigned int *) q;
@@ -265,7 +266,7 @@ static void ZB_copyFrameBufferRGB24(ZBuffer * zb,
 	    p += 3;
 	} while (--n > 0);

-	(char *) p1 += linesize;
+	p1.c += linesize;
     }
 }

diff --git a/src/zmath.h b/src/zmath.h
index a475b95..4fb7eb0 100644
--- a/src/zmath.h
+++ b/src/zmath.h
@@ -50,4 +50,4 @@ V4 gl_V4_New(float x,float y,float z,float w);

 int gl_Matrix_Inv(float *r,float *m,int n);

-#endif  __ZMATH__
+#endif


code:
--- tmux-1.9a.org/compat/imsg.h
+++ tmux-1.9a/compat/imsg.h
@@ -20,6 +20,9 @@
  */

 #include "tmux.h"
+#undef _GNU_SOURCE
+#define _GNU_SOURCE
+#include <sys/types.h>

 #define IBUF_READ_SIZE		65535
 #define IMSG_HEADER_SIZE	sizeof(struct imsg_hdr)


code:
--- transmission-2.60.org/configure
+++ transmission-2.60/configure
@@ -18252,7 +18252,7 @@
     if test "x$gtk_version" = "xnone" ; then
         as_fn_error $? "\"GTK+ not found!\"" "$LINENO" 5
     fi
-    if test "x$enable_nls" = "xno" ; then
+    if test "x$enable_nls" = "xxx" ; then
         as_fn_error $? "\"The gtk client cannot be built without nls support.  Try adding either --enable-nls or --without-gtk\" " "$LINENO" 5
     fi

--- transmission-2.60.org/gtk/Makefile.in
+++ transmission-2.60/gtk/Makefile.in
@@ -1062,7 +1062,8 @@
 	uninstall-am uninstall-binPROGRAMS uninstall-iconDATA \
 	uninstall-man uninstall-man1

-@INTLTOOL_DESKTOP_RULE@
+transmission-gtk.desktop: transmission-gtk.desktop.in
+	sed 's/^_//g' < transmission-gtk.desktop.in > transmission-gtk.desktop

 @WIN32_TRUE@transmission.res: transmission.rc
 @WIN32_TRUE@	$(WINDRES) -J rc -i transmission.rc -O coff -o transmission.res
--- transmission-2.60.org/Makefile.in
+++ transmission-2.60/Makefile.in
@@ -98,7 +98,7 @@
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = extras third-party libtransmission utils daemon cli gtk \
-	po macosx web
+	macosx web
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -331,7 +331,7 @@
 ACLOCAL_AMFLAGS = -I m4
 @BUILD_CLI_TRUE@CLI_DIR = cli
 @BUILD_DAEMON_TRUE@@WIN32_FALSE@DAEMON_DIR = daemon
-@BUILD_GTK_TRUE@GTK_DIR = gtk po
+@BUILD_GTK_TRUE@GTK_DIR = gtk
 @BUILD_MAC_TRUE@MAC_DIR = macosx
 SUBDIRS = \
   extras \


code:
--- transmission-2.60.org/libtransmission/transmission.h
+++ transmission-2.60/libtransmission/transmission.h
@@ -43,6 +43,7 @@

 #include <inttypes.h> /* uintN_t */
 #include <time.h> /* time_t */
+#include <unistd.h> /* off_t */

 #if !defined(__cplusplus)
  #ifdef HAVE_STDBOOL_H


code:
diff -u -r ubase_before/passwd.c ubase/passwd.c
--- ubase_before/passwd.c	2016-04-25 15:33:45.175988938 +0000
+++ ubase/passwd.c	2016-04-28 20:41:33.928452534 +0000
@@ -18,6 +18,18 @@
 #include "text.h"
 #include "util.h"

+#include <sys/syscall.h>
+
+static int getrandom(void *buf, size_t buflen, unsigned int flags) {
+	return syscall(SYS_getrandom, buf, buflen, flags);
+}
+static void bfsalt(unsigned char buf[22]) {
+	static const char dict[]="./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+	getrandom(buf, 22, 0);
+	unsigned i;
+	for(i=0; i<22; i++) buf[i] = dict[buf[i] % (sizeof(dict)-1)];
+}
+
 static FILE *
 spw_get_file(const char *user)
 {
@@ -137,7 +149,9 @@
 main(int argc, char *argv[])
 {
 	char *cryptpass1 = NULL, *cryptpass2 = NULL, *cryptpass3 = NULL;
-	char *inpass, *p, *salt = PW_CIPHER, *prevhash = NULL;
+	char *inpass, *p, *prevsalt = NULL, *prevhash = NULL;
+	char salt[30] = "$2a$08$";
+	unsigned char buf[22] = {0};
 	struct passwd *pw;
 	struct spwd *spw = NULL;
 	FILE *fp = NULL;
@@ -188,9 +202,9 @@
 			goto newpass;
 		}
 		if (pw->pw_passwd[0] == 'x')
-			prevhash = salt = spw->sp_pwdp;
+			prevhash = prevsalt = spw->sp_pwdp;
 		else
-			prevhash = salt = pw->pw_passwd;
+			prevhash = prevsalt = pw->pw_passwd;
 	}

 	printf("Changing password for %s\n", pw->pw_name);
@@ -199,7 +213,7 @@
 		eprintf("getpass:");
 	if (inpass[0] == '\0')
 		eprintf("no password supplied\n");
-	p = crypt(inpass, salt);
+	p = crypt(inpass, prevsalt);
 	if (!p)
 		eprintf("crypt:");
 	cryptpass1 = estrdup(p);
@@ -207,6 +221,8 @@
 		eprintf("incorrect password\n");

 newpass:
+	bfsalt((unsigned char*)salt+7);
+
 	inpass = getpass("Enter new password: ");
 	if (!inpass)
 		eprintf("getpass:");


code:
--- u-boot-2013.07.org/tools/mkimage.h
+++ u-boot-2013.07/tools/mkimage.h
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <sys/types.h> /* ulong */
 #include <time.h>
 #include <unistd.h>
 #include <sha1.h>
--- u-boot-2013.07.org/tools/proftool.c
+++ u-boot-2013.07/tools/proftool.c
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/param.h>
+#include <sys/types.h> /* ulong */

 #include <compiler.h>
 #include <trace.h>
@@ -533,7 +534,7 @@
 		}

 		printf("%16s-%-5d [01] %lu.%06lu: ", "uboot", 1,
-		       time / 1000000, time % 1000000);
+		       time / 1000000ul, time % 1000000ul);

 		out_func(call->func, 0, " <- ");
 		out_func(call->caller, 1, "\n");


code:
--- usb-modeswitch-data-20140529.org/Makefile
+++ usb-modeswitch-data-20140529/Makefile
@@ -26,14 +26,14 @@
 	./gen-rules.tcl

 db-install: files-install
-	install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*
+	install -D --mode=644 ./usb_modeswitch.d/* $(PREFIX)/share/usb_modeswitch

 db-install-packed:
 	@# Create a compressed tar without gzip timestamp, so tar.gz
 	@# differs only if content is different
 	cd ./usb_modeswitch.d; tar -cf ../configPack.tar *
 	gzip -f9n ./configPack.tar
-	install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
+	install --mode=644 -D ./configPack.tar.gz $(PREFIX)/share/usb_modeswitch
 	rm -f ./configPack.tar.gz

 rules-reload:


code:
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../util-linux/fix-nls-disabled.patch
# Copyright (C) 2007 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

--- util-linux-2.13-pre7/include/nls.h.orig	2007-06-19 08:31:42.000000000 +0200
+++ util-linux-2.13-pre7/include/nls.h	2007-06-19 08:30:49.000000000 +0200
@@ -13,6 +13,7 @@
 #  define N_(String) (String)
 # endif
 #else
+# include <locale.h>
 # undef bindtextdomain
 # define bindtextdomain(Domain, Directory) /* empty */
 # undef textdomain


code:
patch taken from sabotage linux -- https://github.com/rofl0r/sabotage
diff -aur util-linux-2.23.1.org/fdisks/cfdisk.c util-linux-2.23.1/fdisks/cfdisk.c
--- util-linux-2.23.1.org/fdisks/cfdisk.c	2013-07-01 21:37:58.508000002 +0000
+++ util-linux-2.23.1/fdisks/cfdisk.c	2013-07-01 22:00:23.042000002 +0000
@@ -325,7 +325,7 @@
 int logical = 0;
 long long logical_sectors[MAXIMUM_PARTS];

-__sighandler_t old_SIGINT, old_SIGTERM;
+sighandler_t old_SIGINT, old_SIGTERM;

 int arrow_cursor = FALSE;
 int display_units = MEGABYTES;
diff -aur util-linux-2.23.1.org/fdisks/fdisksunlabel.c util-linux-2.23.1/fdisks/fdisksunlabel.c
--- util-linux-2.23.1.org/fdisks/fdisksunlabel.c	2013-07-01 21:37:58.508000002 +0000
+++ util-linux-2.23.1/fdisks/fdisksunlabel.c	2013-07-01 21:59:43.721000002 +0000
@@ -383,9 +383,11 @@
 	}
 }

-static int verify_sun_cmp(int *a, int *b, void *data)
+static void* cmp_data;
+static int verify_sun_cmp(const void *pa, const void *pb)
 {
-    unsigned int *verify_sun_starts = (unsigned int *) data;
+    const int *a = pa, *b = pb;
+    unsigned int *verify_sun_starts = (unsigned int *) cmp_data;

     if (*a == -1)
 	    return 1;
@@ -449,9 +451,8 @@
         else
             array[i] = -1;
     }
-    qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
-	  (int (*)(const void *,const void *,void *)) verify_sun_cmp,
-	  verify_sun_starts);
+    cmp_data = verify_sun_starts;
+    qsort(array,ARRAY_SIZE(array),sizeof(array[0]), verify_sun_cmp);

     if (array[0] == -1) {
 	fdisk_info(cxt, _("No partitions defined"));
diff -aur util-linux-2.23.1.org/include/ttyutils.h util-linux-2.23.1/include/ttyutils.h
--- util-linux-2.23.1.org/include/ttyutils.h	2013-07-01 21:37:58.433000002 +0000
+++ util-linux-2.23.1/include/ttyutils.h	2013-07-01 21:48:42.328000002 +0000
@@ -10,6 +10,7 @@
 #include <stdlib.h>
 #include <termios.h>
 #include <limits.h>
+#include <sys/ttydefaults.h>
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
diff -aur util-linux-2.23.1.org/term-utils/setterm.c util-linux-2.23.1/term-utils/setterm.c
--- util-linux-2.23.1.org/term-utils/setterm.c	2013-07-01 21:37:58.442000002 +0000
+++ util-linux-2.23.1/term-utils/setterm.c	2013-07-01 22:02:54.244000002 +0000
@@ -123,7 +123,7 @@
 #include "nls.h"
 #include "closestream.h"

-#if __GNU_LIBRARY__ < 5
+#if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 5
 #ifndef __alpha__
 # include <linux/unistd.h>
 #define __NR_klogctl __NR_syslog
diff -aur util-linux-2.23.1.org/term-utils/ttymsg.c util-linux-2.23.1/term-utils/ttymsg.c
--- util-linux-2.23.1.org/term-utils/ttymsg.c	2013-07-01 21:37:58.442000002 +0000
+++ util-linux-2.23.1/term-utils/ttymsg.c	2013-07-01 22:07:02.788000002 +0000
@@ -41,6 +41,7 @@
   */

 #include <sys/types.h>
+#include <sys/param.h>
 #include <sys/uio.h>
 #include <signal.h>
 #include <fcntl.h>
diff -aur util-linux-2.23.1.org/text-utils/hexdump.h util-linux-2.23.1/text-utils/hexdump.h
--- util-linux-2.23.1.org/text-utils/hexdump.h	2013-07-01 21:37:58.437000002 +0000
+++ util-linux-2.23.1/text-utils/hexdump.h	2013-07-01 22:01:27.005000002 +0000
@@ -32,7 +32,7 @@
  *
  *	@(#)hexdump.h	5.4 (Berkeley) 6/1/90
  */
-
+#include <sys/types.h>
 typedef struct _pr {
 	struct _pr *nextpr;		/* next print unit */
 #define	F_ADDRESS	0x001		/* print offset */
diff -aur util-linux-2.23.1.org/text-utils/pg.c util-linux-2.23.1/text-utils/pg.c
--- util-linux-2.23.1.org/text-utils/pg.c	2013-07-01 21:37:58.437000002 +0000
+++ util-linux-2.23.1/text-utils/pg.c	2013-07-01 22:01:55.831000002 +0000
@@ -37,7 +37,7 @@
 #ifndef	TIOCGWINSZ
 # include <sys/ioctl.h>
 #endif
-#include <sys/termios.h>
+#include <termios.h>
 #include <fcntl.h>
 #include <regex.h>
 #include <stdio.h>


code:
--- v4l-utils-1.6.3.org/lib/libv4l2/v4l2convert.c
+++ v4l-utils-1.6.3/lib/libv4l2/v4l2convert.c
@@ -86,7 +86,7 @@
 	return fd;
 }

-#ifdef linux
+#ifdef __GLIBC__
 LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
 {
 	int fd;
@@ -121,7 +121,7 @@
 	return v4l2_dup(fd);
 }

-LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
+LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
 {
 	void *arg;
 	va_list ap;
@@ -144,7 +144,7 @@
 	return v4l2_mmap(start, length, prot, flags, fd, offset);
 }

-#ifdef linux
+#ifdef __GLIBC__
 LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
 		__off64_t offset)
 {
--- v4l-utils-1.6.3.org/lib/libv4l1/v4l1compat.c
+++ v4l-utils-1.6.3/lib/libv4l1/v4l1compat.c
@@ -62,7 +62,7 @@
 	return fd;
 }

-#ifdef linux
+#ifdef __GLIBC__
 LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
 {
 	int fd;
@@ -94,7 +94,7 @@
 	return v4l1_dup(fd);
 }

-LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
+LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
 {
 	void *arg;
 	va_list ap;
@@ -117,7 +117,7 @@
 	return v4l1_mmap(start, length, prot, flags, fd, offset);
 }

-#ifdef linux
+#ifdef __GLIBC__
 LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
 		__off64_t offset)
 {


code:
--- virt-manager-0.9.5.org/src/virt-manager.py	2013-10-27 17:33:16.551817115 +0000
+++ virt-manager-0.9.5/src/virt-manager.py	2013-10-27 17:37:05.652820188 +0000
@@ -210,33 +210,6 @@
     if show or uri or uuid:
         launch_specific_window(managerObj, show, uri, uuid)

-def dbus_config(engine):
-    """
-    Setup dbus interface
-    """
-    import dbus
-    from virtManager.remote import vmmRemote
-    bus = None
-
-    if os.getenv("DBUS_STARTER_ADDRESS") is None:
-        bus = dbus.SessionBus()
-    else:
-        bus = dbus.StarterBus()
-
-    dbusProxy = bus.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")
-    dbusObj = dbus.Interface(dbusProxy, "org.freedesktop.DBus")
-
-    if dbusObj.NameHasOwner("com.redhat.virt.manager"):
-        # We're already running, so just talk to existing process
-        managerProxy = bus.get_object("com.redhat.virt.manager",
-                                      "/com/redhat/virt/manager")
-        managerObj = dbus.Interface(managerProxy, "com.redhat.virt.manager")
-        return managerObj
-
-    else:
-        # Grab the service to allow others to talk to us later
-        name = dbus.service.BusName("com.redhat.virt.manager", bus=bus)
-        vmmRemote(engine, name)

 # Generic OptionParser callback for all --show-* options
 # This routine stores UUID to options.uuid for all --show-* options
@@ -318,12 +291,6 @@

     gobject.threads_init()

-    import dbus
-    import dbus.mainloop.glib
-    dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-    dbus.mainloop.glib.threads_init()
-    import dbus.service
-
     # Specifically init config/gconf before the fork, so that pam
     # doesn't think we closed the app, therefor robbing us of
     # display access
@@ -365,20 +332,6 @@

     engine = vmmEngine()

-    if not options.nodbus:
-        try:
-            managerObj = dbus_config(engine)
-            if managerObj:
-                # yes, we exit completely now - remote service is in charge
-                logging.debug("Connected to already running instance.")
-                show_remote(managerObj, options.show,
-                            options.uri, options.uuid)
-                return
-        except:
-            # Something went wrong doing dbus setup, just ignore & carry on
-            logging.exception("Could not get connection to session bus, "
-                              "disabling DBus service")
-
     # Hook libvirt events into glib main loop
     import virtManager.libvirtglib
     virtManager.libvirtglib.register_event_impl()


code:
--- a/Source/WTF/wtf/Assertions.cpp
+++ b/Source/WTF/wtf/Assertions.cpp
@@ -61,8 +61,10 @@
 #if (OS(DARWIN) || OS(LINUX)) && !OS(ANDROID)
 #include <cxxabi.h>
 #include <dlfcn.h>
+#ifdef __GLIBC__
 #include <execinfo.h>
 #endif
+#endif

 #if OS(ANDROID)
 #include "android/log.h"
@@ -268,7 +270,7 @@

 void WTFGetBacktrace(void** stack, int* size)
 {
-#if (OS(DARWIN) || OS(LINUX)) && !OS(ANDROID)
+#if OS(DARWIN) || (OS(LINUX) && __GLIBC__)
     *size = backtrace(stack, *size);
 #elif OS(WINDOWS) && !OS(WINCE)
     // The CaptureStackBackTrace function is available in XP, but it is not defined


code:
prefix = /usr/local
bindir = $(prefix)/bin

PROG = weechat
SRCS =  \
../gui/curses/gui-curses-key.c \
../gui/gui-bar-item.c \
./wee-proxy.c \
../gui/gui-input.c \
../gui/gui-history.c \
./wee-hook.c \
./wee-hashtable.c \
../gui/curses/gui-curses-main.c \
../gui/curses/gui-curses-window.c \
../plugins/plugin-config.c \
../gui/gui-buffer.c \
weechat.c \
../gui/gui-focus.c \
./wee-config.c \
../gui/gui-cursor.c \
../gui/gui-filter.c \
./wee-upgrade.c \
../gui/gui-bar.c \
../gui/curses/gui-curses-term.c \
./wee-command.c \
../gui/curses/gui-curses-chat.c \
../gui/gui-chat.c \
./wee-version.c \
./wee-input.c \
./wee-backtrace.c \
../gui/gui-nicklist.c \
../gui/gui-hotlist.c \
../gui/gui-key.c \
./wee-eval.c \
./wee-infolist.c \
../plugins/plugin.c \
../gui/curses/gui-curses-mouse.c \
../gui/gui-bar-window.c \
./wee-hdata.c \
./wee-util.c \
../plugins/plugin-api.c \
./wee-debug.c \
../gui/curses/gui-curses-color.c \
../gui/curses/gui-curses-bar-window.c \
../gui/gui-completion.c \
./wee-completion.c \
../gui/gui-layout.c \
../gui/gui-line.c \
../gui/gui-mouse.c \
./wee-utf8.c \
./wee-list.c \
./wee-string.c \
./wee-config-file.c \
../gui/gui-color.c \
./wee-upgrade-file.c \
../gui/gui-window.c \
./wee-network.c \
./wee-url.c \
./wee-log.c
LIBS =
OBJS = $(SRCS:.c=.o)

CFLAGS += -Wall -D_GNU_SOURCE -DHAVE_CONFIG_H

-include config.mak

all: $(PROG)

install: $(PROG)
	install -d $(DESTDIR)/$(bindir)
	install -D -m 755 $(PROG) $(DESTDIR)/$(bindir)/

clean:
	rm -f $(PROG)
	rm -f $(OBJS)

%.o: %.c
	$(CC) $(CFLAGS) $(INC) $(PIC) -c -o $@ $<

$(PROG): $(OBJS)
	 $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@

.PHONY: all clean install


code:
--- wine-1.5.19/dlls/iphlpapi/iphlpapi_main.c	2012-12-19 04:36:11.329000003 +0000
+++ wine-1.5.19.patched//dlls/iphlpapi/iphlpapi_main.c	2012-12-19 04:36:35.086000003 +0000
@@ -23,6 +23,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <sys/types.h>
+#include <sys/socket.h>
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif


code:
--- wireless_tools.29.org/Makefile
+++ wireless_tools.29/Makefile
@@ -4,20 +4,18 @@

 ## Installation directory. By default, go in /usr/local.
 ## Distributions should probably use /, but they probably know better...
-ifndef PREFIX
-  PREFIX = /usr/local
-endif
+PREFIX ?=

-## Compiler to use (modify this for cross compile).
-CC = gcc
+# Compiler to use (modify this for cross compile).
+CC ?= gcc
 ## Other tools you need to modify for cross compile (static lib only).
-AR = ar
-RANLIB = ranlib
+AR ?= ar
+RANLIB ?= ranlib

 ## Uncomment this to build tools using static version of the library.
 ## Mostly useful for embedded platforms without ldd, or to create
 ## a local version (non-root).
-# BUILD_STATIC = y
+BUILD_STATIC ?= y

 ## Uncomment this to build without using libm (less efficient).
 ## This is mostly useful for embedded platforms without maths.
@@ -25,7 +23,7 @@

 ## Uncomment this to strip binary from symbols. This reduce binary size.
 ## by a few percent but make debug worse...
-# BUILD_STRIPPING = y
+BUILD_STRIPPING ?= y

 ## Uncomment this to build with only essential functionality.
 ## This leaves out the less used features and cut in half the tools.
@@ -71,10 +69,10 @@
 DYNAMIC_LINK= libiw.so

 # Install directories
-INSTALL_DIR= $(PREFIX)/sbin/
-INSTALL_LIB= $(PREFIX)/lib/
-INSTALL_INC= $(PREFIX)/include/
-INSTALL_MAN= $(PREFIX)/man/
+INSTALL_DIR= $(DESTDIR)$(PREFIX)/sbin/
+INSTALL_LIB= $(DESTDIR)$(PREFIX)/lib/
+INSTALL_INC= $(DESTDIR)$(PREFIX)/include/
+INSTALL_MAN= $(DESTDIR)$(PREFIX)/man/

 # Various commands
 RM = rm -f


code:
--- wireless_tools.29.org/iwlib.h
+++ wireless_tools.29/iwlib.h
@@ -51,7 +51,7 @@
 #define __user
 #endif

-#include <linux/types.h>		/* for "caddr_t" et al		*/
+//#include <linux/types.h>		/* for "caddr_t" et al		*/

 /* Glibc systems headers are supposedly less problematic than kernel ones */
 #include <sys/socket.h>			/* for "struct sockaddr" et al	*/
--- wireless_tools.29.org/wireless.21.h
+++ wireless_tools.29/wireless.21.h
@@ -76,6 +76,18 @@
 #include <linux/types.h>		/* for "caddr_t" et al		*/
 #include <linux/socket.h>		/* for "struct sockaddr" et al	*/
 #include <linux/if.h>			/* for IFNAMSIZ and co... */
+
+#else
+#include <stdint.h>
+#define __u8 uint8_t
+#define __u16 uint16_t
+#define __u32 uint32_t
+#define __s8 int8_t
+#define __s16 int16_t
+#define __s32 int32_t
+
+
+
 #endif	/* __KERNEL__ */

 /***************************** VERSION *****************************/


code:
--- wireshark-1.10.2.org/epan/dissectors/packet-gluster.h
+++ wireshark-1.10.2/epan/dissectors/packet-gluster.h
@@ -355,6 +355,15 @@
 };

 /* dir-entry types from libglusterfs/src/compat.h */
+#undef DT_UNKNOWN
+#undef DT_FIFO
+#undef DT_CHR
+#undef DT_DIR
+#undef DT_BLK
+#undef DT_REG
+#undef DT_LNK
+#undef DT_SOCK
+#undef DT_WHT
 enum gluster_entry_types {
 	DT_UNKNOWN = 0,
 	DT_FIFO = 1,


code:
--- wireshark-1.10.2.org/ui/gtk/gui_utils.c
+++ wireshark-1.10.2/ui/gtk/gui_utils.c
@@ -128,7 +128,8 @@
     g_list_free(ws_icon_list);

     /* set icon by name, this allows us to use even SVG icon if it is present */
-    gtk_window_set_icon_name(GTK_WINDOW(win), "wireshark");
+//    gtk_window_set_icon_name(GTK_WINDOW(win), "wireshark");
+
 #endif
 }


code:
diff -ru wpa_supplicant-2.3.org/wpa_supplicant/config.c wpa_supplicant-2.3/wpa_supplicant/config.c
--- wpa_supplicant-2.3.org/wpa_supplicant/config.c	2014-11-26 12:20:05.504066398 +0100
+++ wpa_supplicant-2.3/wpa_supplicant/config.c	2014-11-26 12:33:53.742067707 +0100
@@ -3806,6 +3806,7 @@
 #define IPV4(f) #f, wpa_global_config_parse_ipv4, OFFSET(f), NULL, NULL

 static const struct global_parse_data global_fields[] = {
+	{ STR(action_script), 0 },
 #ifdef CONFIG_CTRL_IFACE
 	{ STR(ctrl_interface), 0 },
 	{ FUNC_NO_VAR(no_ctrl_interface), 0 },
Only in wpa_supplicant-2.3/wpa_supplicant: config.d
diff -ru wpa_supplicant-2.3.org/wpa_supplicant/config.h wpa_supplicant-2.3/wpa_supplicant/config.h
--- wpa_supplicant-2.3.org/wpa_supplicant/config.h	2014-11-26 12:20:05.497066398 +0100
+++ wpa_supplicant-2.3/wpa_supplicant/config.h	2014-11-26 12:53:18.220069549 +0100
@@ -329,6 +329,10 @@
  * for each.
  */
 struct wpa_config {
+	/* action_script: a script that is executed on connect and disconnect
+	 * events. gets interface name, state, and bssid as command line args */
+	char * action_script;
+
 	/**
 	 * ssid - Head of the global network list
 	 *
Binary files wpa_supplicant-2.3.org/wpa_supplicant/config.o and wpa_supplicant-2.3/wpa_supplicant/config.o differ
diff -ru wpa_supplicant-2.3.org/wpa_supplicant/notify.c wpa_supplicant-2.3/wpa_supplicant/notify.c
--- wpa_supplicant-2.3.org/wpa_supplicant/notify.c	2014-11-26 12:20:05.500066398 +0100
+++ wpa_supplicant-2.3/wpa_supplicant/notify.c	2014-11-26 12:54:49.356069693 +0100
@@ -67,6 +67,27 @@
 	wpas_dbus_unregister_interface(wpa_s);
 }

+#include <sys/wait.h>
+static void connect_notify(struct wpa_supplicant *wpa_s, int disconnected) {
+	if(disconnected) wpas_p2p_notif_disconnected(wpa_s);
+	else wpas_p2p_notif_connected(wpa_s);
+	if (wpa_s->conf->action_script) {
+		pid_t child;
+		if(!(child = fork())) {
+			execve(wpa_s->conf->action_script, (char* const[]) {
+				wpa_s->conf->action_script,
+				wpa_s->ifname,
+				disconnected ? "DISCONNECTED" : "CONNECTED",
+				wpa_s->current_ssid && wpa_s->current_ssid->ssid ?
+					wpa_ssid_txt(wpa_s->current_ssid->ssid, wpa_s->current_ssid->ssid_len)
+					: "",
+				0}, (char* const[]) {0});
+		} else {
+			int loc;
+			waitpid(child, &loc, 0);
+		}
+	}
+}

 void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
 			       enum wpa_states new_state,
@@ -80,9 +101,9 @@
 	wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_STATE);

 	if (new_state == WPA_COMPLETED)
-		wpas_p2p_notif_connected(wpa_s);
+		connect_notify(wpa_s, 0);
 	else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED)
-		wpas_p2p_notif_disconnected(wpa_s);
+		connect_notify(wpa_s, 1);

 	sme_state_changed(wpa_s);


code:
--- wpa_supplicant-1.0.org/src/utils/wpa_debug.c
+++ wpa_supplicant-1.0/src/utils/wpa_debug.c
@@ -149,6 +149,7 @@
 #endif /* CONFIG_DEBUG_FILE */
 		vprintf(fmt, ap);
 		printf("\n");
+		fflush(stdout);
 #ifdef CONFIG_DEBUG_FILE
 		}
 #endif /* CONFIG_DEBUG_FILE */


code:
#Example for a WPA/WPA2 network with passphrase
#network={
#  ssid="MysercretNetwork"
#  key_mgmt=WPA-PSK
#  psk="MyVerySecretPassphrase"
#  priority=5
#}
#Example for a WEP network
#network={
#        ssid="example wep network"
#        key_mgmt=NONE
#        wep_key0="abcde"
#        wep_key1=0102030405
#        wep_tx_keyidx=0
#}
#Example to connect to any open network
#network={
#        key_mgmt=NONE
#        priority=-999
#}
# Allow users in the 'wheel' group to control wpa_supplicant
#ctrl_interface=DIR=/var/service/wpa_supplicant GROUP=wheel
# Allow user-made changes to be saved (e.g. add networks)
#update_config=1
action_script=/etc/wpa_connect_action.sh


code:
$OpenBSD: patch-src_utils_eloop_c,v 1.5 2015/09/29 11:57:54 dcoppa Exp $

don't try to access list members to free them unless already initialised

--- src/utils/eloop.c.orig	Sun Sep 27 21:02:05 2015
+++ src/utils/eloop.c	Mon Sep 28 09:35:05 2015
@@ -1064,6 +1064,9 @@ void eloop_destroy(void)
 	struct eloop_timeout *timeout, *prev;
 	struct os_reltime now;

+	if (eloop.timeout.prev == NULL)
+		return;
+
 	os_get_reltime(&now);
 	dl_list_for_each_safe(timeout, prev, &eloop.timeout,
 			      struct eloop_timeout, list) {


code:
$OpenBSD: patch-src_crypto_tls_openssl_c,v 1.3 2015/09/29 11:57:54 dcoppa Exp $

Compatibility fixes for LibreSSL

--- src/crypto/tls_openssl.c.orig	Sun Sep 27 21:02:05 2015
+++ src/crypto/tls_openssl.c	Mon Sep 28 13:43:46 2015
@@ -2229,7 +2229,7 @@ static int tls_parse_pkcs12(struct tls_data *data, SSL
 	}

 	if (certs) {
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
 		SSL_clear_chain_certs(ssl);
 		while ((cert = sk_X509_pop(certs)) != NULL) {
 			X509_NAME_oneline(X509_get_subject_name(cert), buf,
@@ -2247,7 +2247,7 @@ static int tls_parse_pkcs12(struct tls_data *data, SSL
 			/* Try to continue anyway */
 		}
 		sk_X509_free(certs);
-#ifndef OPENSSL_IS_BORINGSSL
+#if !defined(OPENSSL_IS_BORINGSSL) && !defined(LIBRESSL_VERSION_NUMBER)
 		res = SSL_build_cert_chain(ssl,
 					   SSL_BUILD_CHAIN_FLAG_CHECK |
 					   SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR);
@@ -2812,7 +2812,7 @@ int tls_connection_get_random(void *ssl_ctx, struct tl
 	if (conn == NULL || keys == NULL)
 		return -1;
 	ssl = conn->ssl;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL)
 		return -1;

@@ -2841,7 +2841,7 @@ int tls_connection_get_random(void *ssl_ctx, struct tl
 #ifndef CONFIG_FIPS
 static int openssl_get_keyblock_size(SSL *ssl)
 {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	const EVP_CIPHER *c;
 	const EVP_MD *h;
 	int md_size;
@@ -2911,7 +2911,7 @@ static int openssl_tls_prf(struct tls_connection *conn
 		   "mode");
 	return -1;
 #else /* CONFIG_FIPS */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	SSL *ssl;
 	u8 *rnd;
 	int ret = -1;
@@ -3394,7 +3394,7 @@ int tls_connection_set_cipher_list(void *tls_ctx, stru

 	wpa_printf(MSG_DEBUG, "OpenSSL: cipher suites: %s", buf + 1);

-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
 #if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST)
 	if (os_strstr(buf, ":ADH-")) {
 		/*
@@ -3977,7 +3977,7 @@ static int tls_sess_sec_cb(SSL *s, void *secret, int *
 	struct tls_connection *conn = arg;
 	int ret;

-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	if (conn == NULL || conn->session_ticket_cb == NULL)
 		return 0;


code:
Submitted By:            Fernando de Oliveira <famobr at yahoo dot com dot br>
Date:                    2015-10-24
Initial Package Version: 1.8
Upstream Status:         not submitted
Origin:                  https://bitbucket.org/TimothyGu/x265/commits/a9aacc5a16116f1c663d1fcb62ad9a0985043b94/raw/
                         https://bitbucket.org/TimothyGu/x265/commits/578c5ef3dff46db38e7c36a8d3c6198a65c9746b/raw/
Description:             Add ENABLE_STATIC:BOOL=ON, so that static lib
                         can be disabled.

--- x265_11047/source/CMakeLists.txt.orig	2015-10-08 07:01:36.000000000 -0300
+++ x265_11047/source/CMakeLists.txt	2015-10-24 17:10:57.919861668 -0300
@@ -419,16 +419,21 @@
 endif()

 source_group(ASM FILES ${YASM_SRCS})
-add_library(x265-static STATIC $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> ${YASM_OBJS} ${YASM_SRCS})
-if(NOT MSVC)
-    set_target_properties(x265-static PROPERTIES OUTPUT_NAME x265)
-endif()
-if(EXTRA_LIB)
-    target_link_libraries(x265-static ${EXTRA_LIB})
-endif()
-install(TARGETS x265-static
-    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+
+option(ENABLE_STATIC "Build static library" ON)
+if(ENABLE_STATIC)
+    add_library(x265-static STATIC $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> ${YASM_OBJS} ${YASM_SRCS})
+    if(NOT MSVC)
+        set_target_properties(x265-static PROPERTIES OUTPUT_NAME x265)
+    endif()
+    if(EXTRA_LIB)
+        target_link_libraries(x265-static ${EXTRA_LIB})
+    endif()
+    install(TARGETS x265-static
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+endif(ENABLE_STATIC)
+
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)

 if(CMAKE_RC_COMPILER)
@@ -490,6 +495,10 @@
     endif()
 endif()

+if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
+    message(FATAL_ERROR "Neither static nor shared libraries are enabled.")
+endif()
+
 if(X265_LATEST_TAG)
     # convert lists of link libraries into -lstdc++ -lm etc..
     foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES} ${PLATFORM_LIBS})
@@ -551,12 +560,14 @@
     else()
         add_executable(cli ../COPYING ${InputFiles} ${OutputFiles} ${GETOPT} ${X265_RC_FILE}
                        ${ExportDefs} x265.cpp x265.h x265cli.h x265-extras.h x265-extras.cpp)
-        if(WIN32 OR NOT ENABLE_SHARED OR INTEL_CXX)
-            # The CLI cannot link to the shared library on Windows, it
-            # requires internal APIs not exported from the DLL
-            target_link_libraries(cli x265-static ${PLATFORM_LIBS})
-        else()
+        if(WIN32 AND NOT ENABLE_STATIC)
+            message(FATAL_ERROR "The CLI cannot link to shared library on Windows as it requires internal APIs not exported from the DLL.")
+        elseif(INTEL_CXX AND NOT ENABLE_STATIC)
+            message(FATAL_ERROR "The CLI cannot link to shared library with Intel C++ Compiler as it requires internal APIs not exported from the shared library.")
+        elseif(ENABLE_SHARED)
             target_link_libraries(cli x265-shared ${PLATFORM_LIBS})
+        else()
+            target_link_libraries(cli x265-static ${PLATFORM_LIBS})
         endif()
     endif()
     set_target_properties(cli PROPERTIES OUTPUT_NAME x265)


code:
--- xf86-video-fbdev-0.4.3/src/fbdev.c
+++ xf86-video-fbdev-0.4.3a/src/fbdev.c
@@ -14,7 +14,6 @@
 #include "xf86_OSproc.h"

 #include "mipointer.h"
-#include "mibstore.h"
 #include "micmap.h"
 #include "colormapst.h"
 #include "xf86cmap.h"
@@ -845,7 +844,6 @@
 	}

 	xf86SetBlackWhitePixels(pScreen);
-	miInitializeBackingStore(pScreen);
 	xf86SetBackingStore(pScreen);

 	/* software cursor */


code:
--- xf86-video-intel-2.99.916.org/src/uxa/intel_driver.c
+++ xf86-video-intel-2.99.916/src/uxa/intel_driver.c
@@ -1188,7 +1188,9 @@
 		intel->dri3 = DRI_NONE;
 	}

+#if HAVE_DRI3
 	intel_sync_close(screen);
+#endif

 	xf86GARTCloseScreen(scrn->scrnIndex);


code:
From fc78fe98222b0204b8a2872a529763d6fe5048da Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 25 Sep 2012 12:54:49 +0000
Subject: Remove mibstore.h

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
diff --git a/src/g80_driver.c b/src/g80_driver.c
index cc4e197..719b96c 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -34,7 +34,6 @@
 #include <xf86Resources.h>
 #endif
 #include <mipointer.h>
-#include <mibstore.h>
 #include <micmap.h>
 #include <xf86cmap.h>
 #include <fb.h>
@@ -833,7 +832,6 @@ G80ScreenInit(SCREEN_INIT_ARGS_DECL)
         }
     }

-    miInitializeBackingStore(pScreen);
     xf86SetBackingStore(pScreen);
     xf86SetSilkenMouse(pScreen);

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 6dad6e5..8f35334 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -2550,7 +2550,6 @@ NVScreenInit(SCREEN_INIT_ARGS_DECL)
     if (!pNv->NoAccel)
 	NVAccelInit(pScreen);

-    miInitializeBackingStore(pScreen);
     xf86SetBackingStore(pScreen);
     xf86SetSilkenMouse(pScreen);

diff --git a/src/nv_include.h b/src/nv_include.h
index fb190bf..f174eef 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -24,9 +24,6 @@
 /* All drivers initialising the SW cursor need this */
 #include "mipointer.h"

-/* All drivers implementing backing store need this */
-#include "mibstore.h"
-
 #include "micmap.h"

 #include "xf86DDC.h"
diff --git a/src/riva_driver.c b/src/riva_driver.c
index e0667ef..759501e 100644
--- a/src/riva_driver.c
+++ b/src/riva_driver.c
@@ -1168,7 +1168,6 @@ RivaScreenInit(SCREEN_INIT_ARGS_DECL)
     if (!pRiva->NoAccel)
 	RivaAccelInit(pScreen);

-    miInitializeBackingStore(pScreen);
     xf86SetBackingStore(pScreen);
     xf86SetSilkenMouse(pScreen);

diff --git a/src/riva_include.h b/src/riva_include.h
index f2c5302..c7aeef7 100644
--- a/src/riva_include.h
+++ b/src/riva_include.h
@@ -22,9 +22,6 @@
 /* All drivers initialising the SW cursor need this */
 #include "mipointer.h"

-/* All drivers implementing backing store need this */
-#include "mibstore.h"
-
 #include "micmap.h"

 #include "xf86DDC.h"
--
cgit v0.9.0.2-2-gbebe


code:
--- xinit-1.3.0.org/startx.cpp	2012-11-03 20:19:38.404000002 +0000
+++ xinit-1.3.0/startx.cpp	2012-11-03 20:20:46.924000002 +0000
@@ -1,5 +1,9 @@
 XCOMM!SHELL_CMD

+hostname(){
+	echo localhost
+}
+
 XCOMM
 XCOMM This is just a sample implementation of a slightly less primitive
 XCOMM interface than xinit.  It looks for user .xinitrc and .xserverrc
@@ -67,7 +71,7 @@
 scosysclientrc=XINITDIR/xinitrc
 #else
 userclientrc=$HOME/.xinitrc
-sysclientrc=XINITDIR/xinitrc
+sysclientrc=/etc/xinitrc
 #endif

 userserverrc=$HOME/.xserverrc


code:
diff -Naur xload-1.1.2PREV/get_rload.c xload-1.1.2/get_rload.c
--- xload-1.1.2PREV/get_rload.c	2013-08-04 12:43:06.000000000 +0800
+++ xload-1.1.2/get_rload.c	2016-05-11 17:40:39.000000000 +0800
@@ -9,7 +9,7 @@
 /* Not all OS supports get_rload
    steal the STUB idea from get_load
  */
-#if defined(QNX4) || defined(__CYGWIN__)
+#if defined(QNX4) || defined(__CYGWIN__) || 1
 #define RLOADSTUB
 #endif


code:
--- xmms-1.2.6.org/configure	2013-01-02 22:46:18.523000002 +0000
+++ xmms-1.2.6/configure	2013-01-02 22:52:41.530000003 +0000
@@ -5920,65 +5920,7 @@
   char *tmp_version;

   system ("touch conf.glibtest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = g_strdup("$min_glib_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_glib_version");
-     exit(1);
-   }
-
-  if ((glib_major_version != $glib_config_major_version) ||
-      (glib_minor_version != $glib_config_minor_version) ||
-      (glib_micro_version != $glib_config_micro_version))
-    {
-      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
-             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-             glib_major_version, glib_minor_version, glib_micro_version);
-      printf ("*** was found! If glib-config was correct, then it is best\n");
-      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-      printf("*** required on your system.\n");
-      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-      printf("*** before re-running configure\n");
-    }
-  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-	   (glib_minor_version != GLIB_MINOR_VERSION) ||
-           (glib_micro_version != GLIB_MICRO_VERSION))
-    {
-      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-      printf("*** library (version %d.%d.%d)\n",
-	     glib_major_version, glib_minor_version, glib_micro_version);
-    }
-  else
-    {
-      if ((glib_major_version > major) ||
-        ((glib_major_version == major) && (glib_minor_version > minor)) ||
-        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-      {
-        return 0;
-       }
-     else
-      {
-        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-               glib_major_version, glib_minor_version, glib_micro_version);
-        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-	       major, minor, micro);
-        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-        printf("***\n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-        printf("*** correct copy of glib-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-      }
-    }
-  return 1;
+  return 0;
 }

 EOF
@@ -6186,67 +6128,7 @@
   char *tmp_version;

   system ("touch conf.gtktest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = g_strdup("$min_gtk_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_gtk_version");
-     exit(1);
-   }
-
-  if ((gtk_major_version != $gtk_config_major_version) ||
-      (gtk_minor_version != $gtk_config_minor_version) ||
-      (gtk_micro_version != $gtk_config_micro_version))
-    {
-      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
-             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
-             gtk_major_version, gtk_minor_version, gtk_micro_version);
-      printf ("*** was found! If gtk-config was correct, then it is best\n");
-      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-      printf("*** required on your system.\n");
-      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
-      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
-      printf("*** before re-running configure\n");
-    }
-#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
-  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
-	   (gtk_minor_version != GTK_MINOR_VERSION) ||
-           (gtk_micro_version != GTK_MICRO_VERSION))
-    {
-      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
-	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
-      printf("*** library (version %d.%d.%d)\n",
-	     gtk_major_version, gtk_minor_version, gtk_micro_version);
-    }
-#endif /* defined (GTK_MAJOR_VERSION) ... */
-  else
-    {
-      if ((gtk_major_version > major) ||
-        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
-        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
-      {
-        return 0;
-       }
-     else
-      {
-        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
-               gtk_major_version, gtk_minor_version, gtk_micro_version);
-        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
-	       major, minor, micro);
-        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
-        printf("***\n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
-        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-      }
-    }
-  return 1;
+  return 0;
 }

 EOF
--- xmms-1.2.6.org/libxmms/configure	2013-01-02 22:46:18.502000002 +0000
+++ xmms-1.2.6/libxmms/configure	2013-01-02 22:55:06.846000003 +0000
@@ -5747,65 +5747,7 @@
   char *tmp_version;

   system ("touch conf.glibtest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = g_strdup("$min_glib_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_glib_version");
-     exit(1);
-   }
-
-  if ((glib_major_version != $glib_config_major_version) ||
-      (glib_minor_version != $glib_config_minor_version) ||
-      (glib_micro_version != $glib_config_micro_version))
-    {
-      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
-             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-             glib_major_version, glib_minor_version, glib_micro_version);
-      printf ("*** was found! If glib-config was correct, then it is best\n");
-      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-      printf("*** required on your system.\n");
-      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-      printf("*** before re-running configure\n");
-    }
-  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-	   (glib_minor_version != GLIB_MINOR_VERSION) ||
-           (glib_micro_version != GLIB_MICRO_VERSION))
-    {
-      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-      printf("*** library (version %d.%d.%d)\n",
-	     glib_major_version, glib_minor_version, glib_micro_version);
-    }
-  else
-    {
-      if ((glib_major_version > major) ||
-        ((glib_major_version == major) && (glib_minor_version > minor)) ||
-        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-      {
-        return 0;
-       }
-     else
-      {
-        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-               glib_major_version, glib_minor_version, glib_micro_version);
-        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-	       major, minor, micro);
-        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-        printf("***\n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-        printf("*** correct copy of glib-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-      }
-    }
-  return 1;
+  return 0;
 }

 EOF
@@ -6013,67 +5955,7 @@
   char *tmp_version;

   system ("touch conf.gtktest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = g_strdup("$min_gtk_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_gtk_version");
-     exit(1);
-   }
-
-  if ((gtk_major_version != $gtk_config_major_version) ||
-      (gtk_minor_version != $gtk_config_minor_version) ||
-      (gtk_micro_version != $gtk_config_micro_version))
-    {
-      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
-             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
-             gtk_major_version, gtk_minor_version, gtk_micro_version);
-      printf ("*** was found! If gtk-config was correct, then it is best\n");
-      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-      printf("*** required on your system.\n");
-      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
-      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
-      printf("*** before re-running configure\n");
-    }
-#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
-  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
-	   (gtk_minor_version != GTK_MINOR_VERSION) ||
-           (gtk_micro_version != GTK_MICRO_VERSION))
-    {
-      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
-	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
-      printf("*** library (version %d.%d.%d)\n",
-	     gtk_major_version, gtk_minor_version, gtk_micro_version);
-    }
-#endif /* defined (GTK_MAJOR_VERSION) ... */
-  else
-    {
-      if ((gtk_major_version > major) ||
-        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
-        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
-      {
-        return 0;
-       }
-     else
-      {
-        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
-               gtk_major_version, gtk_minor_version, gtk_micro_version);
-        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
-	       major, minor, micro);
-        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
-        printf("***\n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
-        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-      }
-    }
-  return 1;
+  return 0;
 }

 EOF


code:
--- xmms-1.2.6.org/General/ir/ir.c	2013-01-02 22:46:18.503000002 +0000
+++ xmms-1.2.6/General/ir/ir.c	2013-01-02 23:14:11.623000004 +0000
@@ -16,10 +16,10 @@
 #include "ir.h"

 /* Important stuff to know */
-static gboolean keepGoing = FALSE;
+gboolean keepGoing = FALSE;

 /* The thread handle */
-static pthread_t irapp_thread;
+pthread_t irapp_thread;

 /* Declarations for calls that we need to mention in the plugin struct */
 static void init(void);


code:
--- xmms-1.2.6.org/wmxmms/wmxmms.c	2013-01-02 22:46:18.511000002 +0000
+++ xmms-1.2.6/wmxmms/wmxmms.c	2013-01-02 23:30:37.358000003 +0000
@@ -103,8 +103,6 @@

 /* Does anyone know a better way? */

-extern Window gdk_leader_window;
-
 void action_play(void)
 {
 	xmms_remote_play(xmms_session);
@@ -635,7 +633,7 @@

 	pixmap = gdk_pixmap_create_from_xpm_d(window->window, &mask, NULL, xmms_dock_master_xpm);

-	leader = gdk_window_foreign_new(gdk_leader_window);
+	leader = gdk_window_foreign_new(gdk_x11_get_default_root_xwindow());
 	gdk_window_set_icon(leader, icon_win->window, NULL, NULL);
 	gdk_window_reparent(icon_win->window, leader, 0, 0);


code:
--- xmms2-0.8DrO_o.org/src/plugins/airplay/rtspconnection.c
+++ xmms2-0.8DrO_o/src/plugins/airplay/rtspconnection.c
@@ -26,6 +26,8 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <sys/select.h>
+#include <sys/time.h>

 #include "rtspconnection.h"


code:
From 612eb45a2e7a0b35cc3790870e6d0cc42eb50c74 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 11 Feb 2015 16:26:40 +0100
Subject: [PATCH] sdksyms.sh: Make sdksyms.sh work with gcc5.

gcc5's cpp inserts patterns like this:

extern
      __attribute__((visibility("default")))
                int WaitForSomething(int *
    );

This patch make sdksyms.sh work with this. Note my awk skills are weak, so
there likely is a better way to deal with this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 hw/xfree86/sdksyms.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index 2305073..99b0cae 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -350,6 +350,23 @@ BEGIN {
     if (sdk) {
 	n = 3;

+	# detect the following gcc5 cpp pattern and skip it:
+	# extern
+	# # 320 "../../include/os.h" 3 4
+	#     __attribute__((visibility("default")))
+	# # 320 "../../include/os.h"
+	# Note in this case the "extern " or "extern void " always has
+	# a trailing space
+	if ($0 ~ "^extern.* $") {
+	    getline;
+	    getline;
+	    getline;
+	    getline;
+	    n = 1;
+	    while ($n == " ")
+		n++;
+	}
+
 	# skip attribute, if any
 	while ($n ~ /^(__attribute__|__global)/ ||
 	    # skip modifiers, if any
--
2.1.0


code:
--- ./hw/xfree86/common/compiler.h.orig
+++ ./hw/xfree86/common/compiler.h
@@ -721,7 +721,7 @@
                          :"r"(val), "r"(addr), "i"(ASI_PL));
 }

-#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
+#elif defined(__mips__) || (defined(__arm32__) && !defined(__GLIBC__))
 #if defined(__arm32__) || defined(__mips64)
 #define PORT_SIZE long
 #else
@@ -996,7 +996,7 @@
     return xf86ReadMmio32Le((void *) ioBase, port);
 }

-#elif defined(__arm__) && defined(__linux__)
+#elif defined(__arm__) && defined(__GLIBC__)

 /* for Linux on ARM, we use the LIBC inx/outx routines */
 /* note that the appropriate setup via "ioperm" needs to be done */


code:
--- yajl-2.0.4.org/CMakeLists.txt	2013-10-27 04:19:27.952178366 +0000
+++ yajl-2.0.4/CMakeLists.txt	2013-10-27 04:19:44.413178587 +0000
@@ -64,7 +64,6 @@

 ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(test)
 ADD_SUBDIRECTORY(reformatter)
 ADD_SUBDIRECTORY(verify)
 ADD_SUBDIRECTORY(example)
@@ -72,8 +71,3 @@

 INCLUDE(YAJLDoc.cmake)

-# a test target
-ADD_CUSTOM_TARGET(test
-                  ./run_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/test/yajl_test
-                  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
-


code:
--- znc-1.4.org/src/Csocket.cpp
+++ znc-1.4/src/Csocket.cpp
@@ -47,6 +47,7 @@
 #include <stdio.h>
 #include <openssl/conf.h>
 #include <openssl/engine.h>
+#include <openssl/comp.h>
 #endif /* HAVE_LIBSSL */


code:
--- a/include/znc/Csocket.h
+++ b/include/znc/Csocket.h
@@ -45,7 +45,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/time.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/file.h>

 #ifndef _WIN32
--- a/include/znc/FileUtils.h
+++ b/include/znc/FileUtils.h
@@ -22,7 +22,7 @@
 #include <dirent.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <vector>
--- a/src/Csocket.cpp
+++ b/src/Csocket.cpp
@@ -613,12 +613,8 @@
 	return( strerror( iErrno ) );
 #else
 	memset( pszBuff, '\0', uBuffLen );
-#if !defined( _GNU_SOURCE )
 	if( strerror_r( iErrno, pszBuff, uBuffLen ) == 0 )
 		return( pszBuff );
-#else
-	return( strerror_r( iErrno, pszBuff, uBuffLen ) );
-#endif /* (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined( _GNU_SOURCE ) */
 #endif /* defined( sgi ) || defined(__sun) || defined(_WIN32) || (defined(__NetBSD_Version__) && __NetBSD_Version__ < 4000000000) */
 	return( CS_UNKNOWN_ERROR );
 }


code:
# Sabotage Linux

This is Sabotage, an experimental distribution based on musl libc and busybox.

Currently Sabotage supports i386, x86_64, MIPS, PowerPC32 and ARM(v4t+).
ARM hardfloat (hf) is supported via crosscompilation of stage1,
since it requires a recent GCC which we can't easily bootstrap in stage0 due
to library dependencies of GCC introduced with 4.3.

The preferred way to build Sabotage is using a native Linux environment for
the desired architecture.
It is now also possible to cross-compile large parts of it.
As cross-compiling is hairy and support for it is quite new, expect breakage.
Native builds are well tested and considered stable.

## Requirements:

* ~4G free disk space.
* A Linux 3.8+ host kernel with USER_NS support, for entering native chroots
  without root.
* A Linux 2.6+ host kernel can be used, but requires root access.
* A `gcc` 4.x tool chain.
* `git`, to check out the repository.
* `bzip2`, `sed`, `patch`, `tar`, `wc`, `wget` and `xz` are needed to run the
  build script.
* Lots of time and a fair bit of Linux knowledge.

## Cross-Compile Requirements:

* `musl-cross` for your target arch.
* `butch` compiled and installed for the build host in $PATH.
* `pkgconf` symlinked as pkg-config in $PATH, before other pkg-config versions.
* Packages may have a `deps.host` section listing further packages required on
  the host.

The only tested cross-compile setup is a Sabotage host that has the same
packages installed as the ones you wish to compile.

This system has built *natively* on Debian 6 & 7, Fedora 18 & 21, Ubuntu 14.04,
openSUSE 13.2, Alpine 3.1.2 and Void Linux.

## Obtaining Sabotage

You can bootstrap your own build from the scripts at:

https://github.com/sabotage-linux/sabotage

Download ready-to-boot QEMU/VirtualBox disk images that you may also extract
the rootfs from:

* DE : http://ftp.barfooze.de/pub/sabotage/
* GR : http://foss.aueb.gr/mirrors/linux/sabotage/
* UK : http://dl.2f30.org/mirrors/sabotage/
* FR : http://mirrors.2f30.org/sabotage/

The DE mirror is the master from which the other mirrors are periodically
synced.

SHA512 checksums for releases get posted on the mailing lists, archived here:

http://openwall.com/lists/sabotage/

**READ THE COOKBOOK FIRST BEFORE POSTING**.

## Native Build Instructions:

**DO NOT RUN SCRIPTS YOU HAVE NOT READ**.

	$ cp KEEP/config.stage0 config
	$ vi config

Set the `SABOTAGE_BUILDDIR`, `A`, and `MAKE_THREADS` variables.
You may usually ignore the other values.
Both the config file and the COOKBOOK cover the meaning of these variables.

Enable `SUPER` to use the following `./enter-chroot` script without root.

NOTE: It is possible to build an i386 Sabotage from within an existing 32-bit
chroot on a 64-bit system.
The `enter-chroot` script automatically handles this scenario.

	$ ./build-stage0        # ~2min on an AMD FX 8core, 75min on ARM Cortex A8 800Mhz
	$ ./enter-chroot

Once inside the chroot, you may decide between installing `stage1` or `stage2`:

	$ butch install stage1	# Installs core system + build chain
	$ butch install stage2  # Installs stage1 + libressl

If `libressl` is present, `wget` will be HTTPS-enabled. This will allow butch to
download packages via HTTPS protocol.

Older pre-3.8 Linux systems will not support the rootless chroot approach used
by `./enter-chroot`.
Disable `SUPER` and run `./enter-chroot` as root if you encounter an issue.

Once completed, you may install optional packages:

	$ butch install core    # installs a sane subset for a developer base system
	$ butch install xorg    # install everything needed for xfbdev
	$ butch install pkg     # things such as file, git, gdb ...
	$ butch install world   # almost everything

You may list available packages by using `ls /src/pkg`.

If you wish to build the default kernel:

	$ butch install kernel

Run `butch` and look at the usage information for further options.

`butch` uses build templates that allow for a high level of customization.
`KEEP/butch_template_configure_cached.txt` is the base template used by Sabotage.
It provides a tuned `config.cache` for faster configure runs.
It also installs packages into `/opt`, creates file lists, etc.

## Cross-Compile Instructions:

	$ cp KEEP/config.cross .
	$ vi config.cross # set your vars
	$ A=microblaze CONFIG=./config.cross utils/setup-rootfs.sh # initialize rootfs
	$ A=microblaze CONFIG=./config.cross butch install nano # start building stuff

Much like a native build, a config file is copied and edited.
`utils/setup-rootfs.sh` is run instead of `./build-stage0` to construct the
new root.
Finally, we use `butch` to start cross-compiling and installing packages into it.

## After Compiling

When finished compiling, exit the chroot and either:

* Use the rootfs directly, by copying it to some disk.
* Use `utils/run-emulator.sh` to boot the system in QEMU.
  Running in QEMU has poor HDD performance, as the FS is mounted via 9P protocol.
  It's not recommended for building packages, but it's practical for testing.
* Use `utils/write-hd-image.sh` to create an image file.
  The image file boots in QEMU.
  To convert it into VirtualBox format use `VBoxManage convertfromraw`.

## RUNNING SABOTAGE FOR THE FIRST TIME

The default root password is "sabotage".

Start the sshd service using `sv u sshd`, which will create keys on first use.
To make the service autostart on boot, remove `/etc/service/sshd/down`.

Edit `/etc/rc.local` for other things to autostart, such as network
configuration, DHCP, console keymapping...

If you have X installed, edit the example `/bin/X` for the correct evdev
settings, then run `startx`.
Check `/etc/xinitrc` for X11 keyboard configuration.

## NOTES TO CONTRIBUTORS

Please use unified `diff` format (`diff -u`) for patches.

### Use Git

It is necessary that you create `git` branches for your work.
This allows your changes to be checked out and rebased as needed, without merge
conflicts.

Do not commit more than one change/package in a single commit.
Use a meaningful commit message that mentions the package name.
Please follow the style and conventions of your fellow contributors.

### Use Templates

When creating packages, try starting from the autoconf template:

	$ cp KEEP/pkg_skel/autoconf pkg/my-new-pkg

There are other convenient templates located in `KEEP/pkg_skel/` as well.

Try running `utils/dlinfo.sh`:

	$ utils/dlinfo.sh http://1.2.3.4/my_new_pkg.tar.xz

`utils/dlinfo.sh` will return the file stats and sha512sum for easy copying
and pasting into your new package.

### Package Name Guideline

Package names may consist of the following characters: a-z 0-9 -
i.e: lower-case and numbers only, dash to separate.

Perl5 modules from cpan must be named as perl5-Module-Submodule,
for examples perl5-XML-Parser. Uppercase should be applied exactly
as in the module name.

Python modules must be named as python-module.
example: python-setuptools

Following this convention makes it possible to use package names in
regexes or URLs without having to escape or encode/decode them.

### Package Sources and Philosophy

Sabotage is designed with limited internet availability in mind.
After downloading packages in advance, when you have internet, you may build
later offline at your leisure.

Space considerations are a top issue, both bandwidth and HD image size.
Sabotage ISOs and images ship with all tarballs to fulfill the GPL.
ALWAYS USE a TAR.XZ (preferred) or TAR.BZ2 download URL.

Please do not use FTP mirrors. FTP is a broken, ancient protocol.

Downloads from git or other source repositories are not desired.
This would add an internet connection as a build-time dependency.

## THANKS

Sabotage originally was a distribution curated by chris2, based around shell
scripts and Plan 9's mk.
This was possible through the help and inspiration of
dalias, niklata, garbeam, pikhq, xmw, gaf and Arch Linux.

## CONTACT

There is a mailing list: sabotage@lists.openwall.com

Email sabotage-subscribe@lists.openwall.com and follow its instructions to
subscribe.

Archives available: http://openwall.com/lists/sabotage/

You may also /join #sabotage or #musl on irc.freenode.net for real time help.

**READ THE COOKBOOK FIRST BEFORE POSTING**.

## DONATIONS

Bitcoins are welcome:

1HXhSKSyBUGAAga29WbpTkKGpruQq9J8Bb


code:
#!/bin/sh
set -e

### test and create prerequisites
export H="$PWD"
. ./config
if [ ! -r "$H"/config ] ; then
	printf -- "error: missing config! copy %s to %s and edit appropriately\n" "$K"/config.stage0 "$H"/config
	exit 1
fi
for i in sed wget patch bzip2 tar wc xz make ; do
	if ! type "$i" >/dev/null 2>&1 ; then
		echo "error: prerequisite $i not found in PATH" >&2
		exit 1
	fi
done
[ -z "$CC" ] && CC=gcc
tmpc=/tmp/tmp$$.c
cat <<- EOF > "$tmpc"
	#include <stdlib.h>
	int main () { exit(0); }
	EOF
if ! "$CC" -static "$tmpc" -o "$tmpc".out ; then
	rm -f "$tmpc"
	echo "error: could not create static binaries (install glibc-static if on fedora or suse?)" >&2
	exit 1
fi
rm -f "$tmpc" "$tmpc".out
mkdir -p "$C"

### initialize chroot, if missing
if [ ! -d "$R"/bin ] ; then
	echo "$(date +'%F %T') initializing root system"

	. "$H"/utils/setup-rootfs.sh

	ln -s /proc/mounts "$R"/etc/mtab

	"$H"/utils/update-chroot.sh

	# on ARM, gcc 3.4.6 is not sufficient to build for EABI
	[ "$A" = "arm" ] && cat <<- EOF > "$S"/pkg/stage0-gcc
		[deps]
		gcc424
		EOF
fi

### install stage0, if missing. note the space in "stage0 "
if ! grep -q "stage0 " "$R"/var/lib/butch.db 2>/dev/null ; then
	echo "$(date +'%F %T') installing stage0"

	CONFIG="$H"/config BUTCHDB="$R"/var/lib/butch.db DEPS=build:stage0 \
	   "$K"/bin/butch install stage0

	echo "export A=$A" > "$R"/src/config
	cat "$K"/config.stage1 >> "$R"/src/config
	[ -z "$MAKE_THREADS" ] || sed -i "s@MAKE_THREADS=1@MAKE_THREADS=$MAKE_THREADS@" "$R"/src/config
fi