aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/patches-0.9.33.2/.svn/text-base
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /toolchain/uClibc/patches-0.9.33.2/.svn/text-base
downloadtrunk-36060-master.tar.gz
trunk-36060-master.tar.bz2
trunk-36060-master.zip
Diffstat (limited to 'toolchain/uClibc/patches-0.9.33.2/.svn/text-base')
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/010-backport_sscanf_alloc.patch.svn-base184
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/011-dlsym_rtld_next_fix.patch.svn-base26
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/110-compat_macros.patch.svn-base51
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/120-adjtimex.patch.svn-base14
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/131-inet-fix-__read_etc_hosts_r-segfault.patch.svn-base10
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/132-inet_fix_res_init.patch.svn-base15
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/140-avr32_atomic_fix.patch.svn-base10
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/170-math_finite.patch.svn-base23
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/180-pthread_cleanup_fix.patch.svn-base45
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/190-nptl_use_arch_default_stack_limit.patch.svn-base13
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/200-no_forced_unwind.patch.svn-base10
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/350-use-fputs_unlocked.patch.svn-base19
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/410-llvm_workaround.patch.svn-base11
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/450-powerpc_copysignl.patch.svn-base103
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/480-powerpc_rel24_support.patch.svn-base26
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/500-eventfd.patch.svn-base59
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/960-remove_eabi_oabi_selection.patch.svn-base32
-rw-r--r--toolchain/uClibc/patches-0.9.33.2/.svn/text-base/970-add___kernel_long_and___kernel_ulong.patch.svn-base366
18 files changed, 1017 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/010-backport_sscanf_alloc.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/010-backport_sscanf_alloc.patch.svn-base
new file mode 100644
index 0000000..f5f3cc4
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/010-backport_sscanf_alloc.patch.svn-base
@@ -0,0 +1,184 @@
+From 8cfb43de636faa401634340d1a18404844f9ba5a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 6 May 2012 03:50:44 -0400
+Subject: [PATCH] stdio: implement assignment-allocation "m" character
+
+The latest POSIX spec introduces a "m" character to allocate buffers for
+the user when using scanf type functions. This is like the old glibc "a"
+flag, but now standardized. With packages starting to use these, we need
+to implement it.
+
+for example:
+ char *s;
+ sscanf("foo", "%ms", &s);
+ printf("%s\n", s);
+ free(s);
+This will automatically allocate storage for "s", read in "foo" to it,
+and then display it.
+
+I'm not terribly familiar with the stdio layer, so this could be wrong.
+But it seems to work for me.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+ extra/Configs/Config.in | 13 ----------
+ libc/stdio/_scanf.c | 68 ++++++++++++++++++++++++++++---------------------
+ 2 files changed, 39 insertions(+), 42 deletions(-)
+
+--- a/extra/Configs/Config.in
++++ b/extra/Configs/Config.in
+@@ -1597,19 +1597,6 @@ config UCLIBC_PRINTF_SCANF_POSITIONAL_AR
+
+ Most people will answer 9.
+
+-
+-config UCLIBC_HAS_SCANF_GLIBC_A_FLAG
+- bool "Support glibc's 'a' flag for scanf string conversions (not implemented)"
+- help
+- NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!!
+- NOTE!!! Conflicts with an ANSI/ISO C99 scanf flag!! NOTE!!!
+-
+- Answer Y to enable support for glibc's 'a' flag for the scanf string
+- conversions '%s', '%[', '%ls', '%l[', and '%S'. This is used to
+- auto-allocate sufficient memory to hold the data retrieved.
+-
+- Most people will answer N.
+-
+ choice
+ prompt "Stdio buffer size"
+ default UCLIBC_HAS_STDIO_BUFSIZ_4096
+--- a/libc/stdio/_scanf.c
++++ b/libc/stdio/_scanf.c
+@@ -77,14 +77,6 @@
+ #include <bits/uClibc_fpmax.h>
+ #endif /* __UCLIBC_HAS_FLOATS__ */
+
+-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
+-#ifdef L_vfscanf
+-/* only emit this once */
+-#warning Forcing undef of __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ until implemented!
+-#endif
+-#undef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
+-#endif
+-
+ #undef __STDIO_HAS_VSSCANF
+ #if defined(__STDIO_BUFFERS) || !defined(__UCLIBC_HAS_WCHAR__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
+ #define __STDIO_HAS_VSSCANF 1
+@@ -433,8 +425,9 @@ libc_hidden_def(vswscanf)
+
+
+ /* float layout 0123456789012345678901 repeat n for "l[" */
+-#define SPEC_CHARS "npxXoudifFeEgGaACSncs["
+-/* npxXoudif eEgG CS cs[ */
++#define SPEC_CHARS "npxXoudifFeEgGaACSnmcs["
++/* npxXoudif eEgG CS cs[ */
++/* NOTE: the 'm' flag must come before any convs that support it */
+
+ /* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET
+ * must immediately precede CONV_c. */
+@@ -444,7 +437,7 @@ enum {
+ CONV_p,
+ CONV_x, CONV_X, CONV_o, CONV_u, CONV_d, CONV_i,
+ CONV_f, CONV_F, CONV_e, CONV_E, CONV_g, CONV_G, CONV_a, CONV_A,
+- CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_c, CONV_s, CONV_leftbracket,
++ CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_m, CONV_c, CONV_s, CONV_leftbracket,
+ CONV_percent, CONV_whitespace /* not in SPEC_* and no flags */
+ };
+
+@@ -474,7 +467,7 @@ enum {
+ FLAG_SURPRESS = 0x10, /* MUST BE 1ST!! See DO_FLAGS. */
+ FLAG_THOUSANDS = 0x20,
+ FLAG_I18N = 0x40, /* only works for d, i, u */
+- FLAG_MALLOC = 0x80, /* only works for s, S, and [ (and l[)*/
++ FLAG_MALLOC = 0x80, /* only works for c, s, S, and [ (and l[)*/
+ };
+
+
+@@ -491,7 +484,7 @@ enum {
+ /* fFeEgGaA */ (0x0c|FLAG_SURPRESS|FLAG_THOUSANDS|FLAG_I18N), \
+ /* C */ ( 0|FLAG_SURPRESS), \
+ /* S and l[ */ ( 0|FLAG_SURPRESS|FLAG_MALLOC), \
+- /* c */ (0x04|FLAG_SURPRESS), \
++ /* c */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \
+ /* s and [ */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \
+ }
+
+@@ -904,17 +897,17 @@ int attribute_hidden __psfs_parse_spec(r
+ if (*psfs->fmt == *p) {
+ int p_m_spec_chars = p - spec_chars;
+
+-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
+-#error implement gnu a flag
+- if ((*p == 'a')
+- && ((psfs->fmt[1] == '[') || ((psfs->fmt[1]|0x20) == 's'))
+- ) { /* Assumes ascii for 's' and 'S' test. */
+- psfs->flags |= FLAG_MALLOC;
++ if (*p == 'm' &&
++ (psfs->fmt[1] == '[' || psfs->fmt[1] == 'c' ||
++ /* Assumes ascii for 's' and 'S' test. */
++ (psfs->fmt[1] | 0x20) == 's'))
++ {
++ if (psfs->store)
++ psfs->flags |= FLAG_MALLOC;
+ ++psfs->fmt;
+ ++p;
+- continue; /* The related conversions follow 'a'. */
++ continue; /* The related conversions follow 'm'. */
+ }
+-#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */
+
+ for (p = spec_ranges; p_m_spec_chars > *p ; ++p) {}
+ if (((psfs->dataargtype >> 8) | psfs->flags)
+@@ -1265,12 +1258,6 @@ int VFSCANF (FILE *__restrict fp, const
+ while (*wf && __isascii(*wf) && (b < buf + sizeof(buf) - 1)) {
+ *b++ = *wf++;
+ }
+-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
+-#error this is wrong... we need to ched in __psfs_parse_spec instead since this checks last char in buffer and conversion my have stopped before it.
+- if ((*b == 'a') && ((*wf == '[') || ((*wf|0x20) == 's'))) {
+- goto DONE; /* Spec was excessively long. */
+- }
+-#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */
+ *b = 0;
+ if (b == buf) { /* Bad conversion specifier! */
+ goto DONE;
+@@ -1390,13 +1377,36 @@ int VFSCANF (FILE *__restrict fp, const
+ }
+
+ if (psfs.conv_num == CONV_s) {
++ /* We might have to handle the allocation ourselves */
++ int len;
++ /* With 'm', we actually got a pointer to a pointer */
++ unsigned char **ptr = (void *)b;
++
++ i = 0;
++ if (psfs.flags & FLAG_MALLOC) {
++ len = 0;
++ b = NULL;
++ } else
++ len = -1;
++
+ /* Yes, believe it or not, a %s conversion can store nuls. */
+ while ((__scan_getc(&sc) >= 0) && !isspace(sc.cc)) {
+ zero_conversions = 0;
+- *b = sc.cc;
+- b += psfs.store;
++ if (i == len) {
++ /* Pick a size that won't trigger a lot of
++ * mallocs early on ... */
++ len += 256;
++ b = realloc(b, len + 1);
++ }
++ b[i] = sc.cc;
++ i += psfs.store;
+ fail = 0;
+ }
++
++ if (psfs.flags & FLAG_MALLOC)
++ *ptr = b;
++ /* The code below takes care of terminating NUL */
++ b += i;
+ } else {
+ #ifdef __UCLIBC_HAS_WCHAR__
+ assert((psfs.conv_num == CONV_LEFTBRACKET) || \
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/011-dlsym_rtld_next_fix.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/011-dlsym_rtld_next_fix.patch.svn-base
new file mode 100644
index 0000000..5c90ca5
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/011-dlsym_rtld_next_fix.patch.svn-base
@@ -0,0 +1,26 @@
+diff -urN uClibc-0.9.33.2/ldso/libdl/libdl.c uClibc-0.9.33.2.new/ldso/libdl/libdl.c
+--- uClibc-0.9.33.2/ldso/libdl/libdl.c 2012-05-15 09:20:09.000000000 +0200
++++ uClibc-0.9.33.2.new/ldso/libdl/libdl.c 2012-11-10 18:34:56.673501060 +0100
+@@ -671,7 +671,7 @@
+ {
+ struct elf_resolve *tpnt, *tfrom;
+ struct dyn_elf *handle;
+- ElfW(Addr) from;
++ ElfW(Addr) from = 0;
+ struct dyn_elf *rpnt;
+ void *ret;
+ struct symbol_ref sym_ref = { NULL, NULL };
+@@ -729,7 +729,12 @@
+ tpnt = NULL;
+ if (handle == _dl_symbol_tables)
+ tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */
+- ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
++ do {
++ ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
++ if (ret != NULL)
++ break;
++ handle = handle->next;
++ } while (from && handle);
+
+ #if defined(USE_TLS) && USE_TLS && defined SHARED
+ if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) {
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/110-compat_macros.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/110-compat_macros.patch.svn-base
new file mode 100644
index 0000000..a7538b1
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/110-compat_macros.patch.svn-base
@@ -0,0 +1,51 @@
+--- a/include/string.h
++++ b/include/string.h
+@@ -355,18 +355,40 @@ extern char *index (__const char *__s, i
+ /* Find the last occurrence of C in S (same as strrchr). */
+ extern char *rindex (__const char *__s, int __c)
+ __THROW __attribute_pure__ __nonnull ((1));
+-# else
+-# ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
++# elif defined(__UCLIBC_SUSV3_LEGACY_MACROS__) && !defined(_STRINGS_H)
+ /* bcopy/bzero/bcmp/index/rindex are marked LEGACY in SuSv3.
+ * They are replaced as proposed by SuSv3. Don't sync this part
+ * with glibc and keep it in sync with strings.h. */
+
+-# define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0)
+-# define bzero(s,n) (memset((s), '\0', (n)), (void) 0)
+-# define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n))
+-# define index(s,c) strchr((s), (c))
+-# define rindex(s,c) strrchr((s), (c))
+-# endif
++/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
++static __inline__ void bcopy (__const void *__src, void *__dest, size_t __n)
++{
++ memmove(__dest, __src, __n);
++}
++
++/* Set N bytes of S to 0. */
++static __inline__ void bzero (void *__s, size_t __n)
++{
++ memset(__s, 0, __n);
++}
++
++/* Compare N bytes of S1 and S2 (same as memcmp). */
++static __inline__ int bcmp (__const void *__s1, __const void *__s2, size_t __n)
++{
++ return memcmp(__s1, __s2, __n);
++}
++
++/* Find the first occurrence of C in S (same as strchr). */
++static __inline__ char *index (__const char *__s, int __c)
++{
++ return strchr(__s, __c);
++}
++
++/* Find the last occurrence of C in S (same as strrchr). */
++static __inline__ char *rindex (__const char *__s, int __c)
++{
++ return strrchr(__s, __c);
++}
+ # endif
+
+ /* Return the position of the first bit set in I, or 0 if none are set.
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/120-adjtimex.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/120-adjtimex.patch.svn-base
new file mode 100644
index 0000000..dcf9c9b
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/120-adjtimex.patch.svn-base
@@ -0,0 +1,14 @@
+--- a/include/sys/timex.h
++++ b/include/sys/timex.h
+@@ -116,9 +116,8 @@ struct timex
+
+ __BEGIN_DECLS
+
+-#if 0
+-extern int __adjtimex (struct timex *__ntx) __THROW;
+-#endif
++#undef __adjtimex
++#define __adjtimex adjtimex
+ extern int adjtimex (struct timex *__ntx) __THROW;
+ libc_hidden_proto(adjtimex)
+
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/131-inet-fix-__read_etc_hosts_r-segfault.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/131-inet-fix-__read_etc_hosts_r-segfault.patch.svn-base
new file mode 100644
index 0000000..74b6857
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/131-inet-fix-__read_etc_hosts_r-segfault.patch.svn-base
@@ -0,0 +1,10 @@
+--- a/libc/inet/resolv.c
++++ b/libc/inet/resolv.c
+@@ -1634,6 +1634,7 @@ int attribute_hidden __read_etc_hosts_r(
+ * struct in[6]_addr
+ * char line_buffer[BUFSZ+];
+ */
++ memset(buf, 0, buflen);
+ parser->data = buf;
+ parser->data_len = aliaslen;
+ parser->line_len = buflen - aliaslen;
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/132-inet_fix_res_init.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/132-inet_fix_res_init.patch.svn-base
new file mode 100644
index 0000000..c935821
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/132-inet_fix_res_init.patch.svn-base
@@ -0,0 +1,15 @@
+--- a/libc/inet/resolv.c
++++ b/libc/inet/resolv.c
+@@ -3654,11 +3654,11 @@ res_init(void)
+ */
+ if (!_res.id)
+ _res.id = res_randomid();
+- __res_sync = res_sync_func;
+
+ __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
+
+ __res_vinit(&_res, 1);
++ __res_sync = res_sync_func;
+
+ return 0;
+ }
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/140-avr32_atomic_fix.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/140-avr32_atomic_fix.patch.svn-base
new file mode 100644
index 0000000..5e5460a
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/140-avr32_atomic_fix.patch.svn-base
@@ -0,0 +1,10 @@
+--- a/libc/sysdeps/linux/avr32/bits/atomic.h
++++ b/libc/sysdeps/linux/avr32/bits/atomic.h
+@@ -28,6 +28,7 @@ typedef uintmax_t uatomic_max_t;
+
+ #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ \
++ __uint32_t __result; \
+ __typeof__(*(mem)) __prev; \
+ __asm__ __volatile__( \
+ "/* __arch_compare_and_exchange_val_32_acq */\n" \
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/170-math_finite.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/170-math_finite.patch.svn-base
new file mode 100644
index 0000000..b0ae333
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/170-math_finite.patch.svn-base
@@ -0,0 +1,23 @@
+--- a/include/math.h
++++ b/include/math.h
+@@ -195,7 +195,7 @@ extern int signgam;
+
+
+ /* ISO C99 defines some generic macros which work on any data type. */
+-#ifdef __USE_ISOC99
++#if defined(__USE_ISOC99) || defined(__USE_BSD)
+
+ /* Get the architecture specific values describing the floating-point
+ evaluation. The following symbols will get defined:
+@@ -315,6 +315,11 @@ enum
+
+ #endif /* Use ISO C99. */
+
++/* BSD compat */
++#define finite(x) __finite(x)
++#define finitef(x) __finitef(x)
++#define finitel(x) __finitel(x)
++
+ #ifdef __USE_MISC
+ /* Support for various different standard error handling behaviors. */
+ typedef enum
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/180-pthread_cleanup_fix.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/180-pthread_cleanup_fix.patch.svn-base
new file mode 100644
index 0000000..ae36018
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/180-pthread_cleanup_fix.patch.svn-base
@@ -0,0 +1,45 @@
+--- a/libpthread/nptl/cleanup_defer_compat.c
++++ b/libpthread/nptl/cleanup_defer_compat.c
+@@ -22,7 +22,7 @@
+
+ void
+ attribute_protected
+-_pthread_cleanup_push_defer (
++__pthread_cleanup_push_defer (
+ struct _pthread_cleanup_buffer *buffer,
+ void (*routine) (void *),
+ void *arg)
+@@ -57,12 +57,12 @@ _pthread_cleanup_push_defer (
+
+ THREAD_SETMEM (self, cleanup, buffer);
+ }
+-strong_alias (_pthread_cleanup_push_defer, __pthread_cleanup_push_defer)
++strong_alias (__pthread_cleanup_push_defer, _pthread_cleanup_push_defer)
+
+
+ void
+ attribute_protected
+-_pthread_cleanup_pop_restore (
++__pthread_cleanup_pop_restore (
+ struct _pthread_cleanup_buffer *buffer,
+ int execute)
+ {
+@@ -97,4 +97,4 @@ _pthread_cleanup_pop_restore (
+ if (execute)
+ buffer->__routine (buffer->__arg);
+ }
+-strong_alias (_pthread_cleanup_pop_restore, __pthread_cleanup_pop_restore)
++strong_alias (__pthread_cleanup_pop_restore, _pthread_cleanup_pop_restore)
+--- a/libpthread/nptl/init.c
++++ b/libpthread/nptl/init.c
+@@ -112,8 +112,8 @@ static const struct pthread_functions pt
+ .ptr___pthread_key_create = __pthread_key_create_internal,
+ .ptr___pthread_getspecific = __pthread_getspecific_internal,
+ .ptr___pthread_setspecific = __pthread_setspecific_internal,
+- .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer,
+- .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore,
++ .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
++ .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
+ .ptr_nthreads = &__nptl_nthreads,
+ .ptr___pthread_unwind = &__pthread_unwind,
+ .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/190-nptl_use_arch_default_stack_limit.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/190-nptl_use_arch_default_stack_limit.patch.svn-base
new file mode 100644
index 0000000..b7f5c82
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/190-nptl_use_arch_default_stack_limit.patch.svn-base
@@ -0,0 +1,13 @@
+--- a/libpthread/nptl/init.c
++++ b/libpthread/nptl/init.c
+@@ -402,6 +402,10 @@ __pthread_initialize_minimal_internal (v
+ Use the minimal size acceptable. */
+ limit.rlim_cur = PTHREAD_STACK_MIN;
+
++ /* Do not exceed architecture specific default */
++ if (limit.rlim_cur > ARCH_STACK_DEFAULT_SIZE)
++ limit.rlim_cur = ARCH_STACK_DEFAULT_SIZE;
++
+ /* Make sure it meets the minimum size that allocate_stack
+ (allocatestack.c) will demand, which depends on the page size. */
+ const uintptr_t pagesz = sysconf (_SC_PAGESIZE);
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/200-no_forced_unwind.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/200-no_forced_unwind.patch.svn-base
new file mode 100644
index 0000000..d6869e2
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/200-no_forced_unwind.patch.svn-base
@@ -0,0 +1,10 @@
+--- a/Rules.mak
++++ b/Rules.mak
+@@ -707,7 +707,6 @@ endif
+ ifeq ($(UCLIBC_HAS_THREADS),y)
+ ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+ PTNAME := nptl
+- CFLAGS += -DHAVE_FORCED_UNWIND
+ else
+ ifeq ($(LINUXTHREADS_OLD),y)
+ PTNAME := linuxthreads.old
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/350-use-fputs_unlocked.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/350-use-fputs_unlocked.patch.svn-base
new file mode 100644
index 0000000..58b03ec
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/350-use-fputs_unlocked.patch.svn-base
@@ -0,0 +1,19 @@
+commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c
+Author: Mirko Vogt <dev@nanl.de>
+Date: Tue May 24 14:36:42 2011 +0200
+
+ use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)'
+
+ this eliminates a source of reproduceable freezes
+
+--- a/libc/stdio/_vfprintf.c
++++ b/libc/stdio/_vfprintf.c
+@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, i
+ #define STRLEN wcslen
+ #define _PPFS_init _ppwfs_init
+ /* Pulls in fseek: */
+-#define OUTPUT(F,S) fputws(S,F)
++#define OUTPUT(F,S) fputws_unlocked(S,F)
+ /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */
+ #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream)
+ #define FP_OUT _fp_out_wide
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/410-llvm_workaround.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/410-llvm_workaround.patch.svn-base
new file mode 100644
index 0000000..7ae3943
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/410-llvm_workaround.patch.svn-base
@@ -0,0 +1,11 @@
+--- a/libc/stdio/_stdio.c
++++ b/libc/stdio/_stdio.c
+@@ -124,7 +124,7 @@ static FILE _stdio_streams[] = {
+ __FLAG_NBF|__FLAG_WRITEONLY, \
+ 2, \
+ NULL, \
+- NULL, \
++ 0, \
+ 0 )
+ };
+
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/450-powerpc_copysignl.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/450-powerpc_copysignl.patch.svn-base
new file mode 100644
index 0000000..ad8d682
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/450-powerpc_copysignl.patch.svn-base
@@ -0,0 +1,103 @@
+--- a/libc/sysdeps/linux/powerpc/Makefile.arch
++++ b/libc/sysdeps/linux/powerpc/Makefile.arch
+@@ -5,7 +5,7 @@
+ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ #
+
+-CSRC := __syscall_error.c pread_write.c ioctl.c
++CSRC := __syscall_error.c pread_write.c ioctl.c copysignl.c
+
+ ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+ CSRC += posix_fadvise.c posix_fadvise64.c
+--- /dev/null
++++ b/libc/sysdeps/linux/powerpc/copysignl.c
+@@ -0,0 +1,89 @@
++/* s_copysignl.c -- long double version of s_copysign.c.
++ * Conversion to long double by Ulrich Drepper,
++ * Cygnus Support, drepper@cygnus.com.
++ */
++
++/*
++ * ====================================================
++ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
++ *
++ * Developed at SunPro, a Sun Microsystems, Inc. business.
++ * Permission to use, copy, modify, and distribute this
++ * software is freely granted, provided that this notice
++ * is preserved.
++ * ====================================================
++ */
++
++/*
++ * copysignl(long double x, long double y)
++ * copysignl(x,y) returns a value with the magnitude of x and
++ * with the sign bit of y.
++ */
++
++#include <endian.h>
++#include <stdint.h>
++
++#if __FLOAT_WORD_ORDER == BIG_ENDIAN
++
++typedef union
++{
++ long double value;
++ struct
++ {
++ int sign_exponent:16;
++ unsigned int empty:16;
++ uint32_t msw;
++ uint32_t lsw;
++ } parts;
++} ieee_long_double_shape_type;
++
++#endif
++
++#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
++
++typedef union
++{
++ long double value;
++ struct
++ {
++ uint32_t lsw;
++ uint32_t msw;
++ int sign_exponent:16;
++ unsigned int empty:16;
++ } parts;
++} ieee_long_double_shape_type;
++
++#endif
++
++/* Get int from the exponent of a long double. */
++
++#define GET_LDOUBLE_EXP(exp,d) \
++do { \
++ ieee_long_double_shape_type ge_u; \
++ ge_u.value = (d); \
++ (exp) = ge_u.parts.sign_exponent; \
++} while (0)
++
++/* Set exponent of a long double from an int. */
++
++#define SET_LDOUBLE_EXP(d,exp) \
++do { \
++ ieee_long_double_shape_type se_u; \
++ se_u.value = (d); \
++ se_u.parts.sign_exponent = (exp); \
++ (d) = se_u.value; \
++} while (0)
++
++long double copysignl(long double x, long double y);
++libc_hidden_proto(copysignl);
++
++long double copysignl(long double x, long double y)
++{
++ uint32_t es1,es2;
++ GET_LDOUBLE_EXP(es1,x);
++ GET_LDOUBLE_EXP(es2,y);
++ SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
++ return x;
++}
++
++libc_hidden_def(copysignl);
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/480-powerpc_rel24_support.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/480-powerpc_rel24_support.patch.svn-base
new file mode 100644
index 0000000..19c2b2c
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/480-powerpc_rel24_support.patch.svn-base
@@ -0,0 +1,26 @@
+--- a/ldso/ldso/powerpc/elfinterp.c
++++ b/ldso/ldso/powerpc/elfinterp.c
+@@ -297,22 +297,17 @@ _dl_do_reloc (struct elf_resolve *tpnt,s
+ break;
+ #endif
+ case R_PPC_REL24:
+-#if 0
+ {
+ Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
+ if (unlikely(delta<<6>>6 != delta)) {
+ _dl_dprintf(2, "%s: symbol '%s' R_PPC_REL24 is out of range.\n\t"
+ "Compile shared libraries with -fPIC!\n",
+ _dl_progname, symname);
+- _dl_exit(1);
++ return -1;
+ }
+ *reloc_addr = (*reloc_addr & 0xfc000003) | (delta & 0x3fffffc);
+ break;
+ }
+-#else
+- _dl_dprintf(2,"R_PPC_REL24: Compile shared libraries with -fPIC!\n");
+- return -1;
+-#endif
+ case R_PPC_NONE:
+ goto out_nocode; /* No code code modified */
+ default:
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/500-eventfd.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/500-eventfd.patch.svn-base
new file mode 100644
index 0000000..778129e
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/500-eventfd.patch.svn-base
@@ -0,0 +1,59 @@
+From 7810e4f8027b5c4c8ceec6fefec4eb779362ebb5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 10 Jun 2012 16:36:23 +0000
+Subject: eventfd: Implement eventfd2 and fix eventfd
+
+eventfd: evntfd assumes to take two arguments instead it
+should be one evntfd expects two therefore implement both syscalls with
+correct parameters
+
+Thanks Eugene Rudoy for reporting it and also providing the patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+diff --git a/libc/sysdeps/linux/common/eventfd.c b/libc/sysdeps/linux/common/eventfd.c
+index cc3f3f0..96597ab 100644
+--- a/libc/sysdeps/linux/common/eventfd.c
++++ b/libc/sysdeps/linux/common/eventfd.c
+@@ -7,12 +7,24 @@
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
++#include <errno.h>
+ #include <sys/syscall.h>
+ #include <sys/eventfd.h>
+
+ /*
+ * eventfd()
+ */
+-#ifdef __NR_eventfd
+-_syscall2(int, eventfd, int, count, int, flags)
++#if defined __NR_eventfd || defined __NR_eventfd2
++int eventfd (int count, int flags)
++{
++#if defined __NR_eventfd2
++ return INLINE_SYSCALL (eventfd2, 2, count, flags);
++#elif defined __NR_eventfd
++ if (flags != 0) {
++ __set_errno (EINVAL);
++ return -1;
++ }
++ return INLINE_SYSCALL (eventfd, 1, count);
++#endif
++}
+ #endif
+diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
+index 4d1e26c..7af14c1 100644
+--- a/libc/sysdeps/linux/common/stubs.c
++++ b/libc/sysdeps/linux/common/stubs.c
+@@ -93,7 +93,7 @@ make_stub(epoll_ctl)
+ make_stub(epoll_wait)
+ #endif
+
+-#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__
++#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__
+ make_stub(eventfd)
+ #endif
+
+--
+cgit v0.9.0.1-2-gef13
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/960-remove_eabi_oabi_selection.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/960-remove_eabi_oabi_selection.patch.svn-base
new file mode 100644
index 0000000..19ac246
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/960-remove_eabi_oabi_selection.patch.svn-base
@@ -0,0 +1,32 @@
+Rely on the compiler to be properly setup for the default ABI.
+
+When installing-headers, there are two cases:
+- NPTL: no issue, a cross-compiler is already expected
+- LinuxThreads: no issue, EABI/OABI has no impact on installed headers.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
+Cc: Khem Raj <raj.khem@gmail.com>
+Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
+---
+
+--- a/extra/Configs/Config.arm
++++ b/extra/Configs/Config.arm
+@@ -12,17 +12,6 @@ config FORCE_OPTIONS_FOR_ARCH
+ default y
+ select ARCH_ANY_ENDIAN
+
+-config CONFIG_ARM_EABI
+- bool "Build for EABI"
+- help
+- If you say 'y' here, functions and constants required by the
+- ARM EABI will be built into the library. You should say 'y'
+- if your compiler uses the ARM EABI, in which case you will also
+- need a kernel supporting the EABI system call interface.
+-
+- If you say 'n' here, then the library will be built for the
+- old Linux ABI.
+-
+ config COMPILE_IN_THUMB_MODE
+ bool "Build using Thumb mode"
+ select USE_BX
diff --git a/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/970-add___kernel_long_and___kernel_ulong.patch.svn-base b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/970-add___kernel_long_and___kernel_ulong.patch.svn-base
new file mode 100644
index 0000000..04d3ddc
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/.svn/text-base/970-add___kernel_long_and___kernel_ulong.patch.svn-base
@@ -0,0 +1,366 @@
+From 6a76edddaa62ff06f178143b582167734cb55c18 Mon Sep 17 00:00:00 2001
+From: Chris Packham <chris.packham@alliedtelesis.co.nz>
+Date: Mon, 01 Oct 2012 05:12:54 +0000
+Subject: libc/sysdeps: add __kernel_long and __kernel_ulong
+
+Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various
+exported header files were updated to use these new types. Add the
+definitions for __kernel_long_t and __kernel_ulong_t to the relevant
+kernel_types.h headers.
+
+This change was automated with the following scriptlet
+
+ git grep --name-only 'typedef.*__kernel_old_dev_t' \
+ | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\
+ typedef long\t\t__kernel_long_t;\
+ typedef unsigned long\t__kernel_ulong_t;'
+
+Whitespace in arm, avr32, hppa, sparc was then manually fixed up.
+
+Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
+--
+Here's a cleaned up patch which should get the whitespace right. I'm a
+bit iffy about the sparc changes they make sense to me but it's not a
+platform I have access to.
+
+I can break this up per arch or per maintainer if requested.
+
+ libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++
+ libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++
+ libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++
+ libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++
+ libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++
+ 22 files changed, 50 insertions(+)
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h
+index d5574c9..cd59b9d 100644
+--- a/libc/sysdeps/linux/alpha/bits/kernel_types.h
++++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h
+@@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_t;
+ typedef __kernel_uid_t __kernel_uid32_t;
+ typedef __kernel_gid_t __kernel_gid32_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ int val[2];
+diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h
+index 766a306..6b36f32 100644
+--- a/libc/sysdeps/linux/arm/bits/kernel_types.h
++++ b/libc/sysdeps/linux/arm/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef long long __kernel_loff_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ #ifdef __USE_ALL
+diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h
+index f7d8b52..c551d57 100644
+--- a/libc/sysdeps/linux/avr32/bits/kernel_types.h
++++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h
+@@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef unsigned short __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ #ifdef __GNUC__
+ typedef long long __kernel_loff_t;
+diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h
+index d69a875..9fec595 100644
+--- a/libc/sysdeps/linux/bfin/bits/kernel_types.h
++++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef long long __kernel_loff_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ #ifdef __USE_ALL
+diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h
+index 7557309..2c363a8 100644
+--- a/libc/sysdeps/linux/c6x/bits/kernel_types.h
++++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h
+@@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned int __kernel_old_uid_t;
+ typedef unsigned int __kernel_old_gid_t;
+ typedef unsigned int __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef unsigned int __kernel_size_t;
+ typedef int __kernel_ssize_t;
+ typedef int __kernel_ptrdiff_t;
+diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h
+index f122c7f..5d31f7b 100644
+--- a/libc/sysdeps/linux/cris/bits/kernel_types.h
++++ b/libc/sysdeps/linux/cris/bits/kernel_types.h
+@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ #ifdef __GNUC__
+ typedef long long __kernel_loff_t;
+diff --git a/libc/sysdeps/linux/e1/bits/kernel_types.h b/libc/sysdeps/linux/e1/bits/kernel_types.h
+index 8017d85..f55a129 100644
+--- a/libc/sysdeps/linux/e1/bits/kernel_types.h
++++ b/libc/sysdeps/linux/e1/bits/kernel_types.h
+@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ /*
+diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h
+index 0570675..4cfd1bf 100644
+--- a/libc/sysdeps/linux/h8300/bits/kernel_types.h
++++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef long long __kernel_loff_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ #ifdef __USE_ALL
+diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h
+index 4441f9b..6b2e794 100644
+--- a/libc/sysdeps/linux/hppa/bits/kernel_types.h
++++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h
+@@ -45,6 +45,8 @@ typedef long long __kernel_off64_t;
+ typedef unsigned long long __kernel_ino64_t;
+
+ typedef unsigned int __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ #ifdef __USE_ALL
+diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h
+index 9c07c72..59044b8 100644
+--- a/libc/sysdeps/linux/i386/bits/kernel_types.h
++++ b/libc/sysdeps/linux/i386/bits/kernel_types.h
+@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ typedef struct {
+diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h
+index c8ef86d..e31dc65 100644
+--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h
++++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h
+@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t;
+
+ typedef unsigned int __kernel_dev_t;
+ typedef unsigned int __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ #endif /* _ASM_IA64_POSIX_TYPES_H */
+diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h
+index 0a77a8f..176b968 100644
+--- a/libc/sysdeps/linux/m68k/bits/kernel_types.h
++++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef long long __kernel_loff_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ #ifdef __USE_ALL
+diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
+index 2a70575..a9f736b 100644
+--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h
++++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h
+@@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned int __kernel_old_uid_t;
+ typedef unsigned int __kernel_old_gid_t;
+ typedef unsigned int __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ #ifdef __GNUC__
+ typedef long long __kernel_loff_t;
+diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h
+index 9fc3b96..97faeac 100644
+--- a/libc/sysdeps/linux/mips/bits/kernel_types.h
++++ b/libc/sysdeps/linux/mips/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef int __kernel_gid32_t;
+ typedef __kernel_uid_t __kernel_old_uid_t;
+ typedef __kernel_gid_t __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+ #else
+ typedef unsigned int __kernel_dev_t;
+@@ -68,6 +70,8 @@ typedef int __kernel_gid32_t;
+ typedef __kernel_uid_t __kernel_old_uid_t;
+ typedef __kernel_gid_t __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+ #endif
+
+diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h
+index 8b86d79..3c030e7 100644
+--- a/libc/sysdeps/linux/nios2/bits/kernel_types.h
++++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h
+@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef unsigned short __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ typedef struct {
+diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h
+index 3f3b933..1167de2 100644
+--- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h
++++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h
+@@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned int __kernel_old_uid_t;
+ typedef unsigned int __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ #else
+ typedef unsigned int __kernel_dev_t;
+ typedef unsigned int __kernel_ino_t;
+@@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned int __kernel_old_uid_t;
+ typedef unsigned int __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+ #endif
+
+diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h
+index f96e9fa..ac97261 100644
+--- a/libc/sysdeps/linux/sh/bits/kernel_types.h
++++ b/libc/sysdeps/linux/sh/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ typedef struct {
+diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h
+index 671cc83..8cc6c61 100644
+--- a/libc/sysdeps/linux/sh64/bits/kernel_types.h
++++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h
+@@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ typedef struct {
+diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h
+index 0cc4bc2..a10e075 100644
+--- a/libc/sysdeps/linux/sparc/bits/kernel_types.h
++++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h
+@@ -32,6 +32,8 @@ typedef unsigned short __kernel_gid16_t;
+ typedef __kernel_uid_t __kernel_old_uid_t;
+ typedef __kernel_gid_t __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef __kernel_uid_t __kernel_uid32_t;
+ typedef __kernel_gid_t __kernel_gid32_t;
+ typedef int __kernel_suseconds_t;
+@@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+ #endif
+
+diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h
+index 3e851ab..780aa8a 100644
+--- a/libc/sysdeps/linux/v850/bits/kernel_types.h
++++ b/libc/sysdeps/linux/v850/bits/kernel_types.h
+@@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+
+ typedef struct {
+ #ifdef __USE_ALL
+diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h
+index de800d7..0cae08c 100644
+--- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h
++++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h
+@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef __kernel_dev_t __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ typedef struct {
+diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h
+index 44f1075..ed38f2e 100644
+--- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h
++++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h
+@@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t;
+ typedef unsigned short __kernel_old_uid_t;
+ typedef unsigned short __kernel_old_gid_t;
+ typedef unsigned short __kernel_old_dev_t;
++typedef long __kernel_long_t;
++typedef unsigned long __kernel_ulong_t;
+ typedef long long __kernel_loff_t;
+
+ /* Beginning in 2.6 kernels, which is the first version that includes the
+--
+cgit v0.9.0.1-2-gef13