mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] klibc: bump 1.5.25
@ 2012-03-26 10:40 Alexander Stein
  2012-03-28  9:31 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stein @ 2012-03-26 10:40 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
 patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch |   81 -------
 ...nitial-mntent.h-with-setmntent-and-endmnt.patch |   84 -------
 .../klibc-1.5.15/0003-klibc-add-getmntent.patch    |  117 ---------
 .../0004-klibc-mount-add-help-arg-for-usage.patch  |   81 -------
 ...klibc-mount-list-all-mounted-file-systems.patch |   75 ------
 ...06-klibc-mount-list-fs-of-particular-type.patch |   62 -----
 ...7-klibc-mount-read-proc-mounts-preferably.patch |   33 ---
 ...fig-raise-field-length-for-rootpath-DHCP-.patch |   32 ---
 ...fig-set-null-ciaddr-on-DHCPREQUEST-during.patch |   43 ----
 ...bc-1.5.15-released-next-version-is-1.5.16.patch |   19 --
 ...ust_inline-macro-in-klibc-compiler.h-for-.patch |   36 ---
 ...it-zero-length-DHCP-vendor_class_identifi.patch |   88 -------
 ...nd-requested-hostname-in-DHCP-discover-re.patch |  114 ---------
 ...bc-use-headers_install-to-install-headers.patch |   41 ----
 .../0015-klibc-utils-add-simple-ls.patch           |  249 --------------------
 ...AKE-instead-of-make-to-call-external-make.patch |   26 --
 ...ernel-header-installed-by-headers_install.patch |   68 ------
 ...d-support-for-detection-of-vfat-and-jffs2.patch |   58 -----
 .../0019-define-__socklen_t_defined.patch          |   26 --
 ...-include-signal.h-47-5-warning-SIGRTMAX-i.patch |   31 ---
 ...x-no-previous-prototype-__ctype_-warnings.patch |   55 -----
 .../0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch |   35 ---
 .../0023-Fix-assert-when-NDEBUG-defined.patch      |   29 ---
 patches/klibc-1.5.15/0024-dummy-ferror.patch       |   33 ---
 patches/klibc-1.5.15/0025-Fix-arm-signals.patch    |  142 -----------
 patches/klibc-1.5.15/series                        |   25 --
 ...ernel-header-installed-by-headers_install.patch |   60 +++++
 ...d-support-for-detection-of-vfat-and-jffs2.patch |   58 +++++
 .../0003-define-__socklen_t_defined.patch          |   17 ++
 ...-include-signal.h-47-5-warning-SIGRTMAX-i.patch |   31 +++
 patches/klibc-1.5.25/series                        |    4 +
 rules/klibc.make                                   |    4 +-
 32 files changed, 172 insertions(+), 1685 deletions(-)
 delete mode 100644 patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch
 delete mode 100644 patches/klibc-1.5.15/0002-klibc-Add-initial-mntent.h-with-setmntent-and-endmnt.patch
 delete mode 100644 patches/klibc-1.5.15/0003-klibc-add-getmntent.patch
 delete mode 100644 patches/klibc-1.5.15/0004-klibc-mount-add-help-arg-for-usage.patch
 delete mode 100644 patches/klibc-1.5.15/0005-klibc-mount-list-all-mounted-file-systems.patch
 delete mode 100644 patches/klibc-1.5.15/0006-klibc-mount-list-fs-of-particular-type.patch
 delete mode 100644 patches/klibc-1.5.15/0007-klibc-mount-read-proc-mounts-preferably.patch
 delete mode 100644 patches/klibc-1.5.15/0008-klibc-ipconfig-raise-field-length-for-rootpath-DHCP-.patch
 delete mode 100644 patches/klibc-1.5.15/0009-klibc-ipconfig-set-null-ciaddr-on-DHCPREQUEST-during.patch
 delete mode 100644 patches/klibc-1.5.15/0010-klibc-1.5.15-released-next-version-is-1.5.16.patch
 delete mode 100644 patches/klibc-1.5.15/0011-klibc-fix-must_inline-macro-in-klibc-compiler.h-for-.patch
 delete mode 100644 patches/klibc-1.5.15/0012-ipconfig-omit-zero-length-DHCP-vendor_class_identifi.patch
 delete mode 100644 patches/klibc-1.5.15/0013-ipconfig-send-requested-hostname-in-DHCP-discover-re.patch
 delete mode 100644 patches/klibc-1.5.15/0014-klibc-use-headers_install-to-install-headers.patch
 delete mode 100644 patches/klibc-1.5.15/0015-klibc-utils-add-simple-ls.patch
 delete mode 100644 patches/klibc-1.5.15/0016-klibc-use-MAKE-instead-of-make-to-call-external-make.patch
 delete mode 100644 patches/klibc-1.5.15/0017-klibc-use-kernel-header-installed-by-headers_install.patch
 delete mode 100644 patches/klibc-1.5.15/0018-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
 delete mode 100644 patches/klibc-1.5.15/0019-define-__socklen_t_defined.patch
 delete mode 100644 patches/klibc-1.5.15/0020-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
 delete mode 100644 patches/klibc-1.5.15/0021-Fix-no-previous-prototype-__ctype_-warnings.patch
 delete mode 100644 patches/klibc-1.5.15/0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch
 delete mode 100644 patches/klibc-1.5.15/0023-Fix-assert-when-NDEBUG-defined.patch
 delete mode 100644 patches/klibc-1.5.15/0024-dummy-ferror.patch
 delete mode 100644 patches/klibc-1.5.15/0025-Fix-arm-signals.patch
 delete mode 100644 patches/klibc-1.5.15/series
 create mode 100644 patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
 create mode 100644 patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
 create mode 100644 patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
 create mode 100644 patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
 create mode 100644 patches/klibc-1.5.25/series

