summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Ringle <jon@ringle.org>2011-05-24 12:19:31 -0400
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-05-27 19:51:09 +0200
commit344a9c9079126993b6ddf549c8c6c8e1e2d23ebc (patch)
treecec8f35850115491045700bd1ee73f863ee3b1ca
parent436c6e6a938a44ab728c83b01ba2bb314b986cc7 (diff)
downloadptxdist-344a9c9079126993b6ddf549c8c6c8e1e2d23ebc.tar.gz
ptxdist-344a9c9079126993b6ddf549c8c6c8e1e2d23ebc.tar.xz
util-linux: patches to fix compile w/ uclibc toolchain
Added these patches that fix problems when building with uclibc toolchain: 0002-__progname-redefinition-fix.patch 0003-_s-undeclared-fix.patch 0004-replace-index-with-strchr.patch 0005-libmount-replace-mkostmps-with-more-portable-mkstemp.patch 0006-partx-lsblk-fix-gettext-calls.patch Signed-off-by: Jon Ringle <jon@ringle.org> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch3
-rw-r--r--patches/util-linux-2.19/0002-__progname-redefinition-fix.patch61
-rw-r--r--patches/util-linux-2.19/0003-_s-undeclared-fix.patch32
-rw-r--r--patches/util-linux-2.19/0004-replace-index-with-strchr.patch36
-rw-r--r--patches/util-linux-2.19/0005-libmount-replace-mkostmps-with-more-portable-mkstemp.patch63
-rw-r--r--patches/util-linux-2.19/0006-partx-lsblk-fix-gettext-calls.patch40
-rw-r--r--patches/util-linux-2.19/series7
7 files changed, 240 insertions, 2 deletions
diff --git a/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch b/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
index c7299f3fe..90f6bf90b 100644
--- a/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
+++ b/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
@@ -1,4 +1,3 @@
-From db9bd703a9a696bd73cb7d41e98c66854a604477 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Fri, 11 Feb 2011 10:45:09 +0100
Subject: [PATCH] libmount: add fallbacks for old systems without umount2() syscall
@@ -49,5 +48,5 @@ index bd9be69..1187a87 100644
{
int rc;
--
-1.7.2.3
+1.7.0.4
diff --git a/patches/util-linux-2.19/0002-__progname-redefinition-fix.patch b/patches/util-linux-2.19/0002-__progname-redefinition-fix.patch
new file mode 100644
index 000000000..111538e8d
--- /dev/null
+++ b/patches/util-linux-2.19/0002-__progname-redefinition-fix.patch
@@ -0,0 +1,61 @@
+From: Jon Ringle <jon@ringle.org>
+Date: Thu, 21 Apr 2011 17:08:15 -0400
+Subject: [PATCH] __progname redefinition fix
+
+Problem occurs with uclibc errno.h header
+
+In file included from ../include/writeall.h:7,
+ from swaplabel.c:35:
+/opt/crosstool-ng-1.9.0/arm-1136j-linux-uclibcgnueabi/gcc-4.4.5-uClibc-0.9.30.2-binutils-2.20.1-kernel-2.6.32.25-sanitized/arm-1136j-linux-uclibcgnueabi//sys-root/usr/include/errno.h:55: error: conflicting types for '__progname'
+../include/c.h:118: note: previous declaration of '__progname' was here
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ disk-utils/swaplabel.c | 2 +-
+ lib/tt.c | 1 +
+ shlibs/mount/src/cache.c | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c
+index 9dc20b4..28990a7 100644
+--- a/disk-utils/swaplabel.c
++++ b/disk-utils/swaplabel.c
+@@ -30,8 +30,8 @@
+ # endif
+ #endif
+
+-#include "c.h"
+ #include "writeall.h"
++#include "c.h"
+ #include "swapheader.h"
+ #include "strutils.h"
+ #include "nls.h"
+diff --git a/lib/tt.c b/lib/tt.c
+index 3bcdea9..198210c 100644
+--- a/lib/tt.c
++++ b/lib/tt.c
+@@ -15,6 +15,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <termios.h>
++#include <errno.h>
+ #ifdef HAVE_SYS_IOCTL_H
+ #include <sys/ioctl.h>
+ #endif
+diff --git a/shlibs/mount/src/cache.c b/shlibs/mount/src/cache.c
+index e0641c1..40613e2 100644
+--- a/shlibs/mount/src/cache.c
++++ b/shlibs/mount/src/cache.c
+@@ -25,8 +25,8 @@
+ #include <fcntl.h>
+ #include <blkid.h>
+
+-#include "canonicalize.h"
+ #include "mountP.h"
++#include "canonicalize.h"
+
+ /*
+ * Canonicalized (resolved) paths & tags cache
+--
+1.7.0.4
+
diff --git a/patches/util-linux-2.19/0003-_s-undeclared-fix.patch b/patches/util-linux-2.19/0003-_s-undeclared-fix.patch
new file mode 100644
index 000000000..e89aab476
--- /dev/null
+++ b/patches/util-linux-2.19/0003-_s-undeclared-fix.patch
@@ -0,0 +1,32 @@
+From: Jon Ringle <jon@ringle.org>
+Date: Thu, 21 Apr 2011 17:44:28 -0400
+Subject: [PATCH] _s undeclared fix
+
+tt.c: In function 'recount_widths':
+tt.c:398: error: '_s' undeclared (first use in this function)
+tt.c:398: error: (Each undeclared identifier is reported only once
+tt.c:398: error: for each function it appears in.)
+tt.c: In function 'print_data':
+tt.c:508: error: '_s' undeclared (first use in this function)
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ lib/tt.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lib/tt.c b/lib/tt.c
+index 198210c..328b9d7 100644
+--- a/lib/tt.c
++++ b/lib/tt.c
+@@ -52,7 +52,7 @@ static const struct tt_symbols utf8_tt_symbols = {
+ };
+
+ #else /* !HAVE_WIDECHAR */
+-# define mbs_width strlen(_s)
++# define mbs_width(_s) strlen(_s)
+ #endif /* !HAVE_WIDECHAR */
+
+ #define is_last_column(_tb, _cl) \
+--
+1.7.0.4
+
diff --git a/patches/util-linux-2.19/0004-replace-index-with-strchr.patch b/patches/util-linux-2.19/0004-replace-index-with-strchr.patch
new file mode 100644
index 000000000..ed80c0e54
--- /dev/null
+++ b/patches/util-linux-2.19/0004-replace-index-with-strchr.patch
@@ -0,0 +1,36 @@
+From: Jon Ringle <jon@ringle.org>
+Date: Tue, 24 May 2011 12:14:09 -0400
+Subject: [PATCH] replace index with strchr
+
+index is deprecated and not available in uclibc
+replace with strchr
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ shlibs/mount/src/tab_parse.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/shlibs/mount/src/tab_parse.c b/shlibs/mount/src/tab_parse.c
+index 4eb32eb..a2cd30f 100644
+--- a/shlibs/mount/src/tab_parse.c
++++ b/shlibs/mount/src/tab_parse.c
+@@ -272,14 +272,14 @@ static int mnt_table_parse_next(struct libmnt_table *tb, FILE *f, struct libmnt_
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ return -EINVAL;
+ ++*nlines;
+- s = index (buf, '\n');
++ s = strchr (buf, '\n');
+ if (!s) {
+ /* Missing final newline? Otherwise extremely */
+ /* long line - assume file was corrupted */
+ if (feof(f)) {
+ DBG(TAB, mnt_debug_h(tb,
+ "%s: no final newline", filename));
+- s = index (buf, '\0');
++ s = strchr (buf, '\0');
+ } else {
+ DBG(TAB, mnt_debug_h(tb,
+ "%s:%d: missing newline at line",
+--
+1.7.0.4
+
diff --git a/patches/util-linux-2.19/0005-libmount-replace-mkostmps-with-more-portable-mkstemp.patch b/patches/util-linux-2.19/0005-libmount-replace-mkostmps-with-more-portable-mkstemp.patch
new file mode 100644
index 000000000..7f350bc3a
--- /dev/null
+++ b/patches/util-linux-2.19/0005-libmount-replace-mkostmps-with-more-portable-mkstemp.patch
@@ -0,0 +1,63 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Fri, 11 Feb 2011 10:18:00 +0100
+Subject: [PATCH] libmount: replace mkostmps() with more portable mkstemp()
+
+Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ shlibs/mount/src/mountP.h | 2 +-
+ shlibs/mount/src/tab_update.c | 2 +-
+ shlibs/mount/src/utils.c | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/shlibs/mount/src/mountP.h b/shlibs/mount/src/mountP.h
+index aeceb7f..71314a5 100644
+--- a/shlibs/mount/src/mountP.h
++++ b/shlibs/mount/src/mountP.h
+@@ -118,7 +118,7 @@ extern int mnt_in_group(gid_t gid);
+
+ extern char *mnt_get_mountpoint(const char *path);
+ extern char *mnt_get_fs_root(const char *path, const char *mountpoint);
+-extern int mnt_open_uniq_filename(const char *filename, char **name, int flags);
++extern int mnt_open_uniq_filename(const char *filename, char **name);
+ extern int mnt_has_regular_utab(const char **utab, int *writable);
+ extern const char *mnt_get_utab_path(void);
+
+diff --git a/shlibs/mount/src/tab_update.c b/shlibs/mount/src/tab_update.c
+index a0f99f1..6b7b4be 100644
+--- a/shlibs/mount/src/tab_update.c
++++ b/shlibs/mount/src/tab_update.c
+@@ -561,7 +561,7 @@ static int update_table(struct libmnt_update *upd, struct libmnt_table *tb)
+
+ DBG(UPDATE, mnt_debug_h(upd, "%s: updating", upd->filename));
+
+- fd = mnt_open_uniq_filename(upd->filename, &uq, O_WRONLY);
++ fd = mnt_open_uniq_filename(upd->filename, &uq);
+ if (fd < 0)
+ return fd; /* error */
+
+diff --git a/shlibs/mount/src/utils.c b/shlibs/mount/src/utils.c
+index cb0ed1c..b02b6fe 100644
+--- a/shlibs/mount/src/utils.c
++++ b/shlibs/mount/src/utils.c
+@@ -642,7 +642,7 @@ const char *mnt_get_utab_path(void)
+
+ /* returns file descriptor or -errno, @name returns uniques filename
+ */
+-int mnt_open_uniq_filename(const char *filename, char **name, int flags)
++int mnt_open_uniq_filename(const char *filename, char **name)
+ {
+ int rc, fd;
+ char *n;
+@@ -656,7 +656,7 @@ int mnt_open_uniq_filename(const char *filename, char **name, int flags)
+ if (rc <= 0)
+ return -errno;
+
+- fd = mkostemp(n, flags | O_EXCL);
++ fd = mkstemp(n);
+ if (fd >= 0 && name)
+ *name = n;
+ else
+--
+1.7.0.4
+
diff --git a/patches/util-linux-2.19/0006-partx-lsblk-fix-gettext-calls.patch b/patches/util-linux-2.19/0006-partx-lsblk-fix-gettext-calls.patch
new file mode 100644
index 000000000..ca16c3a5c
--- /dev/null
+++ b/patches/util-linux-2.19/0006-partx-lsblk-fix-gettext-calls.patch
@@ -0,0 +1,40 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Fri, 11 Feb 2011 09:06:27 +0100
+Subject: [PATCH] partx, lsblk: fix gettext calls
+
+Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ misc-utils/lsblk.c | 2 +-
+ partx/partx.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index 44358fd..b07bfb4 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -871,7 +871,7 @@ static void __attribute__((__noreturn__)) help(FILE *out)
+ fprintf(out, _("\nAvailable columns:\n"));
+
+ for (i = 0; i < __NCOLUMNS; i++)
+- fprintf(out, " %10s %s\n", infos[i].name, gettext(infos[i].help));
++ fprintf(out, " %10s %s\n", infos[i].name, _(infos[i].help));
+
+ fprintf(out, _("\nFor more information see lsblk(8).\n"));
+
+diff --git a/partx/partx.c b/partx/partx.c
+index efb627f..a65586f 100644
+--- a/partx/partx.c
++++ b/partx/partx.c
+@@ -615,7 +615,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
+ fprintf(out, _("\nAvailable columns (for --show):\n"));
+
+ for (i = 0; i < __NCOLUMNS; i++)
+- fprintf(out, " %10s %s\n", infos[i].name, gettext(infos[i].help));
++ fprintf(out, " %10s %s\n", infos[i].name, _(infos[i].help));
+
+ fprintf(out, _("\nFor more information see partx(8).\n"));
+
+--
+1.7.0.4
+
diff --git a/patches/util-linux-2.19/series b/patches/util-linux-2.19/series
index 7a6959d5e..5ba6e1578 100644
--- a/patches/util-linux-2.19/series
+++ b/patches/util-linux-2.19/series
@@ -1 +1,8 @@
+# generated by git-ptx-patches
0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
+0002-__progname-redefinition-fix.patch
+0003-_s-undeclared-fix.patch
+0004-replace-index-with-strchr.patch
+0005-libmount-replace-mkostmps-with-more-portable-mkstemp.patch
+0006-partx-lsblk-fix-gettext-calls.patch
+# 46107b4447bfd6ffdcda93e37657e575 - git-ptx-patches magic