diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-22 14:33:37 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-22 14:45:01 +0000 |
commit | db5cdbbc449e6893c59f4ad17fc802b6e1a5776d (patch) | |
tree | 2b342e9fc9d1290d6d55a0c1f59cdce9a344a8bf /main | |
parent | a4b6f9e2dfb4858433efd3621f5fb61cb15ab0a5 (diff) | |
download | aports-db5cdbbc449e6893c59f4ad17fc802b6e1a5776d.tar.bz2 aports-db5cdbbc449e6893c59f4ad17fc802b6e1a5776d.tar.xz |
main/uclibc: upgrade to 0.9.30.2
fixes #252
Diffstat (limited to 'main')
-rw-r--r-- | main/uclibc/0001-first-pass-at-implementing-at-funcs.patch | 928 | ||||
-rw-r--r-- | main/uclibc/0001-include-sys-mount.h-define-MNT_DETATCH-and-MNT_EXPIR.patch | 31 | ||||
-rw-r--r-- | main/uclibc/0001-linuxthreads-fixes-from-Will-Newton-will.newton-AT-g.patch | 281 | ||||
-rw-r--r-- | main/uclibc/0002-add-hidden-aliases-for-openat-funcs.patch | 78 | ||||
-rw-r--r-- | main/uclibc/0003-remove-libc_hidden_def-mknodat.patch | 24 | ||||
-rw-r--r-- | main/uclibc/APKBUILD | 27 | ||||
-rw-r--r-- | main/uclibc/ppoll.patch | 59 | ||||
-rw-r--r-- | main/uclibc/uclibc-getaddrinfo-netlink.diff | 23 | ||||
-rw-r--r-- | main/uclibc/uclibc-i386-floating-stacks.diff | 2 |
9 files changed, 6 insertions, 1447 deletions
diff --git a/main/uclibc/0001-first-pass-at-implementing-at-funcs.patch b/main/uclibc/0001-first-pass-at-implementing-at-funcs.patch deleted file mode 100644 index cf46258696..0000000000 --- a/main/uclibc/0001-first-pass-at-implementing-at-funcs.patch +++ /dev/null @@ -1,928 +0,0 @@ -From 69ddd883084998dbeedf1ca9abbb9927cef20be0 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Fri, 24 Jul 2009 13:22:39 +0000 -Subject: [PATCH 1/2] first pass at implementing *at funcs - -Tested basic functionality with coreutils and things seem to work. At -least gives us a basis to jump from. - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> - -Conflicts: - - include/features.h - include/sys/stat.h - libc/misc/dirent/opendir.c ---- - include/dirent.h | 10 +++++- - include/fcntl.h | 15 +++++--- - include/features.h | 53 +++++++++++++++++++++------ - include/stdio.h | 5 +++ - include/sys/stat.h | 33 +++++++++++++---- - include/sys/time.h | 2 +- - libc/misc/dirent/opendir.c | 63 +++++++++++++++++++++++++------- - libc/sysdeps/linux/common/faccessat.c | 16 ++++++++ - libc/sysdeps/linux/common/fchmodat.c | 16 ++++++++ - libc/sysdeps/linux/common/fchownat.c | 16 ++++++++ - libc/sysdeps/linux/common/fstatat.c | 27 ++++++++++++++ - libc/sysdeps/linux/common/fstatat64.c | 31 ++++++++++++++++ - libc/sysdeps/linux/common/futimesat.c | 16 ++++++++ - libc/sysdeps/linux/common/linkat.c | 16 ++++++++ - libc/sysdeps/linux/common/mkdirat.c | 16 ++++++++ - libc/sysdeps/linux/common/mkfifoat.c | 19 ++++++++++ - libc/sysdeps/linux/common/mknodat.c | 25 +++++++++++++ - libc/sysdeps/linux/common/openat.c | 18 +++++++++ - libc/sysdeps/linux/common/openat64.c | 25 +++++++++++++ - libc/sysdeps/linux/common/readlinkat.c | 16 ++++++++ - libc/sysdeps/linux/common/renameat.c | 16 ++++++++ - libc/sysdeps/linux/common/symlinkat.c | 16 ++++++++ - libc/sysdeps/linux/common/unlinkat.c | 16 ++++++++ - libc/sysdeps/linux/common/utimensat.c | 16 ++++++++ - 24 files changed, 462 insertions(+), 40 deletions(-) - create mode 100644 libc/sysdeps/linux/common/faccessat.c - create mode 100644 libc/sysdeps/linux/common/fchmodat.c - create mode 100644 libc/sysdeps/linux/common/fchownat.c - create mode 100644 libc/sysdeps/linux/common/fstatat.c - create mode 100644 libc/sysdeps/linux/common/fstatat64.c - create mode 100644 libc/sysdeps/linux/common/futimesat.c - create mode 100644 libc/sysdeps/linux/common/linkat.c - create mode 100644 libc/sysdeps/linux/common/mkdirat.c - create mode 100644 libc/sysdeps/linux/common/mkfifoat.c - create mode 100644 libc/sysdeps/linux/common/mknodat.c - create mode 100644 libc/sysdeps/linux/common/openat.c - create mode 100644 libc/sysdeps/linux/common/openat64.c - create mode 100644 libc/sysdeps/linux/common/readlinkat.c - create mode 100644 libc/sysdeps/linux/common/renameat.c - create mode 100644 libc/sysdeps/linux/common/symlinkat.c - create mode 100644 libc/sysdeps/linux/common/unlinkat.c - create mode 100644 libc/sysdeps/linux/common/utimensat.c - -diff --git a/include/dirent.h b/include/dirent.h -index 565a94d..376ca61 100644 ---- a/include/dirent.h -+++ b/include/dirent.h -@@ -134,6 +134,14 @@ typedef struct __dirstream DIR; - marked with __THROW. */ - extern DIR *opendir (__const char *__name) __nonnull ((1)); - -+#ifdef __USE_XOPEN2K8 -+/* Same as opendir, but open the stream on the file descriptor FD. -+ -+ This function is a possible cancellation point and therefore not -+ marked with __THROW. */ -+extern DIR *fdopendir (int __fd); -+#endif -+ - /* Close the directory stream DIRP. - Return 0 if successful, -1 if not. - -@@ -210,7 +218,7 @@ extern void seekdir (DIR *__dirp, long int __pos) __THROW __nonnull ((1)); - extern long int telldir (DIR *__dirp) __THROW __nonnull ((1)); - #endif - --#if defined __USE_BSD || defined __USE_MISC -+#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN_2K8 - - /* Return the file descriptor used by DIRP. */ - extern int dirfd (DIR *__dirp) __THROW __nonnull ((1)); -diff --git a/include/fcntl.h b/include/fcntl.h -index 3e0aab5..084ee8c 100644 ---- a/include/fcntl.h -+++ b/include/fcntl.h -@@ -56,13 +56,16 @@ __BEGIN_DECLS - # define SEEK_END 2 /* Seek from end of file. */ - #endif /* XPG */ - --#if 0 /*def __USE_GNU*/ -+#ifdef __USE_ATFILE - # define AT_FDCWD -100 /* Special value used to indicate -- openat should use the current -- working directory. */ -+ the *at functions should use the -+ current working directory. */ - # define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ - # define AT_REMOVEDIR 0x200 /* Remove directory instead of - unlinking file. */ -+# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ -+# define AT_EACCESS 0x200 /* Test access permitted for -+ effective IDs, not real IDs. */ - #endif - - /* Do the file control operation described by CMD on FD. -@@ -103,11 +106,11 @@ extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64) - extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1)); - #endif - --#if 0 /*def __USE_GNU*/ --/* Similar to OPEN but a relative path name is interpreted relative to -+#ifdef __USE_ATFILE -+/* Similar to `open' but a relative path name is interpreted relative to - the directory for which FD is a descriptor. - -- NOTE: some other OPENAT implementation support additional functionality -+ NOTE: some other `openat' implementation support additional functionality - through this interface, especially using the O_XATTR flag. This is not - yet supported here. - -diff --git a/include/features.h b/include/features.h -index defdd04..51c6548 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991-1993,1995-2003,2004,2005 Free Software Foundation, Inc. -+/* Copyright (C) 1991-1993,1995-2006,2007,2009 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -50,9 +50,10 @@ - if >=199309L, add IEEE Std 1003.1b-1993; - if >=199506L, add IEEE Std 1003.1c-1995; - if >=200112L, all of IEEE 1003.1-2004 -+ if >=200809L, all of IEEE 1003.1-2008 - _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if - Single Unix conformance is wanted, to 600 for the -- upcoming sixth revision. -+ sixth revision, to 700 for the seventh revision. - _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. - _LARGEFILE_SOURCE Some more functions for correct standard I/O. - _LARGEFILE64_SOURCE Additional functionality from LFS for large files. -@@ -69,7 +70,7 @@ - The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__. - If none of these are defined, the default is to have _SVID_SOURCE, - _BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to -- 199506L. If more than one of these are defined, they accumulate. -+ 200112L. If more than one of these are defined, they accumulate. - For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE - together give you ISO C, 1003.1, and 1003.2, but nothing else. - -@@ -77,6 +78,7 @@ - header files to decide what to declare or define: - - __USE_ISOC99 Define ISO C99 things. -+ __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. - __USE_POSIX2 Define IEEE Std 1003.2 things. - __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. -@@ -85,6 +87,7 @@ - __USE_XOPEN_EXTENDED Define X/Open Unix things. - __USE_UNIX98 Define Single Unix V2 things. - __USE_XOPEN2K Define XPG6 things. -+ __USE_XOPEN2K8 Define XPG7 things. - __USE_LARGEFILE Define correct standard I/O things. - __USE_LARGEFILE64 Define LFS things with separate names. - __USE_FILE_OFFSET64 Define 64bit interface as default. -@@ -111,6 +114,7 @@ - - /* Undefine everything, so we get a clean slate. */ - #undef __USE_ISOC99 -+#undef __USE_ISOC95 - #undef __USE_POSIX - #undef __USE_POSIX2 - #undef __USE_POSIX199309 -@@ -119,6 +123,7 @@ - #undef __USE_XOPEN_EXTENDED - #undef __USE_UNIX98 - #undef __USE_XOPEN2K -+#undef __USE_XOPEN2K8 - #undef __USE_LARGEFILE - #undef __USE_LARGEFILE64 - #undef __USE_FILE_OFFSET64 -@@ -171,9 +176,9 @@ - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE --# define _POSIX_C_SOURCE 199506L -+# define _POSIX_C_SOURCE 200809L - # undef _XOPEN_SOURCE --# define _XOPEN_SOURCE 600 -+# define _XOPEN_SOURCE 700 - # undef _XOPEN_SOURCE_EXTENDED - # define _XOPEN_SOURCE_EXTENDED 1 - # ifdef __UCLIBC_HAS_LFS__ -@@ -207,6 +212,12 @@ - # define __USE_ISOC99 1 - #endif - -+/* This is to enable the ISO C90 Amendment 1:1995 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) -+# define __USE_ISOC95 1 -+#endif -+ - /* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2 - (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */ - #if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \ -@@ -214,9 +225,14 @@ - # define _POSIX_SOURCE 1 - # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 - # define _POSIX_C_SOURCE 2 --# else -+# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600 - # define _POSIX_C_SOURCE 199506L -+# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700 -+# define _POSIX_C_SOURCE 200112L -+# else -+# define _POSIX_C_SOURCE 200809L - # endif -+# define __USE_POSIX_IMPLICITLY 1 - #endif - - #if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE -@@ -237,6 +253,14 @@ - - #if (_POSIX_C_SOURCE - 0) >= 200112L - # define __USE_XOPEN2K 1 -+# undef __USE_ISOC99 -+# define __USE_ISOC99 1 -+#endif -+ -+#if (_POSIX_C_SOURCE - 0) >= 200809L -+# define __USE_XOPEN2K8 1 -+# undef _ATFILE_SOURCE -+# define _ATFILE_SOURCE 1 - #endif - - #ifdef _XOPEN_SOURCE -@@ -247,6 +271,9 @@ - # undef _LARGEFILE_SOURCE - # define _LARGEFILE_SOURCE 1 - # if (_XOPEN_SOURCE - 0) >= 600 -+# if (_XOPEN_SOURCE - 0) >= 700 -+# define __USE_XOPEN2K8 1 -+# endif - # define __USE_XOPEN2K 1 - # undef __USE_ISOC99 - # define __USE_ISOC99 1 -@@ -313,7 +340,7 @@ - - #ifdef __UCLIBC_HAS_WCHAR__ - /* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */ --# define __STDC_ISO_10646__ 200009L -+#define __STDC_ISO_10646__ 200009L - #endif - - /* There is an unwholesomely huge amount of code out there that depends on the -@@ -365,7 +392,13 @@ - - #endif /* !ASSEMBLER */ - --/* Decide whether we can define 'extern inline' functions in headers. */ -+/* Decide whether we can, and are willing to define extern inline -+ * functions in headers, even if this results in a slightly bigger -+ * code for user programs built against uclibc. -+ * Enabled only in -O2 compiles, not -Os. -+ * uclibc itself is usually built without __USE_EXTERN_INLINES, -+ * remove "&& !defined __OPTIMIZE_SIZE__" part to do otherwise. -+ */ - #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ - && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ - && (defined __extern_inline || defined __GNUC_GNU_INLINE__) -@@ -406,10 +439,6 @@ uClibc was built without large file support enabled. - # define __USE_LARGEFILE64 1 - #endif - --/* uClibc does not support *at interfaces. */ --#undef _ATFILE_SOURCE --#undef __USE_ATFILE -- - #ifdef _LIBC - # include <libc-internal.h> - #endif -diff --git a/include/stdio.h b/include/stdio.h -index f14016a..237b9a7 100644 ---- a/include/stdio.h -+++ b/include/stdio.h -@@ -147,6 +147,11 @@ extern int remove (__const char *__filename) __THROW; - extern int rename (__const char *__old, __const char *__new) __THROW; - __END_NAMESPACE_STD - -+#ifdef __USE_ATFILE -+/* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ -+extern int renameat (int __oldfd, __const char *__old, int __newfd, -+ __const char *__new) __THROW; -+#endif - - __BEGIN_NAMESPACE_STD - /* Create a temporary file and open it read/write. -diff --git a/include/sys/stat.h b/include/sys/stat.h -index 5082390..17d1a05 100644 ---- a/include/sys/stat.h -+++ b/include/sys/stat.h -@@ -1,4 +1,5 @@ --/* Copyright (C) 1991,1992,1995-2004,2005,2006 Free Software Foundation, Inc. -+/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007, 2009 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -27,11 +28,12 @@ - - #include <bits/types.h> /* For __mode_t and __dev_t. */ - --#if defined __USE_XOPEN || defined __USE_MISC -+#if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_MISC \ -+ || defined __USE_ATFILE - # if defined __USE_XOPEN || defined __USE_XOPEN2K - # define __need_time_t - # endif --# ifdef __USE_MISC -+# if defined __USE_MISC || defined __USE_ATFILE - # define __need_timespec - # endif - # include <time.h> /* For time_t resp. timespec. */ -@@ -247,12 +249,14 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file, - # endif - # endif - -+# ifdef __USE_LARGEFILE64 - extern int fstatat64 (int __fd, __const char *__restrict __file, - struct stat64 *__restrict __buf, int __flag) - __THROW __nonnull ((2, 3)); -+# endif - #endif - --#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED -+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K - # ifndef __USE_FILE_OFFSET64 - /* Get file attributes about FILE and put them in BUF. - If FILE is a symbolic link, do not follow it. */ -@@ -296,7 +300,8 @@ extern int fchmod (int __fd, __mode_t __mode) __THROW; - #ifdef __USE_ATFILE - /* Set file access permissions of FILE relative to - the directory FD is open on. */ --extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int __flag) -+extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, -+ int __flag) - __THROW __nonnull ((2)) __wur; - #endif /* Use ATFILE. */ - -@@ -330,14 +335,14 @@ extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) - #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED - extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) - __THROW __nonnull ((1)); --#endif - --#ifdef __USE_ATFILE -+# ifdef __USE_ATFILE - /* Like mknod, create a new device file with permission bits MODE and - device number DEV. But interpret relative PATH names relative to - the directory associated with FD. */ - extern int mknodat (int __fd, __const char *__path, __mode_t __mode, - __dev_t __dev) __THROW __nonnull ((2)); -+# endif - #endif - - -@@ -352,7 +357,21 @@ extern int mkfifo (__const char *__path, __mode_t __mode) - extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) - __THROW __nonnull ((2)); - #endif -+ -+#ifdef __USE_ATFILE -+/* Set file access and modification times relative to directory file -+ descriptor. */ -+extern int utimensat (int __fd, __const char *__path, -+ __const struct timespec __times[2], -+ int __flags) -+ __THROW __nonnull ((2)); -+#endif - -+#ifdef __USE_XOPEN2K8 -+/* Set file access and modification times of the file associated with FD. */ -+extern int futimens (int __fd, __const struct timespec __times[2]) __THROW; -+#endif -+ - /* on uClibc we have unversioned struct stat and mknod. - * bits/stat.h is filled with wrong info, so we undo it here. */ - #undef _STAT_VER -diff --git a/include/sys/time.h b/include/sys/time.h -index 66fb9e0..2ba124f 100644 ---- a/include/sys/time.h -+++ b/include/sys/time.h -@@ -148,7 +148,7 @@ extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) - extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW; - #endif - --#if 0 /*def __USE_GNU*/ -+#ifdef __USE_GNU - /* Change the access time of FILE relative to FD to TVP[0] and the - modification time of FILE to TVP[1]. If TVP is a null pointer, use - the current time instead. Returns 0 on success, -1 on errors. */ -diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c -index 26ab915..c03fcbd 100644 ---- a/libc/misc/dirent/opendir.c -+++ b/libc/misc/dirent/opendir.c -@@ -12,6 +12,7 @@ - #include <unistd.h> - #include <sys/dir.h> - #include <sys/stat.h> -+#include <dirent.h> - #include "dirstream.h" - - libc_hidden_proto(opendir) -@@ -21,6 +22,53 @@ libc_hidden_proto(close) - libc_hidden_proto(stat) - libc_hidden_proto(fstat) - -+static DIR *fd_to_DIR(int fd, __blksize_t size) -+{ -+ DIR *ptr; -+ -+ ptr = malloc(sizeof(*ptr)); -+ if (!ptr) -+ return NULL; -+ -+ ptr->dd_fd = fd; -+ ptr->dd_nextloc = ptr->dd_size = ptr->dd_nextoff = 0; -+ ptr->dd_max = size; -+ if (ptr->dd_max < 512) -+ ptr->dd_max = 512; -+ -+ ptr->dd_buf = calloc(1, ptr->dd_max); -+ if (!ptr->dd_buf) { -+ free(ptr); -+ return NULL; -+ } -+ __pthread_mutex_init(&ptr->dd_lock, NULL); -+ -+ return ptr; -+} -+ -+DIR *fdopendir(int fd) -+{ -+ int flags; -+ struct stat st; -+ -+ if (fstat(fd, &st)) -+ return NULL; -+ if (!S_ISDIR(st.st_mode)) { -+ __set_errno(ENOTDIR); -+ return NULL; -+ } -+ -+ flags = fcntl(fd, F_GETFL); -+ if (flags == -1) -+ return NULL; -+ if ((flags & O_ACCMODE) == O_WRONLY) { -+ __set_errno(EINVAL); -+ return NULL; -+ } -+ -+ return fd_to_DIR(fd, st.st_blksize); -+} -+ - /* opendir just makes an open() call - it return NULL if it fails - * (open sets errno), otherwise it returns a DIR * pointer. - */ -@@ -61,23 +109,12 @@ close_and_ret: - __set_errno(saved_errno); - return NULL; - } -- if (!(ptr = malloc(sizeof(*ptr)))) -- goto nomem_close_and_ret; - -- ptr->dd_fd = fd; -- ptr->dd_nextloc = ptr->dd_size = ptr->dd_nextoff = 0; -- ptr->dd_max = statbuf.st_blksize; -- if (ptr->dd_max < 512) -- ptr->dd_max = 512; -- -- if (!(ptr->dd_buf = calloc(1, ptr->dd_max))) { -- free(ptr); --nomem_close_and_ret: -+ ptr = fd_to_DIR(fd, statbuf.st_blksize); -+ if (!ptr) { - close(fd); - __set_errno(ENOMEM); -- return NULL; - } -- __pthread_mutex_init(&(ptr->dd_lock), NULL); - return ptr; - } - libc_hidden_def(opendir) -diff --git a/libc/sysdeps/linux/common/faccessat.c b/libc/sysdeps/linux/common/faccessat.c -new file mode 100644 -index 0000000..09ca129 ---- /dev/null -+++ b/libc/sysdeps/linux/common/faccessat.c -@@ -0,0 +1,16 @@ -+/* -+ * faccessat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <unistd.h> -+ -+#ifdef __NR_faccessat -+_syscall4(int, faccessat, int, fd, const char *, file, int, type, int, flag) -+#else -+/* should add emulation with faccess() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/fchmodat.c b/libc/sysdeps/linux/common/fchmodat.c -new file mode 100644 -index 0000000..7d4dd4e ---- /dev/null -+++ b/libc/sysdeps/linux/common/fchmodat.c -@@ -0,0 +1,16 @@ -+/* -+ * fchmodat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+ -+#ifdef __NR_fchmodat -+_syscall4(int, fchmodat, int, fd, const char *, file, mode_t, mode, int, flag) -+#else -+/* should add emulation with fchmod() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/fchownat.c b/libc/sysdeps/linux/common/fchownat.c -new file mode 100644 -index 0000000..707164d ---- /dev/null -+++ b/libc/sysdeps/linux/common/fchownat.c -@@ -0,0 +1,16 @@ -+/* -+ * fchownat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <unistd.h> -+ -+#ifdef __NR_fchownat -+_syscall5(int, fchownat, int, fd, const char *, file, uid_t, owner, gid_t, group, int, flag) -+#else -+/* should add emulation with fchown() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/fstatat.c b/libc/sysdeps/linux/common/fstatat.c -new file mode 100644 -index 0000000..149c189 ---- /dev/null -+++ b/libc/sysdeps/linux/common/fstatat.c -@@ -0,0 +1,27 @@ -+/* -+ * fstatat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+#include "xstatconv.h" -+ -+#ifdef __NR_fstatat64 -+int fstatat(int fd, const char *file, struct stat *buf, int flag) -+{ -+ int ret; -+ struct kernel_stat kbuf; -+ -+ ret = INLINE_SYSCALL(fstatat64, 4, fd, file, &kbuf, flag); -+ if (ret == 0) -+ __xstat_conv(&kbuf, buf); -+ -+ return ret; -+} -+#else -+/* should add emulation with fstat() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/fstatat64.c b/libc/sysdeps/linux/common/fstatat64.c -new file mode 100644 -index 0000000..5ae1fad ---- /dev/null -+++ b/libc/sysdeps/linux/common/fstatat64.c -@@ -0,0 +1,31 @@ -+/* -+ * fstatat64() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+#include "xstatconv.h" -+ -+#ifdef __UCLIBC_HAS_LFS__ -+ -+#ifdef __NR_fstatat64 -+int fstatat64(int fd, const char *file, struct stat64 *buf, int flag) -+{ -+ int ret; -+ struct kernel_stat64 kbuf; -+ -+ ret = INLINE_SYSCALL(fstatat64, 4, fd, file, &kbuf, flag); -+ if (ret == 0) -+ __xstat64_conv(&kbuf, buf); -+ -+ return ret; -+} -+#else -+/* should add emulation with fstat64() and /proc/self/fd/ ... */ -+#endif -+ -+#endif -diff --git a/libc/sysdeps/linux/common/futimesat.c b/libc/sysdeps/linux/common/futimesat.c -new file mode 100644 -index 0000000..bd73eae ---- /dev/null -+++ b/libc/sysdeps/linux/common/futimesat.c -@@ -0,0 +1,16 @@ -+/* -+ * futimesat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/time.h> -+ -+#ifdef __NR_futimesat -+_syscall3(int, futimesat, int, fd, const char *, file, const struct timeval *, tvp) -+#else -+/* should add emulation with futimes() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/linkat.c b/libc/sysdeps/linux/common/linkat.c -new file mode 100644 -index 0000000..9abe9ec ---- /dev/null -+++ b/libc/sysdeps/linux/common/linkat.c -@@ -0,0 +1,16 @@ -+/* -+ * linkat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <unistd.h> -+ -+#ifdef __NR_linkat -+_syscall5(int, linkat, int, fromfd, const char *, from, int, tofd, const char *, to, int, flags) -+#else -+/* should add emulation with link() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/mkdirat.c b/libc/sysdeps/linux/common/mkdirat.c -new file mode 100644 -index 0000000..4da9468 ---- /dev/null -+++ b/libc/sysdeps/linux/common/mkdirat.c -@@ -0,0 +1,16 @@ -+/* -+ * mkdirat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+ -+#ifdef __NR_mkdirat -+_syscall3(int, mkdirat, int, fd, const char *, path, mode_t, mode) -+#else -+/* should add emulation with mkdir() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/mkfifoat.c b/libc/sysdeps/linux/common/mkfifoat.c -new file mode 100644 -index 0000000..e442fe2 ---- /dev/null -+++ b/libc/sysdeps/linux/common/mkfifoat.c -@@ -0,0 +1,19 @@ -+/* -+ * mkfifoat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+ -+#ifdef __NR_mknodat -+int mkfifoat(int fd, const char *path, mode_t mode) -+{ -+ return mknodat(fd, path, mode | S_IFIFO, 0); -+} -+#else -+/* should add emulation with mkfifo() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/mknodat.c b/libc/sysdeps/linux/common/mknodat.c -new file mode 100644 -index 0000000..93b9e6e ---- /dev/null -+++ b/libc/sysdeps/linux/common/mknodat.c -@@ -0,0 +1,25 @@ -+/* -+ * mknodat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+ -+#ifdef __NR_mknodat -+int mknodat(int fd, const char *path, mode_t mode, dev_t dev) -+{ -+ unsigned long long int k_dev; -+ -+ /* We must convert the value to dev_t type used by the kernel. */ -+ k_dev = (dev) & ((1ULL << 32) - 1); -+ -+ return INLINE_SYSCALL(mknodat, 4, fd, path, mode, (unsigned int)k_dev); -+} -+libc_hidden_def(mknodat) -+#else -+/* should add emulation with mknod() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/openat.c b/libc/sysdeps/linux/common/openat.c -new file mode 100644 -index 0000000..33bd606 ---- /dev/null -+++ b/libc/sysdeps/linux/common/openat.c -@@ -0,0 +1,18 @@ -+/* -+ * openat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#define openat __xx_openat -+#include <sys/syscall.h> -+#include <fcntl.h> -+#undef openat -+ -+#ifdef __NR_openat -+_syscall4(int, openat, int, fd, const char *, file, int, oflag, mode_t, mode) -+#else -+/* should add emulation with open() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/openat64.c b/libc/sysdeps/linux/common/openat64.c -new file mode 100644 -index 0000000..75711aa ---- /dev/null -+++ b/libc/sysdeps/linux/common/openat64.c -@@ -0,0 +1,25 @@ -+/* -+ * openat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#define openat64 __xx_openat -+#include <sys/syscall.h> -+#include <fcntl.h> -+#undef openat64 -+ -+#ifdef __UCLIBC_HAS_LFS__ -+ -+#ifdef __NR_openat -+int openat64(int fd, const char *file, int oflag, mode_t mode) -+{ -+ return openat(fd, file, oflag | O_LARGEFILE, mode); -+} -+#else -+/* should add emulation with open() and /proc/self/fd/ ... */ -+#endif -+ -+#endif -diff --git a/libc/sysdeps/linux/common/readlinkat.c b/libc/sysdeps/linux/common/readlinkat.c -new file mode 100644 -index 0000000..d0a98e1 ---- /dev/null -+++ b/libc/sysdeps/linux/common/readlinkat.c -@@ -0,0 +1,16 @@ -+/* -+ * readlinkat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <unistd.h> -+ -+#ifdef __NR_readlinkat -+_syscall4(ssize_t, readlinkat, int, fd, const char *, path, char *, buf, size_t, len) -+#else -+/* should add emulation with readlink() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/renameat.c b/libc/sysdeps/linux/common/renameat.c -new file mode 100644 -index 0000000..a898f7b ---- /dev/null -+++ b/libc/sysdeps/linux/common/renameat.c -@@ -0,0 +1,16 @@ -+/* -+ * renameat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <stdio.h> -+ -+#ifdef __NR_renameat -+_syscall4(int, renameat, int, oldfd, const char *, old, int, newfd, const char *, new) -+#else -+/* should add emulation with rename() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/symlinkat.c b/libc/sysdeps/linux/common/symlinkat.c -new file mode 100644 -index 0000000..6381b33 ---- /dev/null -+++ b/libc/sysdeps/linux/common/symlinkat.c -@@ -0,0 +1,16 @@ -+/* -+ * symlinkat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <unistd.h> -+ -+#ifdef __NR_symlinkat -+_syscall3(int, symlinkat, const char *, from, int, tofd, const char *, to) -+#else -+/* should add emulation with symlink() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/unlinkat.c b/libc/sysdeps/linux/common/unlinkat.c -new file mode 100644 -index 0000000..0eaf2b6 ---- /dev/null -+++ b/libc/sysdeps/linux/common/unlinkat.c -@@ -0,0 +1,16 @@ -+/* -+ * unlinkat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <unistd.h> -+ -+#ifdef __NR_unlinkat -+_syscall3(int, unlinkat, int, fd, const char *, file, int, flag) -+#else -+/* should add emulation with unlink() and /proc/self/fd/ ... */ -+#endif -diff --git a/libc/sysdeps/linux/common/utimensat.c b/libc/sysdeps/linux/common/utimensat.c -new file mode 100644 -index 0000000..3c5af85 ---- /dev/null -+++ b/libc/sysdeps/linux/common/utimensat.c -@@ -0,0 +1,16 @@ -+/* -+ * utimensat() for uClibc -+ * -+ * Copyright (C) 2009 Analog Devices Inc. -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include <sys/syscall.h> -+#include <sys/stat.h> -+ -+#ifdef __NR_utimensat -+_syscall4(int, utimensat, int, fd, const char *, path, const struct timespec *, times, int, flags) -+#else -+/* should add emulation with utimens() and /proc/self/fd/ ... */ -+#endif --- -1.6.3.3 - diff --git a/main/uclibc/0001-include-sys-mount.h-define-MNT_DETATCH-and-MNT_EXPIR.patch b/main/uclibc/0001-include-sys-mount.h-define-MNT_DETATCH-and-MNT_EXPIR.patch deleted file mode 100644 index 88c2490428..0000000000 --- a/main/uclibc/0001-include-sys-mount.h-define-MNT_DETATCH-and-MNT_EXPIR.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 4e2ea87facfbf595920ebd78e10a57b5ab334526 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Tue, 8 Sep 2009 12:40:24 +0000 -Subject: [PATCH] include/sys/mount.h: define MNT_DETATCH and MNT_EXPIRE - -This is how glibc does it. ---- - include/sys/mount.h | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/include/sys/mount.h b/include/sys/mount.h -index b305549..f17064d 100644 ---- a/include/sys/mount.h -+++ b/include/sys/mount.h -@@ -96,8 +96,12 @@ enum - /* Possible value for FLAGS parameter of `umount2'. */ - enum - { -- MNT_FORCE = 1 /* Force unmounting. */ -+ MNT_FORCE = 1, /* Force unmounting. */ - #define MNT_FORCE MNT_FORCE -+ MNT_DETACH = 2, /* Just detach from the tree. */ -+#define MNT_DETACH MNT_DETACH -+ MNT_EXPIRE = 4 /* Mark for expiry. */ -+#define MNT_EXPIRE MNT_EXPIRE - }; - - --- -1.6.4.2 - diff --git a/main/uclibc/0001-linuxthreads-fixes-from-Will-Newton-will.newton-AT-g.patch b/main/uclibc/0001-linuxthreads-fixes-from-Will-Newton-will.newton-AT-g.patch deleted file mode 100644 index 6b54d25f28..0000000000 --- a/main/uclibc/0001-linuxthreads-fixes-from-Will-Newton-will.newton-AT-g.patch +++ /dev/null @@ -1,281 +0,0 @@ -From 52c9ef85a65f4dc25a4d1ff79c0fba1ed53ef43a Mon Sep 17 00:00:00 2001 -From: Denis Vlasenko <vda.linux@googlemail.com> -Date: Thu, 12 Mar 2009 20:56:59 +0000 -Subject: [PATCH 01/39] linuxthreads fixes from Will Newton (will.newton AT gmail.com): - * share Sys V semaphores in order to get appropriate SEM_UNDO semantics. - * correct guardaddr in pthread_free() for TLS case - * move spinlock unlocking before restart() - * When exit was called from a signal handler, the restart - from the manager processing the exit request instead restarted the thread - in pthread_cond_timedwait. - (see http://sources.redhat.com/ml/libc-ports/2006-05/msg00000.html) - ---- - libpthread/linuxthreads/descr.h | 2 -- - libpthread/linuxthreads/manager.c | 15 ++++++++------- - libpthread/linuxthreads/pthread.c | 26 +++++++++++++++----------- - libpthread/linuxthreads/specific.c | 10 ++++++---- - libpthread/linuxthreads/spinlock.c | 14 +++++++++++++- - libpthread/linuxthreads/spinlock.h | 6 ++++-- - libpthread/linuxthreads/sysdeps/i386/tls.h | 2 -- - 7 files changed, 46 insertions(+), 29 deletions(-) - -diff --git a/libpthread/linuxthreads/descr.h b/libpthread/linuxthreads/descr.h -index 24ec30b..47a9acd 100644 ---- a/libpthread/linuxthreads/descr.h -+++ b/libpthread/linuxthreads/descr.h -@@ -123,9 +123,7 @@ struct _pthread_descr_struct - union dtv *dtvp; - pthread_descr self; /* Pointer to this structure */ - int multiple_threads; --# ifdef NEED_DL_SYSINFO - uintptr_t sysinfo; --# endif - } data; - void *__padding[16]; - } p_header; -diff --git a/libpthread/linuxthreads/manager.c b/libpthread/linuxthreads/manager.c -index be1e8d2..b068d6c 100644 ---- a/libpthread/linuxthreads/manager.c -+++ b/libpthread/linuxthreads/manager.c -@@ -742,15 +742,15 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, - pid = __clone2(pthread_start_thread_event, - (void **)new_thread_bottom, - (char *)stack_addr - new_thread_bottom, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM | - __pthread_sig_cancel, new_thread); - #elif _STACK_GROWS_UP - pid = __clone(pthread_start_thread_event, (void *) new_thread_bottom, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM | - __pthread_sig_cancel, new_thread); - #else - pid = __clone(pthread_start_thread_event, stack_addr, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM | - __pthread_sig_cancel, new_thread); - #endif - saved_errno = errno; -@@ -783,15 +783,15 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, - pid = __clone2(pthread_start_thread, - (void **)new_thread_bottom, - (char *)stack_addr - new_thread_bottom, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM | - __pthread_sig_cancel, new_thread); - #elif _STACK_GROWS_UP - pid = __clone(pthread_start_thread, (void *) new_thread_bottom, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM | - __pthread_sig_cancel, new_thread); - #else - pid = __clone(pthread_start_thread, stack_addr, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM | - __pthread_sig_cancel, new_thread); - #endif /* !NEED_SEPARATE_REGISTER_STACK */ - saved_errno = errno; -@@ -892,10 +892,11 @@ static void pthread_free(pthread_descr th) - #ifdef _STACK_GROWS_UP - # ifdef USE_TLS - size_t stacksize = guardaddr - th->p_stackaddr; -+ guardaddr = th->p_stackaddr; - # else - size_t stacksize = guardaddr - (char *)th; --# endif - guardaddr = (char *)th; -+# endif - #else - /* Guardaddr is always set, even if guardsize is 0. This allows - us to compute everything else. */ -diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c -index 91333f2..4d1d906 100644 ---- a/libpthread/linuxthreads/pthread.c -+++ b/libpthread/linuxthreads/pthread.c -@@ -740,17 +740,17 @@ int __pthread_initialize_manager(void) - pid = __clone2(__pthread_manager_event, - (void **) __pthread_manager_thread_bos, - THREAD_MANAGER_STACK_SIZE, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, - mgr); - #elif _STACK_GROWS_UP - pid = __clone(__pthread_manager_event, - (void **) __pthread_manager_thread_bos, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, - mgr); - #else - pid = __clone(__pthread_manager_event, - (void **) __pthread_manager_thread_tos, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, - mgr); - #endif - -@@ -780,13 +780,13 @@ int __pthread_initialize_manager(void) - #ifdef NEED_SEPARATE_REGISTER_STACK - pid = __clone2(__pthread_manager, (void **) __pthread_manager_thread_bos, - THREAD_MANAGER_STACK_SIZE, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, mgr); -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr); - #elif _STACK_GROWS_UP - pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_bos, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, mgr); -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr); - #else - pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_tos, -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, mgr); -+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr); - #endif - } - if (__builtin_expect (pid, 0) == -1) { -@@ -972,6 +972,10 @@ static void pthread_onexit_process(int retcode, void *arg) - struct pthread_request request; - pthread_descr self = thread_self(); - -+ /* Make sure we come back here after suspend(), in case we entered -+ from a signal handler. */ -+ THREAD_SETMEM(self, p_signal_jmp, NULL); -+ - request.req_thread = self; - request.req_kind = REQ_PROCESS_EXIT; - request.req_args.exit.code = retcode; -@@ -1201,13 +1205,13 @@ void __pthread_wait_for_restart_signal(pthread_descr self) - - void __pthread_restart_old(pthread_descr th) - { -- if (atomic_increment(&th->p_resume_count) == -1) -+ if (pthread_atomic_increment(&th->p_resume_count) == -1) - kill(th->p_pid, __pthread_sig_restart); - } - - void __pthread_suspend_old(pthread_descr self) - { -- if (atomic_decrement(&self->p_resume_count) <= 0) -+ if (pthread_atomic_decrement(&self->p_resume_count) <= 0) - __pthread_wait_for_restart_signal(self); - } - -@@ -1218,7 +1222,7 @@ __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime) - int was_signalled = 0; - sigjmp_buf jmpbuf; - -- if (atomic_decrement(&self->p_resume_count) == 0) { -+ if (pthread_atomic_decrement(&self->p_resume_count) == 0) { - /* Set up a longjmp handler for the restart signal, unblock - the signal and sleep. */ - -@@ -1275,9 +1279,9 @@ __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime) - being delivered. */ - - if (!was_signalled) { -- if (atomic_increment(&self->p_resume_count) != -1) { -+ if (pthread_atomic_increment(&self->p_resume_count) != -1) { - __pthread_wait_for_restart_signal(self); -- atomic_decrement(&self->p_resume_count); /* should be zero now! */ -+ pthread_atomic_decrement(&self->p_resume_count); /* should be zero now! */ - /* woke spontaneously and consumed restart signal */ - return 1; - } -diff --git a/libpthread/linuxthreads/specific.c b/libpthread/linuxthreads/specific.c -index 92eec3d..764bf1e 100644 ---- a/libpthread/linuxthreads/specific.c -+++ b/libpthread/linuxthreads/specific.c -@@ -104,13 +104,14 @@ int pthread_key_delete(pthread_key_t key) - that if the key is reallocated later by pthread_key_create, its - associated values will be NULL in all threads. - -- If no threads have been created yet, clear it just in the -- current thread. */ -+ If no threads have been created yet, or if we are exiting, clear -+ it just in the current thread. */ - - struct pthread_key_delete_helper_args args; - args.idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE; - args.idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE; -- if (__pthread_manager_request != -1) -+ if (__pthread_manager_request != -1 -+ && !(__builtin_expect (__pthread_exit_requested, 0))) - { - struct pthread_request request; - -@@ -203,8 +204,9 @@ void __pthread_destroy_specifics() - __pthread_lock(THREAD_GETMEM(self, p_lock), self); - for (i = 0; i < PTHREAD_KEY_1STLEVEL_SIZE; i++) { - if (THREAD_GETMEM_NC(self, p_specific[i]) != NULL) { -- free(THREAD_GETMEM_NC(self, p_specific[i])); -+ void *p = THREAD_GETMEM_NC(self, p_specific[i]); - THREAD_SETMEM_NC(self, p_specific[i], NULL); -+ free(p); - } - } - __pthread_unlock(THREAD_GETMEM(self, p_lock)); -diff --git a/libpthread/linuxthreads/spinlock.c b/libpthread/linuxthreads/spinlock.c -index f325402..f0cf19c 100644 ---- a/libpthread/linuxthreads/spinlock.c -+++ b/libpthread/linuxthreads/spinlock.c -@@ -637,8 +637,20 @@ void __pthread_alt_unlock(struct _pthread_fastlock *lock) - #if defined HAS_COMPARE_AND_SWAP - wait_node_dequeue(pp_head, pp_max_prio, p_max_prio); - #endif -+ -+ /* Release the spinlock *before* restarting. */ -+#if defined TEST_FOR_COMPARE_AND_SWAP -+ if (!__pthread_has_cas) -+#endif -+#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP -+ { -+ __pthread_release(&lock->__spinlock); -+ } -+#endif -+ - restart(p_max_prio->thr); -- break; -+ -+ return; - } - } - -diff --git a/libpthread/linuxthreads/spinlock.h b/libpthread/linuxthreads/spinlock.h -index 210ead4..2a3c227 100644 ---- a/libpthread/linuxthreads/spinlock.h -+++ b/libpthread/linuxthreads/spinlock.h -@@ -172,7 +172,8 @@ static __inline__ int __pthread_alt_trylock (struct _pthread_fastlock * lock) - - /* Operations on pthread_atomic, which is defined in internals.h */ - --static __inline__ long atomic_increment(struct pthread_atomic *pa) -+static __inline__ long -+pthread_atomic_increment (struct pthread_atomic *pa) - { - long oldval; - -@@ -184,7 +185,8 @@ static __inline__ long atomic_increment(struct pthread_atomic *pa) - } - - --static __inline__ long atomic_decrement(struct pthread_atomic *pa) -+static __inline__ long -+pthread_atomic_decrement (struct pthread_atomic *pa) - { - long oldval; - -diff --git a/libpthread/linuxthreads/sysdeps/i386/tls.h b/libpthread/linuxthreads/sysdeps/i386/tls.h -index 2abd3a0..4c9b680 100644 ---- a/libpthread/linuxthreads/sysdeps/i386/tls.h -+++ b/libpthread/linuxthreads/sysdeps/i386/tls.h -@@ -46,9 +46,7 @@ typedef struct - dtv_t *dtv; - void *self; /* Pointer to the thread descriptor. */ - int multiple_threads; --#ifdef NEED_DL_SYSINFO - uintptr_t sysinfo; --#endif - } tcbhead_t; - - #else /* __ASSEMBLER__ */ --- -1.6.3.2 - diff --git a/main/uclibc/0002-add-hidden-aliases-for-openat-funcs.patch b/main/uclibc/0002-add-hidden-aliases-for-openat-funcs.patch deleted file mode 100644 index 03fddbf98e..0000000000 --- a/main/uclibc/0002-add-hidden-aliases-for-openat-funcs.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 3f2b14f91f253d8e71b3f089b6864be9fcfbb09a Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Wed, 22 Jul 2009 01:48:08 -0400 -Subject: [PATCH 2/2] add hidden aliases for openat funcs - -openat64() uses openat(), so we need hidden aliases for it. - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> ---- - include/fcntl.h | 2 ++ - libc/sysdeps/linux/common/openat.c | 7 +++++++ - libc/sysdeps/linux/common/openat64.c | 7 +++++++ - 3 files changed, 16 insertions(+), 0 deletions(-) - -diff --git a/include/fcntl.h b/include/fcntl.h -index 084ee8c..7ce3150 100644 ---- a/include/fcntl.h -+++ b/include/fcntl.h -@@ -119,6 +119,7 @@ extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1)); - # ifndef __USE_FILE_OFFSET64 - extern int openat (int __fd, __const char *__file, int __oflag, ...) - __nonnull ((2)); -+libc_hidden_proto(openat) - # else - # ifdef __REDIRECT - extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag, -@@ -130,6 +131,7 @@ extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag, - - extern int openat64 (int __fd, __const char *__file, int __oflag, ...) - __nonnull ((2)); -+libc_hidden_proto(openat64) - #endif - - /* Create and open FILE, with mode MODE. This takes an `int' MODE -diff --git a/libc/sysdeps/linux/common/openat.c b/libc/sysdeps/linux/common/openat.c -index 33bd606..8380ec6 100644 ---- a/libc/sysdeps/linux/common/openat.c -+++ b/libc/sysdeps/linux/common/openat.c -@@ -12,7 +12,14 @@ - #undef openat - - #ifdef __NR_openat -+/* The openat() prototype is varargs based, but we don't care about that -+ * here, so need to provide our own dedicated signature. -+ */ -+extern int openat(int fd, const char *file, int oflag, mode_t mode); -+libc_hidden_proto(openat) -+ - _syscall4(int, openat, int, fd, const char *, file, int, oflag, mode_t, mode) -+libc_hidden_def(openat) - #else - /* should add emulation with open() and /proc/self/fd/ ... */ - #endif -diff --git a/libc/sysdeps/linux/common/openat64.c b/libc/sysdeps/linux/common/openat64.c -index 75711aa..06a5819 100644 ---- a/libc/sysdeps/linux/common/openat64.c -+++ b/libc/sysdeps/linux/common/openat64.c -@@ -14,10 +14,17 @@ - #ifdef __UCLIBC_HAS_LFS__ - - #ifdef __NR_openat -+/* The openat() prototype is varargs based, but we don't care about that -+ * here, so need to provide our own dedicated signature. -+ */ -+extern int openat64(int fd, const char *file, int oflag, mode_t mode); -+libc_hidden_proto(openat64) -+ - int openat64(int fd, const char *file, int oflag, mode_t mode) - { - return openat(fd, file, oflag | O_LARGEFILE, mode); - } -+libc_hidden_def(openat64) - #else - /* should add emulation with open() and /proc/self/fd/ ... */ - #endif --- -1.6.3.3 - diff --git a/main/uclibc/0003-remove-libc_hidden_def-mknodat.patch b/main/uclibc/0003-remove-libc_hidden_def-mknodat.patch deleted file mode 100644 index af6dda8a8b..0000000000 --- a/main/uclibc/0003-remove-libc_hidden_def-mknodat.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 35d0f8c3a46d139d49b0e3158f0192bc327beb3d Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Fri, 24 Jul 2009 13:46:36 +0000 -Subject: [PATCH 3/3] remove libc_hidden_def(mknodat) - ---- - libc/sysdeps/linux/common/mknodat.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/libc/sysdeps/linux/common/mknodat.c b/libc/sysdeps/linux/common/mknodat.c -index 93b9e6e..8ffcaae 100644 ---- a/libc/sysdeps/linux/common/mknodat.c -+++ b/libc/sysdeps/linux/common/mknodat.c -@@ -19,7 +19,6 @@ int mknodat(int fd, const char *path, mode_t mode, dev_t dev) - - return INLINE_SYSCALL(mknodat, 4, fd, path, mode, (unsigned int)k_dev); - } --libc_hidden_def(mknodat) - #else - /* should add emulation with mknod() and /proc/self/fd/ ... */ - #endif --- -1.6.3.3 - diff --git a/main/uclibc/APKBUILD b/main/uclibc/APKBUILD index 8463c98159..b1931a2487 100644 --- a/main/uclibc/APKBUILD +++ b/main/uclibc/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=uclibc -pkgver=0.9.30.1 -pkgrel=19 +pkgver=0.9.30.2 +pkgrel=0 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" @@ -15,24 +15,14 @@ source="http://uclibc.org/downloads/$_mynamever.tar.bz2 uclibc-0.9.30.1-pthread_getattr_np.patch 0001-Add-dn_skipname-from-OpenBSD.patch 0001-ldd-segfault-fix.patch - 0001-linuxthreads-fixes-from-Will-Newton-will.newton-AT-g.patch - 0001-include-sys-mount.h-define-MNT_DETATCH-and-MNT_EXPIR.patch fstatat-fix-32bit.patch pthread-new-aliasing-fix.diff uclibc-resolv-cname-fix.diff uclibc-i386-floating-stacks.diff - ppoll.patch uclibc-fork-hidden.diff uclibc-fork-hook.diff - uclibc-getaddrinfo-netlink.diff uclibcconfig.x86 " -# backport openat funcs -source="$source - 0001-first-pass-at-implementing-at-funcs.patch - 0002-add-hidden-aliases-for-openat-funcs.patch - 0003-remove-libc_hidden_def-mknodat.patch - " _config="$srcdir"/uclibcconfig.${ARCH:-x86} @@ -64,22 +54,15 @@ package() { rm -f "$pkgdir"/usr/include/scsi/scsi.h } -md5sums="1a4b84e5536ad8170563ffa88c34679c uClibc-0.9.30.1.tar.bz2 +md5sums="e759ec855500082ac3e671dd6cacfdb0 uClibc-0.9.30.2.tar.bz2 ea91460617601b6e084ead66bc3948f5 uclibc-0.9.30.1-resolv.patch cf80c0d44a41e02f389be427ee615d61 uclibc-0.9.30.1-pthread_getattr_np.patch c9e3df01e854db4b1118266acd9bcfbd 0001-Add-dn_skipname-from-OpenBSD.patch 4079b20c763727863bc53408e4988434 0001-ldd-segfault-fix.patch -bcd1c4c9c87f092fb4631559e6ec13ba 0001-linuxthreads-fixes-from-Will-Newton-will.newton-AT-g.patch -7ac347d2921e12c4acdfedc4eb4e5d9c 0001-include-sys-mount.h-define-MNT_DETATCH-and-MNT_EXPIR.patch 14d9fa172f67fee0257f0441b3b3bc13 fstatat-fix-32bit.patch 969187e1da84d0a0a5957b392a3d5a2b pthread-new-aliasing-fix.diff bbb8475963e791f596c34c81ef5583d7 uclibc-resolv-cname-fix.diff -0b3966ab7774ac42ecf34a7b596c661b uclibc-i386-floating-stacks.diff -60738298e377295d359768a09adac0bb ppoll.patch +ccf15714e089306c09d74a1a5c3cc670 uclibc-i386-floating-stacks.diff 220260c979eca4558827d0e7ec8aa8b6 uclibc-fork-hidden.diff 55bb709f5efd937df323f0d39a202cfd uclibc-fork-hook.diff -a7310494a8073ebd43e1d437657532ef uclibc-getaddrinfo-netlink.diff -36b28777f4c49af39268920fbade41b1 uclibcconfig.x86 -329b92fec717c8808c3fa9ffd68f2dfb 0001-first-pass-at-implementing-at-funcs.patch -7ffa41082d9de2bc512b4bed9577bdf9 0002-add-hidden-aliases-for-openat-funcs.patch -e12c647716eef19dd4ad08602dcc435b 0003-remove-libc_hidden_def-mknodat.patch" +36b28777f4c49af39268920fbade41b1 uclibcconfig.x86" diff --git a/main/uclibc/ppoll.patch b/main/uclibc/ppoll.patch deleted file mode 100644 index e73733e216..0000000000 --- a/main/uclibc/ppoll.patch +++ /dev/null @@ -1,59 +0,0 @@ -commit f82635e74a7e174f71f955eaa4f5dc788e596cc0 -Author: Denis Vlasenko <vda.linux@googlemail.com> -Date: Wed Jan 28 23:42:01 2009 +0000 - - fix ppoll. we forgot to pass 5th parameter to the syscall - -diff --git a/libc/sysdeps/linux/common/ppoll.c b/libc/sysdeps/linux/common/ppoll.c -index edcb1dc..d550ae8 100644 ---- a/libc/sysdeps/linux/common/ppoll.c -+++ b/libc/sysdeps/linux/common/ppoll.c -@@ -17,6 +17,7 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include <signal.h> - #include <sys/syscall.h> - #include <sys/poll.h> - -@@ -26,24 +27,26 @@ - - # define __NR___libc_ppoll __NR_ppoll - static __always_inline --_syscall4(int, __libc_ppoll, struct pollfd *, fds, -- nfds_t, nfds, const struct timespec *, timeout, -- const __sigset_t *, sigmask) -+_syscall5(int, __libc_ppoll, -+ struct pollfd *, fds, -+ nfds_t, nfds, -+ const struct timespec *, timeout, -+ const __sigset_t *, sigmask, -+ size_t, sigsetsize) - - int --ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, -+ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, - const __sigset_t *sigmask) - { -- /* The Linux kernel can in some situations update the timeout value. -- We do not want that so use a local variable. */ -- struct timespec tval; -- if (timeout != NULL) -- { -- tval = *timeout; -- timeout = &tval; -- } -- -- return __libc_ppoll(fds, nfds, timeout, sigmask); -+ /* The Linux kernel can in some situations update the timeout value. -+ We do not want that so use a local variable. */ -+ struct timespec tval; -+ if (timeout != NULL) { -+ tval = *timeout; -+ timeout = &tval; -+ } -+ -+ return __libc_ppoll(fds, nfds, timeout, sigmask, _NSIG / 8); - } - libc_hidden_def(ppoll) - diff --git a/main/uclibc/uclibc-getaddrinfo-netlink.diff b/main/uclibc/uclibc-getaddrinfo-netlink.diff deleted file mode 100644 index d2de3c6298..0000000000 --- a/main/uclibc/uclibc-getaddrinfo-netlink.diff +++ /dev/null @@ -1,23 +0,0 @@ -Fix for netlink code that causes crashes with e.g. ppp or tun -interfaces. - -Basically a back port of c40b05b4c4226b2c4323a9ba5b096377931682ef: - -Author: Denis Vlasenko <vda.linux@googlemail.com> -Date: Tue Dec 9 00:16:11 2008 +0000 - - getaddrinfo: runp->ifa_addr indeed can be NULL, don't dereference it - -Index: uClibc-0.9.30.1/libc/inet/getaddrinfo.c -=================================================================== ---- uClibc-0.9.30.1.orig/libc/inet/getaddrinfo.c 2009-07-29 08:54:52.000000000 +0300 -+++ uClibc-0.9.30.1/libc/inet/getaddrinfo.c 2009-07-29 08:55:16.000000000 +0300 -@@ -187,6 +187,8 @@ - } - - for (runp = ifa; runp != NULL; runp = runp->ifa_next) { -+ if (runp->ifa_addr == NULL) -+ continue; - #if defined __UCLIBC_HAS_IPV4__ - if (runp->ifa_addr->sa_family == PF_INET) - seen |= SEEN_IPV4; diff --git a/main/uclibc/uclibc-i386-floating-stacks.diff b/main/uclibc/uclibc-i386-floating-stacks.diff index 553195e69f..0ec05799aa 100644 --- a/main/uclibc/uclibc-i386-floating-stacks.diff +++ b/main/uclibc/uclibc-i386-floating-stacks.diff @@ -17,7 +17,7 @@ #include <sysdep.h> - +#include <sys/syscall.h> -+#include <kernel-features.h> ++#include <bits/kernel-features.h> /* We don't want to include the kernel header. So duplicate the information. */ |