diff --git a/patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch b/patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch
deleted file mode 100644
index 3a1ded1..0000000
--- a/patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 6f42216923b6d1bb4924d6e2c9117a226d40c2f3 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Sun, 7 Sep 2008 10:01:28 +0200
-Subject: [PATCH 01/21] [klibc] add strtok_r()
-
-reentrant version of strtok() was missing in klibc,
-use the current strtok() implementation and make
-use of it in strtok() itself.
-
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/include/string.h |    1 +
- usr/klibc/Kbuild     |    1 +
- usr/klibc/strtok.c   |    9 +--------
- usr/klibc/strtok_r.c |   13 +++++++++++++
- 4 files changed, 16 insertions(+), 8 deletions(-)
- create mode 100644 usr/klibc/strtok_r.c
-
-diff --git a/usr/include/string.h b/usr/include/string.h
-index ae8270e..0c8c046 100644
---- a/usr/include/string.h
-+++ b/usr/include/string.h
-@@ -44,5 +44,6 @@ __extern char *strsep(char **, const char *);
- __extern size_t strspn(const char *, const char *);
- __extern char *strstr(const char *, const char *);
- __extern char *strtok(char *, const char *);
-+__extern char *strtok_r(char *, const char *, char **);
- 
- #endif				/* _STRING_H */
-diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
-index c8eabf9..eb04267 100644
---- a/usr/klibc/Kbuild
-+++ b/usr/klibc/Kbuild
-@@ -36,6 +36,7 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
- 	  strncat.o strlcpy.o strlcat.o \
- 	  strstr.o strncmp.o strncpy.o strrchr.o \
- 	  strxspn.o strspn.o strcspn.o strpbrk.o strsep.o strtok.o \
-+	  strtok_r.o \
- 	  fnmatch.o \
- 	  gethostname.o getdomainname.o getcwd.o \
- 	  seteuid.o setegid.o \
-diff --git a/usr/klibc/strtok.c b/usr/klibc/strtok.c
-index c2671af..6b169a1 100644
---- a/usr/klibc/strtok.c
-+++ b/usr/klibc/strtok.c
-@@ -8,12 +8,5 @@ char *strtok(char *s, const char *delim)
- {
- 	static char *holder;
- 
--	if (s)
--		holder = s;
--
--	do {
--		s = strsep(&holder, delim);
--	} while (s && !*s);
--
--	return s;
-+	return strtok_r(s, delim, &holder);
- }
-diff --git a/usr/klibc/strtok_r.c b/usr/klibc/strtok_r.c
-new file mode 100644
-index 0000000..695d516
---- /dev/null
-+++ b/usr/klibc/strtok_r.c
-@@ -0,0 +1,13 @@
-+#include <string.h>
-+
-+char *strtok_r(char *s, const char *delim, char **holder)
-+{
-+	if (s)
-+		*holder = s;
-+
-+	do {
-+		s = strsep(holder, delim);
-+	} while (s && !*s);
-+
-+	return s;
-+}
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0002-klibc-Add-initial-mntent.h-with-setmntent-and-endmnt.patch b/patches/klibc-1.5.15/0002-klibc-Add-initial-mntent.h-with-setmntent-and-endmnt.patch
deleted file mode 100644
index 64387a2..0000000
--- a/patches/klibc-1.5.15/0002-klibc-Add-initial-mntent.h-with-setmntent-and-endmnt.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 9452ae7af97f5d3af466104570a6a1dea5e973ad Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Sat, 16 Aug 2008 00:47:10 +0200
-Subject: [PATCH 02/21] [klibc] Add initial mntent.h with setmntent() and endmntent()
-
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/include/mntent.h  |   17 +++++++++++++++++
- usr/klibc/Kbuild      |    3 ++-
- usr/klibc/endmntent.c |    9 +++++++++
- usr/klibc/setmntent.c |    7 +++++++
- 4 files changed, 35 insertions(+), 1 deletions(-)
- create mode 100644 usr/include/mntent.h
- create mode 100644 usr/klibc/endmntent.c
- create mode 100644 usr/klibc/setmntent.c
-
-diff --git a/usr/include/mntent.h b/usr/include/mntent.h
-new file mode 100644
-index 0000000..ca6b211
---- /dev/null
-+++ b/usr/include/mntent.h
-@@ -0,0 +1,17 @@
-+#ifndef _MNTENT_H
-+#define _MNTENT_H       1
-+
-+struct mntent {
-+	char *mnt_fsname;	/* name of mounted file system */
-+	char *mnt_dir;		/* file system path prefix */
-+	char *mnt_type;		/* mount type (see mntent.h) */
-+	char *mnt_opts;		/* mount options (see mntent.h) */
-+	int   mnt_freq;		/* dump frequency in days */
-+	int   mnt_passno;	/* pass number on parallel fsck */
-+};
-+
-+extern FILE *setmntent(const char *, const char *);
-+
-+extern int endmntent(FILE *fp);
-+
-+#endif  /* mntent.h */
-diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
-index eb04267..842a79f 100644
---- a/usr/klibc/Kbuild
-+++ b/usr/klibc/Kbuild
-@@ -56,7 +56,8 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
- 	  ctype/ispunct.o ctype/isspace.o ctype/isupper.o \
- 	  ctype/isxdigit.o ctype/tolower.o ctype/toupper.o \
- 	  userdb/getgrgid.o userdb/getgrnam.o userdb/getpwnam.o \
--	  userdb/getpwuid.o userdb/root_group.o userdb/root_user.o
-+	  userdb/getpwuid.o userdb/root_group.o userdb/root_user.o \
-+	  setmntent.o endmntent.o
- 
- klib-$(CONFIG_KLIBC_ERRLIST) += errlist.o
- 
-diff --git a/usr/klibc/endmntent.c b/usr/klibc/endmntent.c
-new file mode 100644
-index 0000000..419c317
---- /dev/null
-+++ b/usr/klibc/endmntent.c
-@@ -0,0 +1,9 @@
-+#include <stdio.h>
-+#include <mntent.h>
-+
-+int endmntent(FILE *fp)
-+{
-+	if (fp)
-+		fclose(fp);
-+	return 1;
-+}
-diff --git a/usr/klibc/setmntent.c b/usr/klibc/setmntent.c
-new file mode 100644
-index 0000000..d23e141
---- /dev/null
-+++ b/usr/klibc/setmntent.c
-@@ -0,0 +1,7 @@
-+#include <stdio.h>
-+#include <mntent.h>
-+
-+FILE *setmntent(const char *filename, const char *type)
-+{
-+	return fopen(filename, type);
-+}
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0003-klibc-add-getmntent.patch b/patches/klibc-1.5.15/0003-klibc-add-getmntent.patch
deleted file mode 100644
index 0327193..0000000
--- a/patches/klibc-1.5.15/0003-klibc-add-getmntent.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From d2ad1cf968af5c938a0262914f764667a449ffe1 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Sun, 24 Aug 2008 00:48:12 +0200
-Subject: [PATCH 03/21] [klibc] add getmntent()
-
-internaly use reentrant getmntent_r(), can be exported on need.
-take care to use reentrant strtok_r() functions too.
-Thanks to Karel Zak <kzak@redhat.com> for pointing that out.
-
-getmntent is used in several places to check that a news fs
-won't be created on an already mounted partition.
-it is also needed for mount(8) to list mounted fs.
-
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/include/mntent.h  |    2 +
- usr/klibc/Kbuild      |    2 +-
- usr/klibc/getmntent.c |   61 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 64 insertions(+), 1 deletions(-)
- create mode 100644 usr/klibc/getmntent.c
-
-diff --git a/usr/include/mntent.h b/usr/include/mntent.h
-index ca6b211..210610c 100644
---- a/usr/include/mntent.h
-+++ b/usr/include/mntent.h
-@@ -12,6 +12,8 @@ struct mntent {
- 
- extern FILE *setmntent(const char *, const char *);
- 
-+extern struct mntent *getmntent(FILE *);
-+
- extern int endmntent(FILE *fp);
- 
- #endif  /* mntent.h */
-diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
-index 842a79f..1f505c2 100644
---- a/usr/klibc/Kbuild
-+++ b/usr/klibc/Kbuild
-@@ -57,7 +57,7 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
- 	  ctype/isxdigit.o ctype/tolower.o ctype/toupper.o \
- 	  userdb/getgrgid.o userdb/getgrnam.o userdb/getpwnam.o \
- 	  userdb/getpwuid.o userdb/root_group.o userdb/root_user.o \
--	  setmntent.o endmntent.o
-+	  setmntent.o endmntent.o getmntent.o
- 
- klib-$(CONFIG_KLIBC_ERRLIST) += errlist.o
- 
-diff --git a/usr/klibc/getmntent.c b/usr/klibc/getmntent.c
-new file mode 100644
-index 0000000..8af27f3
---- /dev/null
-+++ b/usr/klibc/getmntent.c
-@@ -0,0 +1,61 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <mntent.h>
-+
-+#define BUFLEN 1024
-+
-+struct mntent *getmntent_r(FILE *fp, struct mntent *mntbuf, char *buf,
-+		int buflen)
-+{
-+	char *line = NULL, *saveptr = NULL;
-+	const char *sep = " \t\n";
-+
-+	if (!fp || !mntbuf || !buf)
-+		return NULL;
-+
-+	while ((line = fgets(buf, buflen, fp)) != NULL) {
-+		if (buf[0] == '#' || buf[0] == '\n')
-+			continue;
-+		break;
-+	}
-+
-+	if (!line)
-+		return NULL;
-+
-+	mntbuf->mnt_fsname = strtok_r(buf, sep, &saveptr);
-+	if (!mntbuf->mnt_fsname)
-+		return NULL;
-+
-+	mntbuf->mnt_dir = strtok_r(NULL, sep, &saveptr);
-+	if (!mntbuf->mnt_fsname)
-+		return NULL;
-+
-+	mntbuf->mnt_type = strtok_r(NULL, sep, &saveptr);
-+	if (!mntbuf->mnt_type)
-+		return NULL;
-+
-+	mntbuf->mnt_opts = strtok_r(NULL, sep, &saveptr);
-+	if (!mntbuf->mnt_opts)
-+		mntbuf->mnt_opts = "";
-+
-+	line = strtok_r(NULL, sep, &saveptr);
-+	mntbuf->mnt_freq = !line ? 0 : atoi(line);
-+
-+	line = strtok_r(NULL, sep, &saveptr);
-+	mntbuf->mnt_passno = !line ? 0 : atoi(line);
-+
-+	return mntbuf;
-+}
-+
-+struct mntent *getmntent(FILE *fp)
-+{
-+	static char *buf = NULL;
-+	static struct mntent mntbuf;
-+
-+	buf = malloc(BUFLEN);
-+	if (!buf)
-+		perror("malloc");
-+
-+	return getmntent_r(fp, &mntbuf, buf, BUFLEN);
-+}
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0004-klibc-mount-add-help-arg-for-usage.patch b/patches/klibc-1.5.15/0004-klibc-mount-add-help-arg-for-usage.patch
deleted file mode 100644
index 7b88084..0000000
--- a/patches/klibc-1.5.15/0004-klibc-mount-add-help-arg-for-usage.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From ccc39e2fb2b0133e56ba95217ee5ffed9ca901ac Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 09:18:27 +0200
-Subject: [PATCH 04/21] [klibc] mount: add help arg for usage()
-
-extract current usage() print out of main() and use it for help arg.
-as bonus alphabeticaly sort the arguments.
-
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/utils/mount_main.c |   30 ++++++++++++++++++------------
- 1 files changed, 18 insertions(+), 12 deletions(-)
-
-diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c
-index b5993cc..a15ae3d 100644
---- a/usr/utils/mount_main.c
-+++ b/usr/utils/mount_main.c
-@@ -15,6 +15,13 @@ char *progname;
- static struct extra_opts extra;
- static unsigned long rwflag;
- 
-+static __noreturn usage(void)
-+{
-+	fprintf(stderr, "Usage: %s [-r] [-w] [-o options] [-t type] [-f] [-i] "
-+		"[-n] device directory\n", progname);
-+	exit(1);
-+}
-+
- static int
- do_mount(char *dev, char *dir, char *type, unsigned long rwflag, void *data)
- {
-@@ -66,10 +73,18 @@ int main(int argc, char *argv[])
- 	rwflag = MS_VERBOSE;
- 
- 	do {
--		c = getopt(argc, argv, "no:rt:wfi");
-+		c = getopt(argc, argv, "fhino:rt:w");
- 		if (c == EOF)
- 			break;
- 		switch (c) {
-+		case 'f':
-+			/* we can't edit /etc/mtab yet anyway; exit */
-+			exit(0);
-+		case 'i':
-+			/* ignore for now; no support for mount helpers */
-+			break;
-+		case 'h':
-+			usage();
- 		case 'n':
- 			/* no mtab writing */
- 			break;
-@@ -85,12 +100,6 @@ int main(int argc, char *argv[])
- 		case 'w':
- 			rwflag &= ~MS_RDONLY;
- 			break;
--		case 'f':
--			/* we can't edit /etc/mtab yet anyway; exit */
--			exit(0);
--		case 'i':
--			/* ignore for now; no support for mount helpers */
--			break;
- 		case '?':
- 			fprintf(stderr, "%s: invalid option -%c\n",
- 				progname, optopt);
-@@ -105,11 +114,8 @@ int main(int argc, char *argv[])
- 	if (rwflag & MS_TYPE)
- 		type = "none";
- 
--	if (optind + 2 != argc || type == NULL) {
--		fprintf(stderr, "Usage: %s [-r] [-w] [-o options] [-t type] [-f] [-i] "
--			"[-n] device directory\n", progname);
--		exit(1);
--	}
-+	if (optind + 2 != argc || type == NULL)
-+		usage();
- 
- 	return do_mount(argv[optind], argv[optind + 1], type, rwflag,
- 			extra.str);
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0005-klibc-mount-list-all-mounted-file-systems.patch b/patches/klibc-1.5.15/0005-klibc-mount-list-all-mounted-file-systems.patch
deleted file mode 100644
index 3ce1a05..0000000
--- a/patches/klibc-1.5.15/0005-klibc-mount-list-all-mounted-file-systems.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From f33a64fe457ccfe74f5d993d025a71ebf7a417c4 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 22:02:21 +0200
-Subject: [PATCH 05/21] [klibc] mount: list all mounted file systems
-
-plain mount(8) invocation without arguments.
-
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/utils/mount_main.c |   32 ++++++++++++++++++++++++++++++++
- 1 files changed, 32 insertions(+), 0 deletions(-)
-
-diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c
-index a15ae3d..2616e46 100644
---- a/usr/utils/mount_main.c
-+++ b/usr/utils/mount_main.c
-@@ -7,9 +7,13 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <mntent.h>
- 
- #include "mount_opts.h"
- 
-+#define _PATH_MOUNTED		"/etc/mtab"
-+#define _PATH_PROC_MOUNTS	"/proc/mounts"
-+
- char *progname;
- 
- static struct extra_opts extra;
-@@ -22,6 +26,31 @@ static __noreturn usage(void)
- 	exit(1);
- }
- 
-+static __noreturn print_mount(void)
-+{
-+	FILE *mfp;
-+	struct mntent *mnt;
-+
-+	mfp = setmntent(_PATH_MOUNTED, "r");
-+	if (!mfp)
-+		mfp = setmntent(_PATH_PROC_MOUNTS, "r");
-+	if (!mfp)
-+		perror("setmntent");
-+
-+	while ((mnt = getmntent(mfp)) != NULL) {
-+		if (mnt->mnt_fsname && !strncmp(mnt->mnt_fsname, "no", 2))
-+			continue;
-+		printf("%s on %s", mnt->mnt_fsname, mnt->mnt_dir);
-+		if (mnt->mnt_type != NULL && mnt->mnt_type != '\0')
-+			printf (" type %s", mnt->mnt_type);
-+		if (mnt->mnt_opts != NULL && mnt->mnt_opts != '\0')
-+			printf (" (%s)", mnt->mnt_opts);
-+		printf("\n");
-+	}
-+	endmntent(mfp);
-+	exit(0);
-+}
-+
- static int
- do_mount(char *dev, char *dir, char *type, unsigned long rwflag, void *data)
- {
-@@ -114,6 +143,9 @@ int main(int argc, char *argv[])
- 	if (rwflag & MS_TYPE)
- 		type = "none";
- 
-+	if (optind == argc)
-+		print_mount();
-+
- 	if (optind + 2 != argc || type == NULL)
- 		usage();
- 
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0006-klibc-mount-list-fs-of-particular-type.patch b/patches/klibc-1.5.15/0006-klibc-mount-list-fs-of-particular-type.patch
deleted file mode 100644
index 27c21ab2..0000000
--- a/patches/klibc-1.5.15/0006-klibc-mount-list-fs-of-particular-type.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 8b2442a927d0141dbf06289d20486e0e631ebec7 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 22:13:21 +0200
-Subject: [PATCH 06/21] [klibc] mount: list fs of particular type
-
-makes possible: mount -t squashfs
-pass type of the fs down to print_mount().
-
-fixes http://bugs.debian.org/491067
-requested for casper live cd initramfs.
-
-Cc: Colin Watson <cjwatson@ubuntu.com>
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/utils/mount_main.c |   10 ++++++----
- 1 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c
-index 2616e46..89e75d7 100644
---- a/usr/utils/mount_main.c
-+++ b/usr/utils/mount_main.c
-@@ -26,7 +26,7 @@ static __noreturn usage(void)
- 	exit(1);
- }
- 
--static __noreturn print_mount(void)
-+static __noreturn print_mount(char *type)
- {
- 	FILE *mfp;
- 	struct mntent *mnt;
-@@ -40,6 +40,8 @@ static __noreturn print_mount(void)
- 	while ((mnt = getmntent(mfp)) != NULL) {
- 		if (mnt->mnt_fsname && !strncmp(mnt->mnt_fsname, "no", 2))
- 			continue;
-+		if (type && mnt->mnt_type && strcmp(type, mnt->mnt_type))
-+			continue;
- 		printf("%s on %s", mnt->mnt_fsname, mnt->mnt_dir);
- 		if (mnt->mnt_type != NULL && mnt->mnt_type != '\0')
- 			printf (" type %s", mnt->mnt_type);
-@@ -136,6 +138,9 @@ int main(int argc, char *argv[])
- 		}
- 	} while (1);
- 
-+	if (optind == argc)
-+		print_mount(type);
-+
- 	/*
- 	 * If remount, bind or move was specified, then we don't
- 	 * have a "type" as such.  Use the dummy "none" type.
-@@ -143,9 +148,6 @@ int main(int argc, char *argv[])
- 	if (rwflag & MS_TYPE)
- 		type = "none";
- 
--	if (optind == argc)
--		print_mount();
--
- 	if (optind + 2 != argc || type == NULL)
- 		usage();
- 
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0007-klibc-mount-read-proc-mounts-preferably.patch b/patches/klibc-1.5.15/0007-klibc-mount-read-proc-mounts-preferably.patch
deleted file mode 100644
index 0943b55..0000000
--- a/patches/klibc-1.5.15/0007-klibc-mount-read-proc-mounts-preferably.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6fa665bc70d5f87282a3518595e39cc6cac99050 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 22:18:09 +0200
-Subject: [PATCH 07/21] [klibc] mount: read /proc/mounts preferably
-
-as klibc mount doesn't write into /etc/mtab (no addmntent() too),
-better checkout the kernel view first.
-may be interchanged again later..
-
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/utils/mount_main.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c
-index 89e75d7..ee08720 100644
---- a/usr/utils/mount_main.c
-+++ b/usr/utils/mount_main.c
-@@ -31,9 +31,9 @@ static __noreturn print_mount(char *type)
- 	FILE *mfp;
- 	struct mntent *mnt;
- 
--	mfp = setmntent(_PATH_MOUNTED, "r");
-+	mfp = setmntent(_PATH_PROC_MOUNTS, "r");
- 	if (!mfp)
--		mfp = setmntent(_PATH_PROC_MOUNTS, "r");
-+		mfp = setmntent(_PATH_MOUNTED, "r");
- 	if (!mfp)
- 		perror("setmntent");
- 
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0008-klibc-ipconfig-raise-field-length-for-rootpath-DHCP-.patch b/patches/klibc-1.5.15/0008-klibc-ipconfig-raise-field-length-for-rootpath-DHCP-.patch
deleted file mode 100644
index 177602a..0000000
--- a/patches/klibc-1.5.15/0008-klibc-ipconfig-raise-field-length-for-rootpath-DHCP-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 848a8ce349331cd74021cc3b8ea43f9e47c14e50 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 22:38:22 +0200
-Subject: [PATCH 08/21] [klibc] ipconfig: raise field length for rootpath DHCP option
-
-ipconfig would cut off after 40 bytes, use 256 bytes.
-This is indeed way too short for dotted-decimal IP addresses
-up to 15 byes long and several NFS mount options.
-fixes http://bugs.debian.org/497800
-
-Reported-by: "Christopher Huhn, GSI" <C.Huhn@gsi.de>
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/kinit/ipconfig/netdev.h |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/netdev.h b/usr/kinit/ipconfig/netdev.h
-index fb6640a..1091943 100644
---- a/usr/kinit/ipconfig/netdev.h
-+++ b/usr/kinit/ipconfig/netdev.h
-@@ -4,7 +4,7 @@
- #include <sys/utsname.h>
- #include <net/if.h>
- 
--#define BPLEN		40
-+#define BPLEN		256
- #define FNLEN		128			/* from DHCP  RFC 2131 */
- 
- struct netdev {
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0009-klibc-ipconfig-set-null-ciaddr-on-DHCPREQUEST-during.patch b/patches/klibc-1.5.15/0009-klibc-ipconfig-set-null-ciaddr-on-DHCPREQUEST-during.patch
deleted file mode 100644
index c7a3f02..0000000
--- a/patches/klibc-1.5.15/0009-klibc-ipconfig-set-null-ciaddr-on-DHCPREQUEST-during.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From cfc8d649a959f845983aae4c0fc33a0a0c995c92 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 22:48:27 +0200
-Subject: [PATCH 09/21] [klibc] ipconfig: set null ciaddr on DHCPREQUEST during SELECTING state
-
-RFC 2131, Section 4.3.2 states:
-
-  Clients send DHCPREQUEST messages as follows:
-
-     o DHCPREQUEST generated during SELECTING state:
-
-        Client inserts the address of the selected server in 'server
-        identifier', 'ciaddr' MUST be zero, 'requested IP address' MUST be
-        filled in with the yiaddr value from the chosen DHCPOFFER.
-
-fixes: http://bugs.debian.org/497879
-
-my test dhcpd seem all not that picky, ipconfig worked before
-and after this RFC 2131 conformal change.
-
-Reported-by: Craig Bernstein <cbernstein@stanford.edu>
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/kinit/ipconfig/dhcp_proto.c |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
-index d4f2c09..21448f7 100644
---- a/usr/kinit/ipconfig/dhcp_proto.c
-+++ b/usr/kinit/ipconfig/dhcp_proto.c
-@@ -171,7 +171,8 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
- 	bootp.htype	= dev->hwtype;
- 	bootp.hlen	= dev->hwlen;
- 	bootp.xid	= dev->bootp.xid;
--	bootp.ciaddr	= dev->ip_addr;
-+	bootp.ciaddr	= INADDR_NONE;
-+	bootp.yiaddr	= dev->ip_addr;
- 	bootp.giaddr	= INADDR_ANY;
- 	bootp.secs	= htons(time(NULL) - dev->open_time);
- 	memcpy(bootp.chaddr, dev->hwaddr, 16);
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0010-klibc-1.5.15-released-next-version-is-1.5.16.patch b/patches/klibc-1.5.15/0010-klibc-1.5.15-released-next-version-is-1.5.16.patch
deleted file mode 100644
index 74e5a96..0000000
--- a/patches/klibc-1.5.15/0010-klibc-1.5.15-released-next-version-is-1.5.16.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 5b997526032903b38105db27550ef22a05ee1f5f Mon Sep 17 00:00:00 2001
-From: H. Peter Anvin <hpa@zytor.com>
-Date: Sun, 4 Jan 2009 19:29:33 +0000
-Subject: [PATCH 10/21] [klibc] 1.5.15 released, next version is 1.5.16
-
----
- usr/klibc/version |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/usr/klibc/version b/usr/klibc/version
-index f6ed435..0ed0610 100644
---- a/usr/klibc/version
-+++ b/usr/klibc/version
-@@ -1 +1 @@
--1.5.15
-+1.5.16
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0011-klibc-fix-must_inline-macro-in-klibc-compiler.h-for-.patch b/patches/klibc-1.5.15/0011-klibc-fix-must_inline-macro-in-klibc-compiler.h-for-.patch
deleted file mode 100644
index 63bb5ad..0000000
--- a/patches/klibc-1.5.15/0011-klibc-fix-must_inline-macro-in-klibc-compiler.h-for-.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 63237c6e7037a6058deadc92ddcbcb41c5d4c2f8 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Wed, 22 Jul 2009 03:09:29 -0400
-Subject: [PATCH 11/21] [klibc] fix must_inline macro in klibc/compiler.h for gcc-4.3
-
-Add __gnu_inline__ if we find __GNUC_STDC_INLINE__.
-
-See http://gcc.gnu.org/gcc-4.3/porting_to.html for details.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/include/klibc/compiler.h |    7 ++++++-
- 1 files changed, 6 insertions(+), 1 deletions(-)
-
-diff --git a/usr/include/klibc/compiler.h b/usr/include/klibc/compiler.h
-index 816a4ee..9dee742 100644
---- a/usr/include/klibc/compiler.h
-+++ b/usr/include/klibc/compiler.h
-@@ -24,7 +24,12 @@
- /* Use "extern inline" even in the gcc3+ case to avoid warnings in ctype.h */
- #ifdef __GNUC__
- # if __GNUC__ >= 3
--#  define __must_inline extern __inline__ __attribute__((always_inline))
-+#  ifdef __GNUC_STDC_INLINE__
-+#   define __must_inline extern __inline__ \
-+	__attribute__((__gnu_inline__,__always_inline__))
-+#  else
-+#   define __must_inline extern __inline__ __attribute__((__always_inline__))
-+#  endif
- # else
- #  define __must_inline extern __inline__
- # endif
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0012-ipconfig-omit-zero-length-DHCP-vendor_class_identifi.patch b/patches/klibc-1.5.15/0012-ipconfig-omit-zero-length-DHCP-vendor_class_identifi.patch
deleted file mode 100644
index 3ed8587..0000000
--- a/patches/klibc-1.5.15/0012-ipconfig-omit-zero-length-DHCP-vendor_class_identifi.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From b4bad5be5fa41416bf67fa1fba0624a0c541ea39 Mon Sep 17 00:00:00 2001
-From: Aron Griffis <agriffis@n01se.net>
-Date: Sun, 21 Jun 2009 22:40:17 -0400
-Subject: [PATCH 12/21] ipconfig: omit zero-length DHCP vendor_class_identifier
-
-If ipconfig is executed with -i "", omit the vendor class
-identifier from the DHCP discover/request rather than
-sending it empty.  This patch paves the way for more
-flexibility in the DHCP packet, particularly hostname
-request.
-
-Signed-off-by: Aron Griffis <agriffis@n01se.net>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/kinit/ipconfig/dhcp_proto.c |   31 +++++++++++++++++++++----------
- 1 files changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
-index d4f2c09..c127d39 100644
---- a/usr/kinit/ipconfig/dhcp_proto.c
-+++ b/usr/kinit/ipconfig/dhcp_proto.c
-@@ -51,22 +51,22 @@ static uint8_t dhcp_end[] = {
-    pokes at the internals */
- #define DHCP_IOV_LEN 6
- 
--static struct iovec dhcp_discover_iov[] = {
-+static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
- 	/* [0] = ip + udp header */
- 	/* [1] = bootp header */
- 	[2] = {dhcp_discover_hdr, sizeof(dhcp_discover_hdr)},
- 	[3] = {dhcp_params, sizeof(dhcp_params)},
--	/* [4] = DHCP vendor class */
--	[5] = {dhcp_end, sizeof(dhcp_end)}
-+	/* [4] = optional vendor class */
-+	/* [5] = {dhcp_end, sizeof(dhcp_end)} */
- };
- 
--static struct iovec dhcp_request_iov[] = {
-+static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
- 	/* [0] = ip + udp header */
- 	/* [1] = bootp header */
- 	[2] = {dhcp_request_hdr, sizeof(dhcp_request_hdr)},
- 	[3] = {dhcp_params, sizeof(dhcp_params)},
--	/* [4] = DHCP vendor class */
--	[5] = {dhcp_end, sizeof(dhcp_end)}
-+	/* [4] = optional vendor class */
-+	/* [5] = {dhcp_end, sizeof(dhcp_end)} */
- };
- 
- /*
-@@ -164,6 +164,7 @@ static int dhcp_recv(struct netdev *dev)
- static int dhcp_send(struct netdev *dev, struct iovec *vec)
- {
- 	struct bootp_hdr bootp;
-+	int i = 4;
- 
- 	memset(&bootp, 0, sizeof(struct bootp_hdr));
- 
-@@ -179,12 +180,22 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
- 	vec[1].iov_base	= &bootp;
- 	vec[1].iov_len	= sizeof(struct bootp_hdr);
- 
--	vec[4].iov_base = vendor_class_identifier;
--	vec[4].iov_len  = vendor_class_identifier_len;
--
- 	DEBUG(("xid %08x secs %d ", bootp.xid, ntohs(bootp.secs)));
- 
--	return packet_send(dev, vec, DHCP_IOV_LEN);
-+	if (vendor_class_identifier_len > 2) {
-+		vec[i].iov_base = vendor_class_identifier;
-+		vec[i].iov_len  = vendor_class_identifier_len;
-+		i++;
-+
-+		DEBUG(("vendor_class_identifier \"%.*s\" ", 
-+		       vendor_class_identifier_len-2, 
-+		       vendor_class_identifier+2));
-+	}
-+
-+	vec[i].iov_base = dhcp_end;
-+	vec[i].iov_len  = sizeof(dhcp_end);
-+
-+	return packet_send(dev, vec, i);
- }
- 
- /*
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0013-ipconfig-send-requested-hostname-in-DHCP-discover-re.patch b/patches/klibc-1.5.15/0013-ipconfig-send-requested-hostname-in-DHCP-discover-re.patch
deleted file mode 100644
index 214174c..0000000
--- a/patches/klibc-1.5.15/0013-ipconfig-send-requested-hostname-in-DHCP-discover-re.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 1f2b4e044a6a0fde32bc976e5ad6436035c84cec Mon Sep 17 00:00:00 2001
-From: Aron Griffis <agriffis@n01se.net>
-Date: Sun, 21 Jun 2009 22:40:17 -0400
-Subject: [PATCH 13/21] ipconfig: send requested hostname in DHCP discover/request
-
-If a hostname is requested, for example -d ::::foo::dhcp,
-then include the hostname in the DHCP discover/request.
-
-Signed-off-by: Aron Griffis <agriffis@n01se.net>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/kinit/ipconfig/dhcp_proto.c |   22 +++++++++++++++++++---
- usr/kinit/ipconfig/main.c       |    4 ++++
- usr/kinit/ipconfig/netdev.h     |    1 +
- 3 files changed, 24 insertions(+), 3 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
-index c127d39..775a5ca 100644
---- a/usr/kinit/ipconfig/dhcp_proto.c
-+++ b/usr/kinit/ipconfig/dhcp_proto.c
-@@ -49,7 +49,7 @@ static uint8_t dhcp_end[] = {
- 
- /* Both iovecs below have to have the same structure, since dhcp_send()
-    pokes at the internals */
--#define DHCP_IOV_LEN 6
-+#define DHCP_IOV_LEN 7
- 
- static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
- 	/* [0] = ip + udp header */
-@@ -57,7 +57,8 @@ static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
- 	[2] = {dhcp_discover_hdr, sizeof(dhcp_discover_hdr)},
- 	[3] = {dhcp_params, sizeof(dhcp_params)},
- 	/* [4] = optional vendor class */
--	/* [5] = {dhcp_end, sizeof(dhcp_end)} */
-+	/* [5] = optional hostname */
-+	/* [6] = {dhcp_end, sizeof(dhcp_end)} */
- };
- 
- static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
-@@ -66,7 +67,8 @@ static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
- 	[2] = {dhcp_request_hdr, sizeof(dhcp_request_hdr)},
- 	[3] = {dhcp_params, sizeof(dhcp_params)},
- 	/* [4] = optional vendor class */
--	/* [5] = {dhcp_end, sizeof(dhcp_end)} */
-+	/* [5] = optional hostname */
-+	/* [6] = {dhcp_end, sizeof(dhcp_end)} */
- };
- 
- /*
-@@ -164,6 +166,7 @@ static int dhcp_recv(struct netdev *dev)
- static int dhcp_send(struct netdev *dev, struct iovec *vec)
- {
- 	struct bootp_hdr bootp;
-+	char dhcp_hostname[SYS_NMLN+2];
- 	int i = 4;
- 
- 	memset(&bootp, 0, sizeof(struct bootp_hdr));
-@@ -192,6 +195,19 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
- 		       vendor_class_identifier+2));
- 	}
- 
-+	if (dev->reqhostname[0] != '\0') {
-+		int len = strlen(dev->reqhostname);
-+		dhcp_hostname[0] = 12;
-+		dhcp_hostname[1] = len;
-+		memcpy(dhcp_hostname+2, dev->reqhostname, len);
-+
-+		vec[i].iov_base = dhcp_hostname;
-+		vec[i].iov_len  = len+2;
-+		i++;
-+
-+		DEBUG(("hostname %.*s ", len, dhcp_hostname+2));
-+	}
-+
- 	vec[i].iov_base = dhcp_end;
- 	vec[i].iov_len  = sizeof(dhcp_end);
- 
-diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c
-index 2ded0f3..619edf7 100644
---- a/usr/kinit/ipconfig/main.c
-+++ b/usr/kinit/ipconfig/main.c
-@@ -522,6 +522,8 @@ static int parse_device(struct netdev *dev, const char *ip)
- 			case 4:
- 				strncpy(dev->hostname, ip, SYS_NMLN - 1);
- 				dev->hostname[SYS_NMLN - 1] = '\0';
-+				memcpy(dev->reqhostname, dev->hostname, 
-+				       SYS_NMLN);
- 				break;
- 			case 5:
- 				dev->name = ip;
-@@ -569,6 +571,8 @@ static void bringup_one_dev(struct netdev *template, struct netdev *dev)
- 		dev->ip_nameserver[1] = template->ip_nameserver[1];
- 	if (template->hostname[0] != '\0')
- 		strcpy(dev->hostname, template->hostname);
-+	if (template->reqhostname[0] != '\0')
-+		strcpy(dev->reqhostname, template->reqhostname);
- 	dev->caps &= template->caps;
- 
- 	bringup_device(dev);
-diff --git a/usr/kinit/ipconfig/netdev.h b/usr/kinit/ipconfig/netdev.h
-index fb6640a..a25a544 100644
---- a/usr/kinit/ipconfig/netdev.h
-+++ b/usr/kinit/ipconfig/netdev.h
-@@ -35,6 +35,7 @@ struct netdev {
- 	uint32_t ip_gateway;	/* my gateway           */
- 	uint32_t ip_nameserver[2];	/* two nameservers      */
- 	uint32_t serverid;		/* dhcp serverid        */
-+	char reqhostname[SYS_NMLN];	/* requested hostname   */
- 	char hostname[SYS_NMLN];	/* hostname             */
- 	char dnsdomainname[SYS_NMLN];	/* dns domain name      */
- 	char nisdomainname[SYS_NMLN];	/* nis domain name      */
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0014-klibc-use-headers_install-to-install-headers.patch b/patches/klibc-1.5.15/0014-klibc-use-headers_install-to-install-headers.patch
deleted file mode 100644
index a6663d8..0000000
--- a/patches/klibc-1.5.15/0014-klibc-use-headers_install-to-install-headers.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From dc5aff1731bc4708d3391311074f026690212f8d Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Thu, 16 Jul 2009 21:33:37 -0400
-Subject: [PATCH 14/21] [klibc] use headers_install to install headers
-
-Use headers_install to install headers.
-arch include directory has moved and it's better
-to ask the kernel Makefile to install the headers
-for us.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- scripts/Kbuild.install |   11 +----------
- 1 files changed, 1 insertions(+), 10 deletions(-)
-
-diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
-index 44c8f76..de918f0 100644
---- a/scripts/Kbuild.install
-+++ b/scripts/Kbuild.install
-@@ -95,16 +95,7 @@ header:
- 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
- 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
--	$(Q)set -e ; for d in linux asm asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \
--	  for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \
--	           $(KLIBCKERNELOBJ)/include2 ; do \
--	    [ ! -d $$r/$$d ] && continue; \
--	    mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \
--	    cp -rfL $$r/$$d/. \
--	          $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \
--	  done ; \
--	done
--	$(Q)cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(KLIBCARCH) asm
-+	$(Q)make -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
- 	$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
- 	$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
- 	$(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0015-klibc-utils-add-simple-ls.patch b/patches/klibc-1.5.15/0015-klibc-utils-add-simple-ls.patch
deleted file mode 100644
index 32b2249..0000000
--- a/patches/klibc-1.5.15/0015-klibc-utils-add-simple-ls.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-From f9f820a9fadbd8c6ff3e2dcba6b82ed5abc204ba Mon Sep 17 00:00:00 2001
-From: Alexey Gladkov <gladkov.alexey@gmail.com>
-Date: Sat, 30 May 2009 01:24:05 +0400
-Subject: [PATCH 15/21] [klibc] utils: add simple ls
-
-Simple utility to list information about a files. The utility which
-does the same thing as "ls -la". This is a useful test program.
-
-Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/utils/Kbuild |    4 +-
- usr/utils/ls.c   |  202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 205 insertions(+), 1 deletions(-)
- create mode 100644 usr/utils/ls.c
-
-diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
-index 5b6dc28..354a364 100644
---- a/usr/utils/Kbuild
-+++ b/usr/utils/Kbuild
-@@ -3,7 +3,7 @@
- #
- 
- progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
--progs += true false sleep ln nuke minips cat
-+progs += true false sleep ln nuke minips cat ls
- progs += uname halt kill readlink cpio sync dmesg
- 
- static-y := $(addprefix static/, $(progs))
-@@ -36,6 +36,8 @@ static/sleep-y      := sleep.o
- shared/sleep-y      := sleep.o
- static/ln-y         := ln.o
- shared/ln-y         := ln.o
-+static/ls-y         := ls.o
-+shared/ls-y         := ls.o
- static/nuke-y       := nuke.o
- shared/nuke-y       := nuke.o
- static/minips-y     := minips.o
-diff --git a/usr/utils/ls.c b/usr/utils/ls.c
-new file mode 100644
-index 0000000..859142a
---- /dev/null
-+++ b/usr/utils/ls.c
-@@ -0,0 +1,202 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <dirent.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-+#include <sys/sysmacros.h>
-+
-+#define STAT_ISSET(mode, mask) (((mode) & mask) == mask)
-+
-+static size_t max_linksiz = 128;
-+static int max_nlinks = 1;
-+static int max_size = 1;
-+static int max_uid = 1;
-+static int max_gid = 1;
-+static int max_min = 1;
-+static int max_maj = 1;
-+
-+static void do_preformat(const struct stat *st)
-+{
-+	int bytes;
-+
-+	if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_nlink)) > max_nlinks)
-+		max_nlinks = bytes;
-+
-+	if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_uid)) > max_uid)
-+		max_uid = bytes;
-+
-+	if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_gid)) > max_gid)
-+		max_gid = bytes;
-+
-+	if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
-+		if ((bytes = snprintf(NULL, 0, "%u", major(st->st_rdev))) > max_maj)
-+			max_maj = bytes;
-+
-+		if ((bytes = snprintf(NULL, 0, "%u", minor(st->st_rdev))) > max_min)
-+			max_min = bytes;
-+
-+		max_size = max_maj + max_min + 1;
-+	}
-+	else {
-+		if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_size)) > max_size)
-+			max_size = bytes;
-+	}
-+	return;
-+}
-+
-+static void do_stat(const struct stat *st, const char *path)
-+{
-+	char *fmt, *link_name;
-+	int rc;
-+
-+	switch (st->st_mode & S_IFMT) {
-+		case S_IFBLK:  putchar('b'); break;
-+		case S_IFCHR:  putchar('c'); break;
-+		case S_IFDIR:  putchar('d'); break;
-+		case S_IFIFO:  putchar('p'); break;
-+		case S_IFLNK:  putchar('l'); break;
-+		case S_IFSOCK: putchar('s'); break;
-+		case S_IFREG:  putchar('-'); break;
-+		default:       putchar('?'); break;
-+	}
-+	putchar(STAT_ISSET(st->st_mode, S_IRUSR) ? 'r' : '-');
-+	putchar(STAT_ISSET(st->st_mode, S_IWUSR) ? 'w' : '-');
-+
-+	!STAT_ISSET(st->st_mode, S_ISUID) ?
-+		putchar(STAT_ISSET(st->st_mode, S_IXUSR) ? 'x' : '-') :
-+		putchar('S');
-+
-+	putchar(STAT_ISSET(st->st_mode, S_IRGRP) ? 'r' : '-');
-+	putchar(STAT_ISSET(st->st_mode, S_IWGRP) ? 'w' : '-');
-+
-+	!STAT_ISSET(st->st_mode, S_ISGID) ?
-+		putchar(STAT_ISSET(st->st_mode, S_IXGRP) ? 'x' : '-') :
-+		putchar('S');
-+
-+	putchar(STAT_ISSET(st->st_mode, S_IROTH) ? 'r' : '-');
-+	putchar(STAT_ISSET(st->st_mode, S_IWOTH) ? 'w' : '-');
-+
-+	!STAT_ISSET(st->st_mode, S_ISVTX) ?
-+		putchar(STAT_ISSET(st->st_mode, S_IXOTH) ? 'x' : '-') :
-+		putchar(S_ISDIR(st->st_mode) ? 't' : 'T');
-+
-+	if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
-+		rc = asprintf(&fmt," %%%dju %%%dju %%%dju %%%du,%%%du %%s",
-+		              max_nlinks, max_uid, max_gid, max_maj, max_min);
-+		if (rc == -1) {
-+			perror("asprintf");
-+			exit(1);
-+		}
-+		fprintf(stdout, fmt,
-+			(uintmax_t) st->st_nlink,
-+			(uintmax_t) st->st_uid,
-+			(uintmax_t) st->st_gid,
-+			major(st->st_rdev),
-+			minor(st->st_rdev),
-+			path);
-+	}
-+	else {
-+		rc = asprintf(&fmt," %%%dju %%%dju %%%dju %%%dju %%s",
-+		              max_nlinks, max_uid, max_gid, max_size);
-+		if (rc == -1) {
-+			perror("asprintf");
-+			exit(1);
-+		}
-+		fprintf(stdout, fmt,
-+			(uintmax_t) st->st_nlink,
-+			(uintmax_t) st->st_uid,
-+			(uintmax_t) st->st_gid,
-+			(uintmax_t) st->st_size,
-+			path);
-+	}
-+	free(fmt);
-+
-+	if (S_ISLNK(st->st_mode)) {
-+		if ((link_name = malloc(max_linksiz)) == NULL) {
-+			perror("malloc");
-+			exit(1);
-+		}
-+		if ((rc = readlink(path, link_name, max_linksiz)) == -1) {
-+			free(link_name);
-+			perror("readlink");
-+			exit(1);
-+		}
-+		link_name[rc] = '\0';
-+		fprintf(stdout, " -> %s", link_name);
-+		free(link_name);
-+	}
-+
-+	putchar('\n');
-+	return;
-+}
-+
-+static void do_dir(const char *path, int preformat)
-+{
-+	DIR *dir;
-+	struct dirent *dent;
-+	struct stat st;
-+
-+	if (chdir(path) == -1) {
-+		perror(path);
-+		exit(1);
-+	}
-+
-+	if ((dir = opendir(path)) == NULL) {
-+		perror(path);
-+		exit(1);
-+	}
-+
-+	while ((dent = readdir(dir)) != NULL) {
-+		if (lstat(dent->d_name, &st)) {
-+			perror(dent->d_name);
-+			exit(1);
-+		}
-+		(preformat) ?
-+			do_preformat(&st) :
-+			do_stat(&st, dent->d_name);
-+	}
-+
-+	closedir(dir);
-+}
-+
-+int main(int argc, char *argv[])
-+{
-+	int i;
-+	struct stat st;
-+
-+	if (argc == 1) {
-+		do_dir(".", 1);
-+		do_dir(".", 0);
-+		return 0;
-+	}
-+
-+	for (i = 1; i < argc; i++) {
-+		if (argv[i][0] == '-' && argv[i][1] == 'h') {
-+			fprintf(stdout, "Usage: ls [-h] [FILE ...]\n");
-+			return 0;
-+		}
-+
-+		if (lstat(argv[i], &st)) {
-+			perror(argv[i]);
-+			exit(1);
-+		}
-+
-+		S_ISDIR(st.st_mode) ?
-+			do_dir(argv[i], 1) :
-+			do_preformat(&st);
-+	}
-+
-+	for (i = 1; i < argc; i++) {
-+		if (lstat(argv[i], &st)) {
-+			perror(argv[i]);
-+			exit(1);
-+		}
-+
-+		S_ISDIR(st.st_mode) ?
-+			do_dir(argv[i], 0) :
-+			do_stat(&st, argv[i]);
-+	}
-+
-+	return 0;
-+}
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0016-klibc-use-MAKE-instead-of-make-to-call-external-make.patch b/patches/klibc-1.5.15/0016-klibc-use-MAKE-instead-of-make-to-call-external-make.patch
deleted file mode 100644
index 482361c..0000000
--- a/patches/klibc-1.5.15/0016-klibc-use-MAKE-instead-of-make-to-call-external-make.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 38c10293b6c00202e8877bc48723b615783f2a00 Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Thu, 29 Oct 2009 11:00:44 +0100
-Subject: [PATCH 16/21] [klibc] use $(MAKE) instead of make to call external make
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- scripts/Kbuild.install |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
-index de918f0..370b54e 100644
---- a/scripts/Kbuild.install
-+++ b/scripts/Kbuild.install
-@@ -95,7 +95,7 @@ header:
- 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
- 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
--	$(Q)make -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
-+	$(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
- 	$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
- 	$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
- 	$(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0017-klibc-use-kernel-header-installed-by-headers_install.patch b/patches/klibc-1.5.15/0017-klibc-use-kernel-header-installed-by-headers_install.patch
deleted file mode 100644
index 315c2b4..0000000
--- a/patches/klibc-1.5.15/0017-klibc-use-kernel-header-installed-by-headers_install.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 7ed3a34dee03f6c0bd27e659e159f997b0d33a4c Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Mon, 5 Jan 2009 17:46:47 +0100
-Subject: [PATCH 17/21] [klibc] use kernel header installed by "headers_install"
-
-Originally klibc directly sets the compiler header search path
-directly into the kernel tree. This causes compilation to fail on modern
-kernel with a changed include dir layout.
-
-This patch uses the "headers_install" to extract the includes from the
-kernel. Against these headers klibc is build.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile             |    8 ++++++--
- scripts/Kbuild.klibc |    2 +-
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 136d4e8..965fbfd 100644
---- a/Makefile
-+++ b/Makefile
-@@ -3,6 +3,7 @@ SRCROOT = .
- # kbuild compatibility
- export srctree  := $(shell pwd)
- export objtree  := $(shell pwd)
-+export LINUX_HEADERS := $(objtree)/linux-headers
- export KLIBCSRC := usr/klibc
- export VERSION := $(shell cat $(KLIBCSRC)/version)
- export KLIBCINC := usr/include
-@@ -93,16 +94,19 @@ linux:
- 	@echo "configured for the $(KLIBCARCH) architecture."
- 	@false
- 
-+$(LINUX_HEADERS): linux
-+	$(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH="$@" headers_install
-+
- rpmbuild = $(shell which rpmbuild 2>/dev/null || which rpm)
- 
- klibc.spec: klibc.spec.in $(KLIBCSRC)/version
- 	sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
- 
- # Build klcc - it is the first target
--klcc: .config
-+klcc: .config $(LINUX_HEADERS)
- 	$(Q)$(MAKE) $(klibc)=klcc
- 
--klibc: .config
-+klibc: .config $(LINUX_HEADERS)
- 	$(Q)$(MAKE) $(klibc)=.
- 
- test: klibc
-diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
-index 227b9bd..5e5ac3d 100644
---- a/scripts/Kbuild.klibc
-+++ b/scripts/Kbuild.klibc
-@@ -103,7 +103,7 @@ KLIBCCPPFLAGS    := -nostdinc -iwithprefix include \
-                     -I$(KLIBCINC)
- # kernel include paths
- KLIBCKERNELSRC	 ?= $(srctree)/
--KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)include		\
-+KLIBCCPPFLAGS    += -I$(LINUX_HEADERS)/include		\
-                      $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)include2 -I$(KLIBCKERNELOBJ)include -I$(srctree)/include)    \
- 		     $(KLIBCARCHINCFLAGS)
- 
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0018-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch b/patches/klibc-1.5.15/0018-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
deleted file mode 100644
index 60f1d8f..0000000
--- a/patches/klibc-1.5.15/0018-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 6b24aece3e313aece16ce60255e918963b0905b3 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Thu, 29 Oct 2009 16:27:11 +0100
-Subject: [PATCH 18/21] Patch to add support for detection of vfat and jffs2 images.
-
-Obtained from openembedded:
-http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-[mkl: fixed compiler warnings]
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- usr/kinit/fstype/fstype.c |   22 ++++++++++++++++++++++
- 1 files changed, 22 insertions(+), 0 deletions(-)
-
-diff --git a/usr/kinit/fstype/fstype.c b/usr/kinit/fstype/fstype.c
-index 69e0e30..d06bcd1 100644
---- a/usr/kinit/fstype/fstype.c
-+++ b/usr/kinit/fstype/fstype.c
-@@ -59,6 +59,26 @@
- /* Swap needs the definition of block size */
- #include "swap_fs.h"
- 
-+static int jffs2_image(const void *buf, unsigned long long *bytes)
-+{
-+	const unsigned char *cbuf = buf;
-+
-+	if (cbuf[0] == 0x85 && cbuf[1] == 0x19)
-+		return 1;
-+
-+	return 0;
-+}
-+
-+static int vfat_image(const void *buf, unsigned long long *bytes)
-+{
-+	if (!strncmp(buf + 54, "FAT12   ", 8)
-+	    || !strncmp(buf + 54, "FAT16   ", 8)
-+	    || !strncmp(buf + 82, "FAT32   ", 8))
-+		return 1;
-+
-+	return 0;
-+}
-+
- static int gzip_image(const void *buf, unsigned long long *bytes)
- {
- 	const unsigned char *p = buf;
-@@ -492,6 +512,8 @@ static struct imagetype images[] = {
- 	{1, "minix", minix_image},
- 	{1, "nilfs2", nilfs2_image},
- 	{2, "ocfs2", ocfs2_image},
-+	{0, "jffs2", jffs2_image},
-+	{0, "vfat", vfat_image},
- 	{8, "reiserfs", reiserfs_image},
- 	{64, "reiserfs", reiserfs_image},
- 	{64, "reiser4", reiser4_image},
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0019-define-__socklen_t_defined.patch b/patches/klibc-1.5.15/0019-define-__socklen_t_defined.patch
deleted file mode 100644
index 8ea36cb..0000000
--- a/patches/klibc-1.5.15/0019-define-__socklen_t_defined.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 7199462a5dee51bf83db3ea6cc753b9864c26623 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Thu, 29 Oct 2009 16:27:13 +0100
-Subject: [PATCH 19/21] define "__socklen_t_defined"
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- usr/include/sys/socket.h |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/usr/include/sys/socket.h b/usr/include/sys/socket.h
-index 7d47087..d7d4ce4 100644
---- a/usr/include/sys/socket.h
-+++ b/usr/include/sys/socket.h
-@@ -28,6 +28,7 @@
- #endif
- 
- typedef int socklen_t;
-+#define __socklen_t_defined 1
- 
- __extern int socket(int, int, int);
- __extern int bind(int, struct sockaddr *, int);
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0020-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch b/patches/klibc-1.5.15/0020-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
deleted file mode 100644
index 09cbd2d..0000000
--- a/patches/klibc-1.5.15/0020-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From e3cbc39bf1a94056f4a4bbae0067109d0317e68b Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Thu, 29 Oct 2009 16:27:14 +0100
-Subject: [PATCH 20/21] fix warning include/signal.h:47:5: warning: "SIGRTMAX" is not defined
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- usr/include/signal.h |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/usr/include/signal.h b/usr/include/signal.h
-index a513282..4ed65bc 100644
---- a/usr/include/signal.h
-+++ b/usr/include/signal.h
-@@ -44,10 +44,12 @@ typedef int sig_atomic_t;
- /* The kernel header files are inconsistent whether or not
-    SIGRTMAX is inclusive or exclusive.  POSIX seems to state that
-    it's inclusive, however. */
-+#ifdef SIGRTMAX
- #if SIGRTMAX >= _NSIG
- # undef  SIGRTMAX
- # define SIGRTMAX (_NSIG-1)
- #endif
-+#endif
- 
- __extern const char *const sys_siglist[_NSIG];
- __extern const char *const sys_sigabbrev[_NSIG];
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0021-Fix-no-previous-prototype-__ctype_-warnings.patch b/patches/klibc-1.5.15/0021-Fix-no-previous-prototype-__ctype_-warnings.patch
deleted file mode 100644
index 328702c..0000000
--- a/patches/klibc-1.5.15/0021-Fix-no-previous-prototype-__ctype_-warnings.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From c4b9ce60a61d47a4f5244d7b86e8e30157149612 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Thu, 29 Oct 2009 16:27:16 +0100
-Subject: [PATCH 21/21] Fix no previous prototype __ctype_* warnings
-
-<...>/usr/lib/klibc/include/ctype.h:63: warning: no previous prototype for '__ctype_isascii'
-<...>/usr/lib/klibc/include/ctype.h:68: warning: no previous prototype for '__ctype_isblank'
-<...>/usr/lib/klibc/include/ctype.h:73: warning: no previous prototype for '__ctype_iscntrl'
-<...>/usr/lib/klibc/include/ctype.h:78: warning: no previous prototype for '__ctype_isdigit'
-<...>/usr/lib/klibc/include/ctype.h:83: warning: no previous prototype for '__ctype_isgraph'
-<...>/usr/lib/klibc/include/ctype.h:89: warning: no previous prototype for '__ctype_islower'
-<...>/usr/lib/klibc/include/ctype.h:94: warning: no previous prototype for '__ctype_isprint'
-<...>/usr/lib/klibc/include/ctype.h:99: warning: no previous prototype for '__ctype_ispunct'
-<...>/usr/lib/klibc/include/ctype.h:104: warning: no previous prototype for '__ctype_isspace'
-<...>/usr/lib/klibc/include/ctype.h:109: warning: no previous prototype for '__ctype_isupper'
-<...>/usr/lib/klibc/include/ctype.h:114: warning: no previous prototype for '__ctype_isxdigit'
-<...>/usr/lib/klibc/include/ctype.h:123: warning: no previous prototype for '__ctype_toupper'
-<...>/usr/lib/klibc/include/ctype.h:128: warning: no previous prototype for '__ctype_tolower'
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- usr/include/ctype.h |   16 ++++++++++++++++
- 1 files changed, 16 insertions(+), 0 deletions(-)
-
-diff --git a/usr/include/ctype.h b/usr/include/ctype.h
-index dfe1c46..ef7cac4 100644
---- a/usr/include/ctype.h
-+++ b/usr/include/ctype.h
-@@ -45,6 +45,22 @@ __extern int isxdigit(int);
- __extern int toupper(int);
- __extern int tolower(int);
- 
-+__must_inline int __ctype_isalnum(int);
-+__must_inline int __ctype_isalpha(int);
-+__must_inline int __ctype_isascii(int);
-+__must_inline int __ctype_isblank(int);
-+__must_inline int __ctype_iscntrl(int);
-+__must_inline int __ctype_isdigit(int);
-+__must_inline int __ctype_isgraph(int);
-+__must_inline int __ctype_islower(int);
-+__must_inline int __ctype_isprint(int);
-+__must_inline int __ctype_ispunct(int);
-+__must_inline int __ctype_isspace(int);
-+__must_inline int __ctype_isupper(int);
-+__must_inline int __ctype_isxdigit(int);
-+__must_inline int __ctype_toupper(int);
-+__must_inline int __ctype_tolower(int);
-+
- extern const unsigned char __ctypes[];
- 
- __must_inline int __ctype_isalnum(int __c)
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.15/0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch b/patches/klibc-1.5.15/0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch
deleted file mode 100644
index 18242fb..0000000
--- a/patches/klibc-1.5.15/0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e9e9c8de22d279face697eb50dd4d9b2f45b3b1d Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Fri, 30 Oct 2009 09:06:05 -0400
-Subject: [PATCH 22/22] define MNTPROC_MNT and MNTPROC_UMNT
-
-MNTPROC_MNT and MNTPROC_UMNT are no longer defined in linux-2.6.31
-Hack around this by restoring the old definitions.
-
-http://thread.gmane.org/gmane.linux.nfs/28059
-suggests that a better fix is in progress.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
----
- usr/kinit/nfsmount/mount.c |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/usr/kinit/nfsmount/mount.c b/usr/kinit/nfsmount/mount.c
-index a55af91..1182ae5 100644
---- a/usr/kinit/nfsmount/mount.c
-+++ b/usr/kinit/nfsmount/mount.c
-@@ -12,6 +12,11 @@
- #include "nfsmount.h"
- #include "sunrpc.h"
- 
-+#ifndef MNTPROC_MNT
-+#define MNTPROC_MNT  1
-+#define MNTPROC_UMNT 3
-+#endif
-+
- static uint32_t mount_port;
- 
- struct mount_call {
--- 
-1.6.5.rc2
-
diff --git a/patches/klibc-1.5.15/0023-Fix-assert-when-NDEBUG-defined.patch b/patches/klibc-1.5.15/0023-Fix-assert-when-NDEBUG-defined.patch
deleted file mode 100644
index 3d4b01b..0000000
--- a/patches/klibc-1.5.15/0023-Fix-assert-when-NDEBUG-defined.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b0ba8b95db106ce750d7c613c42ca1a700ba51cd Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Wed, 6 Jan 2010 14:11:52 -0500
-Subject: [PATCH 23/23] Fix assert when NDEBUG defined
-
-Don't use the parameter x in assert(x) if NDEBUG is defined to avoid any
-problems where (x) may contain symbols that are only defined if !NDEBUG
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
----
- usr/include/assert.h |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/usr/include/assert.h b/usr/include/assert.h
-index d89e082..e59ed94 100644
---- a/usr/include/assert.h
-+++ b/usr/include/assert.h
-@@ -9,7 +9,7 @@
- 
- #ifdef NDEBUG
- 
--#define assert(x) ((void)(x))
-+#define assert(x) ((void)(0))
- 
- #else
- 
--- 
-1.6.5.rc2
-
diff --git a/patches/klibc-1.5.15/0024-dummy-ferror.patch b/patches/klibc-1.5.15/0024-dummy-ferror.patch
deleted file mode 100644
index e562f76..0000000
--- a/patches/klibc-1.5.15/0024-dummy-ferror.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 95df20539dfea30562d9e63d2a3f3b913b134750 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Wed, 6 Jan 2010 16:36:49 -0500
-Subject: [PATCH 24/24] dummy ferror
-
-Stream errors are not being tracked, provide a dummy ferror()
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
----
- usr/include/stdio.h |    7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git a/usr/include/stdio.h b/usr/include/stdio.h
-index 1993f75..7d2c86d 100644
---- a/usr/include/stdio.h
-+++ b/usr/include/stdio.h
-@@ -115,6 +115,13 @@ static __inline__ int fflush(FILE * __f)
- 	return 0;
- }
- 
-+/* stream errors are not kept track of by klibc implementation */
-+static __inline__ int ferror(FILE * __f)
-+{
-+	(void)__f;
-+	return 0;
-+}
-+
- __extern int sscanf(const char *, const char *, ...);
- __extern int vsscanf(const char *, const char *, va_list);
- 
--- 
-1.6.5.rc2
-
diff --git a/patches/klibc-1.5.15/0025-Fix-arm-signals.patch b/patches/klibc-1.5.15/0025-Fix-arm-signals.patch
deleted file mode 100644
index ea81036..0000000
--- a/patches/klibc-1.5.15/0025-Fix-arm-signals.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From 364c64d88eebf21c3765d1a904f538e20c921e33 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Sun, 10 Jan 2010 19:55:50 -0500
-Subject: [PATCH 25/25] Fix arm signals
-
-Following example from usr/include/arch/i386/klibc/archsignal.h:
-
-The in-kernel headers for arm still have libc5
-crap in them.  Reconsider using <asm/signal.h>
-when/if it gets cleaned up; for now, duplicate
-the definitions here.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
----
- usr/include/arch/arm/klibc/archsignal.h |  112 ++++++++++++++++++++++++++++++-
- 1 files changed, 110 insertions(+), 2 deletions(-)
-
-diff --git a/usr/include/arch/arm/klibc/archsignal.h b/usr/include/arch/arm/klibc/archsignal.h
-index a589527..31a9f2b 100644
---- a/usr/include/arch/arm/klibc/archsignal.h
-+++ b/usr/include/arch/arm/klibc/archsignal.h
-@@ -8,7 +8,115 @@
- #ifndef _KLIBC_ARCHSIGNAL_H
- #define _KLIBC_ARCHSIGNAL_H
- 
--#include <asm/signal.h>
--/* No special stuff for this architecture */
-+/* The in-kernel headers for arm still have libc5
-+   crap in them.  Reconsider using <asm/signal.h>
-+   when/if it gets cleaned up; for now, duplicate
-+   the definitions here. */
-+
-+#define _NSIG           64
-+#define _NSIG_BPW       32
-+#define _NSIG_WORDS     (_NSIG / _NSIG_BPW)
-+
-+typedef struct {
-+	unsigned long sig[_NSIG_WORDS];
-+} sigset_t;
-+
-+#define SIGHUP		 1
-+#define SIGINT		 2
-+#define SIGQUIT		 3
-+#define SIGILL		 4
-+#define SIGTRAP		 5
-+#define SIGABRT		 6
-+#define SIGIOT		 6
-+#define SIGBUS		 7
-+#define SIGFPE		 8
-+#define SIGKILL		 9
-+#define SIGUSR1		10
-+#define SIGSEGV		11
-+#define SIGUSR2		12
-+#define SIGPIPE		13
-+#define SIGALRM		14
-+#define SIGTERM		15
-+#define SIGSTKFLT	16
-+#define SIGCHLD		17
-+#define SIGCONT		18
-+#define SIGSTOP		19
-+#define SIGTSTP		20
-+#define SIGTTIN		21
-+#define SIGTTOU		22
-+#define SIGURG		23
-+#define SIGXCPU		24
-+#define SIGXFSZ		25
-+#define SIGVTALRM	26
-+#define SIGPROF		27
-+#define SIGWINCH	28
-+#define SIGIO		29
-+#define SIGPOLL		SIGIO
-+/*
-+#define SIGLOST		29
-+*/
-+#define SIGPWR		30
-+#define SIGSYS		31
-+#define	SIGUNUSED	31
-+
-+/* These should not be considered constants from userland.  */
-+#define SIGRTMIN	32
-+#define SIGRTMAX	_NSIG
-+
-+#define SIGSWI		32
-+
-+/*
-+ * SA_FLAGS values:
-+ *
-+ * SA_NOCLDSTOP		flag to turn off SIGCHLD when children stop.
-+ * SA_NOCLDWAIT		flag on SIGCHLD to inhibit zombies.
-+ * SA_SIGINFO		deliver the signal with SIGINFO structs
-+ * SA_THIRTYTWO		delivers the signal in 32-bit mode, even if the task 
-+ *			is running in 26-bit.
-+ * SA_ONSTACK		allows alternate signal stacks (see sigaltstack(2)).
-+ * SA_RESTART		flag to get restarting signals (which were the default long ago)
-+ * SA_NODEFER		prevents the current signal from being masked in the handler.
-+ * SA_RESETHAND		clears the handler when the signal is delivered.
-+ *
-+ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
-+ * Unix names RESETHAND and NODEFER respectively.
-+ */
-+#define SA_NOCLDSTOP	0x00000001
-+#define SA_NOCLDWAIT	0x00000002
-+#define SA_SIGINFO	0x00000004
-+#define SA_THIRTYTWO	0x02000000
-+#define SA_RESTORER	0x04000000
-+#define SA_ONSTACK	0x08000000
-+#define SA_RESTART	0x10000000
-+#define SA_NODEFER	0x40000000
-+#define SA_RESETHAND	0x80000000
-+
-+#define SA_NOMASK	SA_NODEFER
-+#define SA_ONESHOT	SA_RESETHAND
-+
-+
-+/*
-+ * sigaltstack controls
-+ */
-+#define SS_ONSTACK	1
-+#define SS_DISABLE	2
-+
-+#define MINSIGSTKSZ	2048
-+#define SIGSTKSZ	8192
-+
-+#include <asm-generic/signal-defs.h>
-+
-+/* This uses gcc anonymous union support... */
-+struct siginfo;
-+
-+struct sigaction {
-+	union {
-+		__sighandler_t sa_handler;
-+		void (*sa_sigaction)(int, struct siginfo *, void *);
-+	};
-+	unsigned long	sa_flags;
-+	__sigrestore_t 	sa_restorer;
-+	sigset_t	sa_mask;
-+};
- 
- #endif
--- 
-1.6.5.rc2
-
diff --git a/patches/klibc-1.5.15/series b/patches/klibc-1.5.15/series
deleted file mode 100644
index 0825db7..0000000
--- a/patches/klibc-1.5.15/series
+++ /dev/null
@@ -1,25 +0,0 @@
-0001-klibc-add-strtok_r.patch
-0002-klibc-Add-initial-mntent.h-with-setmntent-and-endmnt.patch
-0003-klibc-add-getmntent.patch
-0004-klibc-mount-add-help-arg-for-usage.patch
-0005-klibc-mount-list-all-mounted-file-systems.patch
-0006-klibc-mount-list-fs-of-particular-type.patch
-0007-klibc-mount-read-proc-mounts-preferably.patch
-0008-klibc-ipconfig-raise-field-length-for-rootpath-DHCP-.patch
-0009-klibc-ipconfig-set-null-ciaddr-on-DHCPREQUEST-during.patch
-0010-klibc-1.5.15-released-next-version-is-1.5.16.patch
-0011-klibc-fix-must_inline-macro-in-klibc-compiler.h-for-.patch
-0012-ipconfig-omit-zero-length-DHCP-vendor_class_identifi.patch
-0013-ipconfig-send-requested-hostname-in-DHCP-discover-re.patch
-0014-klibc-use-headers_install-to-install-headers.patch
-0015-klibc-utils-add-simple-ls.patch
-0016-klibc-use-MAKE-instead-of-make-to-call-external-make.patch
-0017-klibc-use-kernel-header-installed-by-headers_install.patch
-0018-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
-0019-define-__socklen_t_defined.patch
-0020-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
-0021-Fix-no-previous-prototype-__ctype_-warnings.patch
-0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch
-0023-Fix-assert-when-NDEBUG-defined.patch
-0024-dummy-ferror.patch
-0025-Fix-arm-signals.patch
diff --git a/patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch b/patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
new file mode 100644
index 0000000..e9795b3
--- /dev/null
+++ b/patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
@@ -0,0 +1,60 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 5 Jan 2009 17:46:47 +0100
+Subject: [PATCH 17/21] [klibc] use kernel header installed by "headers_install"
+
+Originally klibc directly sets the compiler header search path
+directly into the kernel tree. This causes compilation to fail on modern
+kernel with a changed include dir layout.
+
+This patch uses the "headers_install" to extract the includes from the
+kernel. Against these headers klibc is build.
+
+Ported from 1.5.15
+
+Index: klibc-1.5.25/Makefile
+===================================================================
+--- klibc-1.5.25.orig/Makefile
++++ klibc-1.5.25/Makefile
+@@ -6,6 +6,7 @@ SRCROOT = .
+ # kbuild compatibility
+ export srctree  := $(shell pwd)
+ export objtree  := $(shell pwd)
++export LINUX_HEADERS := $(objtree)/linux-headers
+ export KLIBCSRC := usr/klibc
+ export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)
+ export KLIBCINC := usr/include
+@@ -102,16 +103,19 @@ $(KLIBCKERNELSRC):
+ 	@echo "KLIBCKERNELSRC=<path> to the build."
+ 	@false
+ 
++$(LINUX_HEADERS): linux
++	$(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH="$@" headers_install
++
+ rpmbuild = $(shell which rpmbuild 2>/dev/null || which rpm)
+ 
+ klibc.spec: klibc.spec.in $(KLIBCSRC)/version
+ 	sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
+ 
+ # Build klcc - it is the first target
+-klcc: $(objtree)/.config
++klcc: $(objtree)/.config  $(LINUX_HEADERS)
+ 	$(Q)$(MAKE) $(klibc)=klcc
+ 
+-klibc: $(objtree)/.config
++klibc: $(objtree)/.config  $(LINUX_HEADERS)
+ 	$(Q)$(MAKE) $(klibc)=.
+ 
+ test: klibc
+Index: klibc-1.5.25/scripts/Kbuild.klibc
+===================================================================
+--- klibc-1.5.25.orig/scripts/Kbuild.klibc
++++ klibc-1.5.25/scripts/Kbuild.klibc
+@@ -113,7 +113,7 @@ KLIBCCPPFLAGS    := -nostdinc -iwithpref
+ # kernel include paths
+ KLIBCKERNELSRC	 ?= $(srctree)
+ KLIBCKERNELOBJ	 ?= $(objtree)
+-KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)/include				    \
++KLIBCCPPFLAGS    += -I$(LINUX_HEADERS)/include				    \
+                      $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)/include2 	    \
+ 		       -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include)    \
+ 		     $(KLIBCARCHINCFLAGS)
diff --git a/patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch b/patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
new file mode 100644
index 0000000..60f1d8f
--- /dev/null
+++ b/patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
@@ -0,0 +1,58 @@
+From 6b24aece3e313aece16ce60255e918963b0905b3 Mon Sep 17 00:00:00 2001
+From: Jon Ringle <jon@ringle.org>
+Date: Thu, 29 Oct 2009 16:27:11 +0100
+Subject: [PATCH 18/21] Patch to add support for detection of vfat and jffs2 images.
+
+Obtained from openembedded:
+http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+[mkl: fixed compiler warnings]
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ usr/kinit/fstype/fstype.c |   22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+diff --git a/usr/kinit/fstype/fstype.c b/usr/kinit/fstype/fstype.c
+index 69e0e30..d06bcd1 100644
+--- a/usr/kinit/fstype/fstype.c
++++ b/usr/kinit/fstype/fstype.c
+@@ -59,6 +59,26 @@
+ /* Swap needs the definition of block size */
+ #include "swap_fs.h"
+ 
++static int jffs2_image(const void *buf, unsigned long long *bytes)
++{
++	const unsigned char *cbuf = buf;
++
++	if (cbuf[0] == 0x85 && cbuf[1] == 0x19)
++		return 1;
++
++	return 0;
++}
++
++static int vfat_image(const void *buf, unsigned long long *bytes)
++{
++	if (!strncmp(buf + 54, "FAT12   ", 8)
++	    || !strncmp(buf + 54, "FAT16   ", 8)
++	    || !strncmp(buf + 82, "FAT32   ", 8))
++		return 1;
++
++	return 0;
++}
++
+ static int gzip_image(const void *buf, unsigned long long *bytes)
+ {
+ 	const unsigned char *p = buf;
+@@ -492,6 +512,8 @@ static struct imagetype images[] = {
+ 	{1, "minix", minix_image},
+ 	{1, "nilfs2", nilfs2_image},
+ 	{2, "ocfs2", ocfs2_image},
++	{0, "jffs2", jffs2_image},
++	{0, "vfat", vfat_image},
+ 	{8, "reiserfs", reiserfs_image},
+ 	{64, "reiserfs", reiserfs_image},
+ 	{64, "reiser4", reiser4_image},
+-- 
+1.6.5
+
diff --git a/patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch b/patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
new file mode 100644
index 0000000..cf7814b
--- /dev/null
+++ b/patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
@@ -0,0 +1,17 @@
+From: Jon Ringle <jon@ringle.org>
+Subject: define "__socklen_t_defined"
+
+Port from 1.5.15
+
+Index: klibc-1.5.25/usr/include/sys/socket.h
+===================================================================
+--- klibc-1.5.25.orig/usr/include/sys/socket.h
++++ klibc-1.5.25/usr/include/sys/socket.h
+@@ -152,6 +152,7 @@ struct sockaddr {
+ 	char            sa_data[14];    /* 14 bytes of protocol address */
+ };
+ typedef int socklen_t;
++#define __socklen_t_defined 1
+ struct msghdr {
+ 	void *msg_name;
+ 	int msg_namelen;
diff --git a/patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch b/patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
new file mode 100644
index 0000000..09cbd2d
--- /dev/null
+++ b/patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
@@ -0,0 +1,31 @@
+From e3cbc39bf1a94056f4a4bbae0067109d0317e68b Mon Sep 17 00:00:00 2001
+From: Jon Ringle <jon@ringle.org>
+Date: Thu, 29 Oct 2009 16:27:14 +0100
+Subject: [PATCH 20/21] fix warning include/signal.h:47:5: warning: "SIGRTMAX" is not defined
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ usr/include/signal.h |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/usr/include/signal.h b/usr/include/signal.h
+index a513282..4ed65bc 100644
+--- a/usr/include/signal.h
++++ b/usr/include/signal.h
+@@ -44,10 +44,12 @@ typedef int sig_atomic_t;
+ /* The kernel header files are inconsistent whether or not
+    SIGRTMAX is inclusive or exclusive.  POSIX seems to state that
+    it's inclusive, however. */
++#ifdef SIGRTMAX
+ #if SIGRTMAX >= _NSIG
+ # undef  SIGRTMAX
+ # define SIGRTMAX (_NSIG-1)
+ #endif
++#endif
+ 
+ __extern const char *const sys_siglist[_NSIG];
+ __extern const char *const sys_sigabbrev[_NSIG];
+-- 
+1.6.5
+
diff --git a/patches/klibc-1.5.25/series b/patches/klibc-1.5.25/series
new file mode 100644
index 0000000..b4b9233
--- /dev/null
+++ b/patches/klibc-1.5.25/series
@@ -0,0 +1,4 @@
+0001-klibc-use-kernel-header-installed-by-headers_install.patch
+0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
+0003-define-__socklen_t_defined.patch
+0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
diff --git a/rules/klibc.make b/rules/klibc.make
index 89f75b1..1c7bd0f 100644
--- a/rules/klibc.make
+++ b/rules/klibc.make
@@ -18,8 +18,8 @@ PACKAGES-$(PTXCONF_KLIBC) += klibc
 #
 # Paths and names
 #
-KLIBC_VERSION	:= 1.5.15
-KLIBC_MD5 :=
+KLIBC_VERSION	:= 1.5.25
+KLIBC_MD5	:= 9ff935403b6f9193aaf52dc53769f290
 KLIBC		:= klibc-$(KLIBC_VERSION)
 KLIBC_SUFFIX	:= tar.gz
 KLIBC_SOURCE	:= $(SRCDIR)/$(KLIBC).$(KLIBC_SUFFIX)
-- 
1.7.3.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] klibc: bump 1.5.25
  2012-03-26 10:40 [ptxdist] [PATCH] klibc: bump 1.5.25 Alexander Stein
@ 2012-03-28  9:31 ` Michael Olbrich
  2012-03-28  9:51   ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2012-03-28  9:31 UTC (permalink / raw)
  To: ptxdist

On Mon, Mar 26, 2012 at 12:40:17PM +0200, Alexander Stein wrote:
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
>  patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch |   81 -------
>  ...nitial-mntent.h-with-setmntent-and-endmnt.patch |   84 -------
>  .../klibc-1.5.15/0003-klibc-add-getmntent.patch    |  117 ---------
>  .../0004-klibc-mount-add-help-arg-for-usage.patch  |   81 -------
>  ...klibc-mount-list-all-mounted-file-systems.patch |   75 ------
>  ...06-klibc-mount-list-fs-of-particular-type.patch |   62 -----
>  ...7-klibc-mount-read-proc-mounts-preferably.patch |   33 ---
>  ...fig-raise-field-length-for-rootpath-DHCP-.patch |   32 ---
>  ...fig-set-null-ciaddr-on-DHCPREQUEST-during.patch |   43 ----
>  ...bc-1.5.15-released-next-version-is-1.5.16.patch |   19 --
>  ...ust_inline-macro-in-klibc-compiler.h-for-.patch |   36 ---
>  ...it-zero-length-DHCP-vendor_class_identifi.patch |   88 -------
>  ...nd-requested-hostname-in-DHCP-discover-re.patch |  114 ---------
>  ...bc-use-headers_install-to-install-headers.patch |   41 ----
>  .../0015-klibc-utils-add-simple-ls.patch           |  249 --------------------
>  ...AKE-instead-of-make-to-call-external-make.patch |   26 --
>  ...ernel-header-installed-by-headers_install.patch |   68 ------
>  ...d-support-for-detection-of-vfat-and-jffs2.patch |   58 -----
>  .../0019-define-__socklen_t_defined.patch          |   26 --
>  ...-include-signal.h-47-5-warning-SIGRTMAX-i.patch |   31 ---
>  ...x-no-previous-prototype-__ctype_-warnings.patch |   55 -----
>  .../0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch |   35 ---
>  .../0023-Fix-assert-when-NDEBUG-defined.patch      |   29 ---
>  patches/klibc-1.5.15/0024-dummy-ferror.patch       |   33 ---
>  patches/klibc-1.5.15/0025-Fix-arm-signals.patch    |  142 -----------
>  patches/klibc-1.5.15/series                        |   25 --
>  ...ernel-header-installed-by-headers_install.patch |   60 +++++
>  ...d-support-for-detection-of-vfat-and-jffs2.patch |   58 +++++
>  .../0003-define-__socklen_t_defined.patch          |   17 ++
>  ...-include-signal.h-47-5-warning-SIGRTMAX-i.patch |   31 +++
>  patches/klibc-1.5.25/series                        |    4 +
>  rules/klibc.make                                   |    4 +-
>  32 files changed, 172 insertions(+), 1685 deletions(-)
>  delete mode 100644 patches/klibc-1.5.15/0001-klibc-add-strtok_r.patch
>  delete mode 100644 patches/klibc-1.5.15/0002-klibc-Add-initial-mntent.h-with-setmntent-and-endmnt.patch
>  delete mode 100644 patches/klibc-1.5.15/0003-klibc-add-getmntent.patch
>  delete mode 100644 patches/klibc-1.5.15/0004-klibc-mount-add-help-arg-for-usage.patch
>  delete mode 100644 patches/klibc-1.5.15/0005-klibc-mount-list-all-mounted-file-systems.patch
>  delete mode 100644 patches/klibc-1.5.15/0006-klibc-mount-list-fs-of-particular-type.patch
>  delete mode 100644 patches/klibc-1.5.15/0007-klibc-mount-read-proc-mounts-preferably.patch
>  delete mode 100644 patches/klibc-1.5.15/0008-klibc-ipconfig-raise-field-length-for-rootpath-DHCP-.patch
>  delete mode 100644 patches/klibc-1.5.15/0009-klibc-ipconfig-set-null-ciaddr-on-DHCPREQUEST-during.patch
>  delete mode 100644 patches/klibc-1.5.15/0010-klibc-1.5.15-released-next-version-is-1.5.16.patch
>  delete mode 100644 patches/klibc-1.5.15/0011-klibc-fix-must_inline-macro-in-klibc-compiler.h-for-.patch
>  delete mode 100644 patches/klibc-1.5.15/0012-ipconfig-omit-zero-length-DHCP-vendor_class_identifi.patch
>  delete mode 100644 patches/klibc-1.5.15/0013-ipconfig-send-requested-hostname-in-DHCP-discover-re.patch
>  delete mode 100644 patches/klibc-1.5.15/0014-klibc-use-headers_install-to-install-headers.patch
>  delete mode 100644 patches/klibc-1.5.15/0015-klibc-utils-add-simple-ls.patch
>  delete mode 100644 patches/klibc-1.5.15/0016-klibc-use-MAKE-instead-of-make-to-call-external-make.patch
>  delete mode 100644 patches/klibc-1.5.15/0017-klibc-use-kernel-header-installed-by-headers_install.patch
>  delete mode 100644 patches/klibc-1.5.15/0018-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
>  delete mode 100644 patches/klibc-1.5.15/0019-define-__socklen_t_defined.patch
>  delete mode 100644 patches/klibc-1.5.15/0020-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
>  delete mode 100644 patches/klibc-1.5.15/0021-Fix-no-previous-prototype-__ctype_-warnings.patch
>  delete mode 100644 patches/klibc-1.5.15/0022-define-MNTPROC_MNT-and-MNTPROC_UMNT.patch
>  delete mode 100644 patches/klibc-1.5.15/0023-Fix-assert-when-NDEBUG-defined.patch
>  delete mode 100644 patches/klibc-1.5.15/0024-dummy-ferror.patch
>  delete mode 100644 patches/klibc-1.5.15/0025-Fix-arm-signals.patch
>  delete mode 100644 patches/klibc-1.5.15/series
>  create mode 100644 patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
>  create mode 100644 patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
>  create mode 100644 patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
>  create mode 100644 patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
>  create mode 100644 patches/klibc-1.5.25/series

I assume you checked which patches are still necessary?

> diff --git a/patches/klibc-1.5.25/series b/patches/klibc-1.5.25/series
> new file mode 100644
> index 0000000..b4b9233
> --- /dev/null
> +++ b/patches/klibc-1.5.25/series
> @@ -0,0 +1,4 @@
> +0001-klibc-use-kernel-header-installed-by-headers_install.patch
> +0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
> +0003-define-__socklen_t_defined.patch
> +0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
> diff --git a/rules/klibc.make b/rules/klibc.make
> index 89f75b1..1c7bd0f 100644
> --- a/rules/klibc.make
> +++ b/rules/klibc.make
> @@ -18,8 +18,8 @@ PACKAGES-$(PTXCONF_KLIBC) += klibc
>  #
>  # Paths and names
>  #
> -KLIBC_VERSION	:= 1.5.15
> -KLIBC_MD5 :=
> +KLIBC_VERSION	:= 1.5.25
> +KLIBC_MD5	:= 9ff935403b6f9193aaf52dc53769f290
>  KLIBC		:= klibc-$(KLIBC_VERSION)
>  KLIBC_SUFFIX	:= tar.gz
>  KLIBC_SOURCE	:= $(SRCDIR)/$(KLIBC).$(KLIBC_SUFFIX)

Looks like this was broken for a long time. I usually don't merge version
updates this close to the release, but it's already broken, so if it
compiles for me...

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] klibc: bump 1.5.25
  2012-03-28  9:31 ` Michael Olbrich
@ 2012-03-28  9:51   ` Michael Olbrich
  2012-03-28 10:19     ` Alexander Stein
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2012-03-28  9:51 UTC (permalink / raw)
  To: ptxdist

On Wed, Mar 28, 2012 at 11:31:25AM +0200, Michael Olbrich wrote:
> On Mon, Mar 26, 2012 at 12:40:17PM +0200, Alexander Stein wrote:
> > Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> Looks like this was broken for a long time. I usually don't merge version
> updates this close to the release, but it's already broken, so if it
> compiles for me...

Ok, I pushed it. Btw, it klibc install some strange
/lib/klibc-jl85YaDPvnO7fFzDV5wTNFyn7ag.so, do you know why? I can't test
the old version, it fails to build here.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] klibc: bump 1.5.25
  2012-03-28  9:51   ` Michael Olbrich
@ 2012-03-28 10:19     ` Alexander Stein
  2012-03-28 10:34       ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stein @ 2012-03-28 10:19 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

Hello,

Am Mittwoch, 28. März 2012, 11:51:42 schrieb Michael Olbrich:
> On Wed, Mar 28, 2012 at 11:31:25AM +0200, Michael Olbrich wrote:
> > On Mon, Mar 26, 2012 at 12:40:17PM +0200, Alexander Stein wrote:
> > > Signed-off-by: Alexander Stein
> > > <alexander.stein@systec-electronic.com>
> > 
> > Looks like this was broken for a long time. I usually don't merge
> > version
> > updates this close to the release, but it's already broken, so if it
> > compiles for me...
> 
> Ok, I pushed it. Btw, it klibc install some strange
> /lib/klibc-jl85YaDPvnO7fFzDV5wTNFyn7ag.so, do you know why? I can't test
> the old version, it fails to build here.

I noticed this also, but have no idea where this come from. Yes, it seems the 
older version breaks due to new kernel header version.

To your other question about the patches: I skipped those patches which are 
already included in klibc and kept those where I think they are still needed.

Best regards,
Alexander
-- 
Dipl.-Inf. Alexander Stein

SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz

Tel: +49-3661-6279-0, Fax: +49-3661-6279-99
eMail:    Alexander.Stein@systec-electronic.com
Internet: http://www.systec-electronic.com

Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Jena, HRB 205563

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] klibc: bump 1.5.25
  2012-03-28 10:19     ` Alexander Stein
@ 2012-03-28 10:34       ` Michael Olbrich
  2012-03-28 11:51         ` Alexander Stein
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2012-03-28 10:34 UTC (permalink / raw)
  To: ptxdist

On Wed, Mar 28, 2012 at 12:19:38PM +0200, Alexander Stein wrote:
> Hello,
> 
> Am Mittwoch, 28. März 2012, 11:51:42 schrieb Michael Olbrich:
> > On Wed, Mar 28, 2012 at 11:31:25AM +0200, Michael Olbrich wrote:
> > > On Mon, Mar 26, 2012 at 12:40:17PM +0200, Alexander Stein wrote:
> > > > Signed-off-by: Alexander Stein
> > > > <alexander.stein@systec-electronic.com>
> > > 
> > > Looks like this was broken for a long time. I usually don't merge
> > > version
> > > updates this close to the release, but it's already broken, so if it
> > > compiles for me...
> > 
> > Ok, I pushed it. Btw, it klibc install some strange
> > /lib/klibc-jl85YaDPvnO7fFzDV5wTNFyn7ag.so, do you know why? I can't test
> > the old version, it fails to build here.
> 
> I noticed this also, but have no idea where this come from. Yes, it seems the 
> older version breaks due to new kernel header version.

Do you have anything that links to klibc? There is an identical klibc.so as
well. Des it still work if you install that one instead?

> To your other question about the patches: I skipped those patches which are 
> already included in klibc and kept those where I think they are still needed.

Great.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] klibc: bump 1.5.25
  2012-03-28 10:34       ` Michael Olbrich
