aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32
diff options
context:
space:
mode:
Diffstat (limited to 'main/libc0.9.32')
-rw-r--r--main/libc0.9.32/0001-config-parser-fix-memory-corruption.patch45
-rw-r--r--main/libc0.9.32/0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch73
-rw-r--r--main/libc0.9.32/APKBUILD16
-rw-r--r--main/libc0.9.32/no-posix-spawn.patch24
-rw-r--r--main/libc0.9.32/uclibc-gcc-workaround.patch58
-rw-r--r--main/libc0.9.32/uclibc-lutimes.patch105
6 files changed, 125 insertions, 196 deletions
diff --git a/main/libc0.9.32/0001-config-parser-fix-memory-corruption.patch b/main/libc0.9.32/0001-config-parser-fix-memory-corruption.patch
new file mode 100644
index 0000000000..58acfb4234
--- /dev/null
+++ b/main/libc0.9.32/0001-config-parser-fix-memory-corruption.patch
@@ -0,0 +1,45 @@
+From 80bcb7a4806b27397629cf2e6bcbb7e8a0c5db5b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 6 Aug 2010 11:29:38 +0300
+Subject: [PATCH] config parser: fix memory corruption
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fgets will happily write over allocated area limits. Adjusted the
+buffer size according to how much is already read.
+
+Also increase the maximum default line length, as 80 is slightly
+small. It might be better if bb_get_chunk_with_continuation would
+reallocate the line buffer if it was not user given.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+---
+ libc/misc/internals/parse_config.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libc/misc/internals/parse_config.c b/libc/misc/internals/parse_config.c
+index cbb6ef7..8404d80 100644
+--- a/libc/misc/internals/parse_config.c
++++ b/libc/misc/internals/parse_config.c
+@@ -60,7 +60,7 @@ static off_t bb_get_chunk_with_continuation(parser_t* parsr)
+ char *chp;
+
+ while (1) {
+- if (fgets(parsr->line + pos, parsr->line_len, parsr->fp) == NULL) {
++ if (fgets(parsr->line + pos, parsr->line_len - pos, parsr->fp) == NULL) {
+ memset(parsr->line, 0, parsr->line_len);
+ pos = -1;
+ break;
+@@ -179,7 +179,7 @@ int attribute_hidden FAST_FUNC config_read(parser_t *parser, char ***tokens,
+ again:
+ if (parser->data == NULL) {
+ if (parser->line_len == 0)
+- parser->line_len = 81;
++ parser->line_len = 161;
+ if (parser->data_len == 0)
+ parser->data_len += 1 + ntokens * sizeof(char *);
+ parser->data = realloc(parser->data,
+--
+1.7.0.4
+
diff --git a/main/libc0.9.32/0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch b/main/libc0.9.32/0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch
new file mode 100644
index 0000000000..55edc51c9a
--- /dev/null
+++ b/main/libc0.9.32/0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch
@@ -0,0 +1,73 @@
+From ed8017b08bee868eb5ea11c0b57074875267a3f1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 6 Aug 2010 13:26:25 +0300
+Subject: [PATCH] nptl: fix calling convention for __pthread_mutex_cond_lock
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The assembly versions of pthread_cond_wait calls
+__pthread_mutex_cond_lock and __pthread_mutex_cond_lock_adjust
+using internal calling convention (which differs from default
+calling convention at least on x86). Thus these two functions
+must be defined with internal_function or the call sequence goes
+wrong.
+
+__pthread_mutex_cond_lock resides in
+sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c, but it does
+evil macro definitions and includes pthread_mutex_lock.c, so
+we need to add some extra kludge to pthread_mutex_lock.c to get
+the prototypes correctly.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+---
+ libpthread/nptl/pthreadP.h | 6 ++++--
+ libpthread/nptl/pthread_mutex_lock.c | 7 ++++++-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
+index 85601d4..c45bd11 100644
+--- a/libpthread/nptl/pthreadP.h
++++ b/libpthread/nptl/pthreadP.h
+@@ -414,8 +414,10 @@ extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
+ extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+ extern int __pthread_mutex_lock_internal (pthread_mutex_t *__mutex)
+ attribute_hidden;
+-extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex);
+-extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex);
++extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex)
++ attribute_hidden internal_function;
++extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex)
++ attribute_hidden internal_function;
+ extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
+ extern int __pthread_mutex_unlock_internal (pthread_mutex_t *__mutex)
+ attribute_hidden;
+diff --git a/libpthread/nptl/pthread_mutex_lock.c b/libpthread/nptl/pthread_mutex_lock.c
+index 78b6671..77147db 100644
+--- a/libpthread/nptl/pthread_mutex_lock.c
++++ b/libpthread/nptl/pthread_mutex_lock.c
+@@ -42,7 +42,11 @@ static int __pthread_mutex_lock_full (pthread_mutex_t *mutex)
+
+
+ int
++#ifdef NO_INCR
++attribute_hidden internal_function
++#else
+ attribute_protected
++#endif
+ __pthread_mutex_lock (
+ pthread_mutex_t *mutex)
+ {
+@@ -477,7 +481,8 @@ strong_alias (__pthread_mutex_lock, __pthread_mutex_lock_internal)
+
+
+ #ifdef NO_INCR
+-void attribute_protected
++void
++attribute_hidden internal_function
+ __pthread_mutex_cond_lock_adjust (
+ pthread_mutex_t *mutex)
+ {
+--
+1.7.0.4
+
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
index bb3643117d..d594deeb06 100644
--- a/main/libc0.9.32/APKBUILD
+++ b/main/libc0.9.32/APKBUILD
@@ -1,9 +1,9 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_abiver=0.9.32
pkgname=libc$_abiver
-_gitver=1006300816
+_gitver=1008060645
pkgver=${_abiver}_alpha0_git$_gitver
-pkgrel=2
+pkgrel=0
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -18,10 +18,9 @@ _snapfile="$pkgname-$pkgver.tar.bz2"
source="http://build.alpinelinux.org:8010/distfiles/$_snapfile
compat-stack-guard.patch
uclibc-libm-pic.patch
- uclibc-lutimes.patch
uclibc-resolv-tls.patch
- uclibc-gcc-workaround.patch
- no-posix-spawn.patch
+ 0001-config-parser-fix-memory-corruption.patch
+ 0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch
uclibcconfig.x86
uclibcconfig.i486
"
@@ -98,12 +97,11 @@ utils() {
mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/
}
-md5sums="b7af86c013378888fbd345c47ad21c3a libc0.9.32-0.9.32_alpha0_git1006300816.tar.bz2
+md5sums="2b3935c370307b806320e78883f9b07c libc0.9.32-0.9.32_alpha0_git1008060645.tar.bz2
4d408f72142ce55a0754948cc9cfe447 compat-stack-guard.patch
2f9739a980be24a842c57516155c7885 uclibc-libm-pic.patch
-4d0b8170e6580b47bf5775e65a6f081e uclibc-lutimes.patch
d08831b452acdeaa3037525ee617edab uclibc-resolv-tls.patch
-a88b7f394c86dc7aa606c9e338e35515 uclibc-gcc-workaround.patch
-cb3bfda1619a04218282cd02e3cdb4da no-posix-spawn.patch
+d351ca4e5c33f4a7a60d4f1d754db5c4 0001-config-parser-fix-memory-corruption.patch
+653b046611f98c990f1b52a28968ece3 0001-nptl-fix-calling-convention-for-__pthread_mutex_cond.patch
e2eb3bb00a0fe4d6f3d5b5c56b027bab uclibcconfig.x86
e2eb3bb00a0fe4d6f3d5b5c56b027bab uclibcconfig.i486"
diff --git a/main/libc0.9.32/no-posix-spawn.patch b/main/libc0.9.32/no-posix-spawn.patch
deleted file mode 100644
index c87e564916..0000000000
--- a/main/libc0.9.32/no-posix-spawn.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit 177538eb191c297ac146c843ff68d80ecfe9a87b
-Author: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri Jul 30 07:51:45 2010 +0000
-
- nptl: do not define _POSIX_SPAWN since its not implemented
-
- Building things like vlc checks if _POSIX_SPAWN is defined. Since
- posix_spawn is not implemented we dont define it.
-
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
-index 2550355..6fbdbb7 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
-@@ -143,8 +143,10 @@
- /* We support spinlocks. */
- #define _POSIX_SPIN_LOCKS 200809L
-
-+#if 0
- /* The `spawn' function family is supported. */
- #define _POSIX_SPAWN 200809L
-+#endif
-
- /* We have POSIX timers. */
- #define _POSIX_TIMERS 200809L
diff --git a/main/libc0.9.32/uclibc-gcc-workaround.patch b/main/libc0.9.32/uclibc-gcc-workaround.patch
deleted file mode 100644
index f698ecb79e..0000000000
--- a/main/libc0.9.32/uclibc-gcc-workaround.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-To: uclibc@uclibc.org
-Subject: [PATCH] more workarounds for GCC PR32219
-Date: Wed, 30 Jun 2010 14:46:37 +0300
-Message-Id: <1277898397-10643-1-git-send-email-timo.teras@iki.fi>
-X-Mailer: git-send-email 1.7.0.4
-MIME-Version: 1.0
-X-BeenThere: uclibc@uclibc.org
-X-Mailman-Version: 2.1.12
-Precedence: list
-List-Id: "Discussion and development of uClibc \(the embedded C library\)"
- <uclibc.uclibc.org>
-List-Unsubscribe: <http://lists.busybox.net/mailman/options/uclibc>,
- <mailto:uclibc-request@uclibc.org?subject=unsubscribe>
-List-Archive: <http://lists.busybox.net/pipermail/uclibc>
-List-Post: <mailto:uclibc@uclibc.org>
-List-Help: <mailto:uclibc-request@uclibc.org?subject=help>
-List-Subscribe: <http://lists.busybox.net/mailman/listinfo/uclibc>,
- <mailto:uclibc-request@uclibc.org?subject=subscribe>
-Content-Type: text/plain; charset="utf-8"
-Sender: uclibc-bounces@uclibc.org
-Errors-To: uclibc-bounces@uclibc.org
-
-Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC
-bug when accessing _locale_init and _stdio_init. We need the same
-fix for __errno_location and __h_errno_location otherwise we crash
-calling null with static and non-threaded builds.
-
-Signed-off-by: Timo Teräs <timo.teras@iki.fi>
----
- libc/misc/internals/__uClibc_main.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
-index 44d1620..e8c470b 100644
---- a/libc/misc/internals/__uClibc_main.c
-+++ b/libc/misc/internals/__uClibc_main.c
-@@ -447,11 +447,11 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
- * have resulted in errno being set nonzero, so set it to 0 before
- * we call main.
- */
-- if (likely(__errno_location!=NULL))
-+ if (likely(not_null_ptr(__errno_location)))
- *(__errno_location()) = 0;
-
- /* Set h_errno to 0 as well */
-- if (likely(__h_errno_location!=NULL))
-+ if (likely(not_null_ptr(__h_errno_location)))
- *(__h_errno_location()) = 0;
-
- #if defined HAVE_CLEANUP_JMP_BUF && defined __UCLIBC_HAS_THREADS_NATIVE__
---
-1.7.0.4
-
-_______________________________________________
-uClibc mailing list
-uClibc@uclibc.org
-http://lists.busybox.net/mailman/listinfo/uclibc
diff --git a/main/libc0.9.32/uclibc-lutimes.patch b/main/libc0.9.32/uclibc-lutimes.patch
deleted file mode 100644
index c9ec2aa475..0000000000
--- a/main/libc0.9.32/uclibc-lutimes.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-To: uclibc@uclibc.org
-Subject: [PATCH v2] lutimes: add lutimes support
-Date: Wed, 2 Jun 2010 10:27:16 +0400
-Message-Id: <1275460036-3289-1-git-send-email-vzapolskiy@gmail.com>
-X-Mailer: git-send-email 1.7.0.3
-In-Reply-To: <1275420197-32262-1-git-send-email-vzapolskiy@gmail.com>
-References: <1275420197-32262-1-git-send-email-vzapolskiy@gmail.com>
-Cc: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-X-BeenThere: uclibc@uclibc.org
-X-Mailman-Version: 2.1.12
-Precedence: list
-List-Id: "Discussion and development of uClibc \(the embedded C library\)"
- <uclibc.uclibc.org>
-List-Unsubscribe: <http://lists.busybox.net/mailman/options/uclibc>,
- <mailto:uclibc-request@uclibc.org?subject=unsubscribe>
-List-Archive: <http://lists.busybox.net/pipermail/uclibc>
-List-Post: <mailto:uclibc@uclibc.org>
-List-Help: <mailto:uclibc-request@uclibc.org?subject=help>
-List-Subscribe: <http://lists.busybox.net/mailman/listinfo/uclibc>,
- <mailto:uclibc-request@uclibc.org?subject=subscribe>
-MIME-Version: 1.0
-Content-Type: text/plain; charset="us-ascii"
-Content-Transfer-Encoding: 7bit
-Sender: uclibc-bounces@uclibc.org
-Errors-To: uclibc-bounces@uclibc.org
-
-This patch adds lutimes library call support.
-
-Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
----
- include/sys/time.h | 4 ++-
- libc/sysdeps/linux/common/lutimes.c | 38 +++++++++++++++++++++++++++++++++++
- 2 files changed, 41 insertions(+), 1 deletions(-)
- create mode 100644 libc/sysdeps/linux/common/lutimes.c
-
-diff --git a/include/sys/time.h b/include/sys/time.h
-index 33f5873..952e95a 100644
---- a/include/sys/time.h
-+++ b/include/sys/time.h
-@@ -144,14 +144,16 @@ extern int utimes (__const char *__file, __const struct timeval __tvp[2])
- __THROW __nonnull ((1));
- libc_hidden_proto(utimes)
-
--#if 0 /*def __USE_BSD*/
-+#ifdef __USE_BSD
- /* Same as `utimes', but does not follow symbolic links. */
- extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
- __THROW __nonnull ((1));
-
-+#if 0
- /* Same as `utimes', but takes an open file descriptor instead of a name. */
- extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW;
- #endif
-+#endif
-
- #ifdef __USE_GNU
- /* Change the access time of FILE relative to FD to TVP[0] and the
-diff --git a/libc/sysdeps/linux/common/lutimes.c b/libc/sysdeps/linux/common/lutimes.c
-new file mode 100644
-index 0000000..0b4a8ea
---- /dev/null
-+++ b/libc/sysdeps/linux/common/lutimes.c
-@@ -0,0 +1,38 @@
-+/* vi: set sw=4 ts=4: */
-+/*
-+ * lutimes() implementation for uClibc
-+ *
-+ * Copyright (C) 2010 Vladimir Zapolskiy <vzapolskiy@gmail.com>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <sys/syscall.h>
-+#include <time.h>
-+
-+#ifdef __NR_lutimes
-+_syscall2(int, lutimes, const char *, file, const struct timeval *, tvp)
-+#else
-+#include <sys/time.h>
-+#include <fcntl.h>
-+
-+int lutimes(const char *file, const struct timeval tvp[2])
-+{
-+ struct timespec ts[2];
-+
-+ if (tvp != NULL)
-+ {
-+ if (tvp[0].tv_usec < 0 || tvp[0].tv_usec >= 1000000
-+ || tvp[1].tv_usec < 0 || tvp[1].tv_usec >= 1000000)
-+ {
-+ __set_errno(EINVAL);
-+ return -1;
-+ }
-+
-+ TIMEVAL_TO_TIMESPEC(&tvp[0], &ts[0]);
-+ TIMEVAL_TO_TIMESPEC(&tvp[1], &ts[1]);
-+ }
-+
-+ return utimensat(AT_FDCWD, file, tvp ? ts : NULL, AT_SYMLINK_NOFOLLOW);
-+}
-+#endif
---
-1.7.0.3
-