@ 2012-03-28 11:51         ` Alexander Stein
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Stein @ 2012-03-28 11:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

Am Mittwoch, 28. März 2012, 12:34:08 schrieb Michael Olbrich:
> On Wed, Mar 28, 2012 at 12:19:38PM +0200, Alexander Stein wrote:
> > Hello,
> > 
> > Am Mittwoch, 28. März 2012, 11:51:42 schrieb Michael Olbrich:
> > > On Wed, Mar 28, 2012 at 11:31:25AM +0200, Michael Olbrich wrote:
> > > > On Mon, Mar 26, 2012 at 12:40:17PM +0200, Alexander Stein wrote:
> > > > > Signed-off-by: Alexander Stein
> > > > > <alexander.stein@systec-electronic.com>
> > > > 
> > > > Looks like this was broken for a long time. I usually don't
> > > > merge
> > > > version
> > > > updates this close to the release, but it's already broken, so
> > > > if it
> > > > compiles for me...
> > > 
> > > Ok, I pushed it. Btw, it klibc install some strange
> > > /lib/klibc-jl85YaDPvnO7fFzDV5wTNFyn7ag.so, do you know why? I can't
> > > test the old version, it fails to build here.
> > 
> > I noticed this also, but have no idea where this come from. Yes, it
> > seems the older version breaks due to new kernel header version.
> 
> Do you have anything that links to klibc? There is an identical klibc.so as
> well. Des it still work if you install that one instead?

No, i linked my application statically.

Regards,
Alexander
-- 
Dipl.-Inf. Alexander Stein

SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz

Tel: +49-3661-6279-0, Fax: +49-3661-6279-99
eMail:    Alexander.Stein@systec-electronic.com
Internet: http://www.systec-electronic.com

Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Jena, HRB 205563

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-28 11:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-26 10:40 [ptxdist] [PATCH] klibc: bump 1.5.25 Alexander Stein
2012-03-28  9:31 ` Michael Olbrich
2012-03-28  9:51   ` Michael Olbrich
2012-03-28 10:19     ` Alexander Stein
2012-03-28 10:34       ` Michael Olbrich
2012-03-28 11:51         ` Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox