util-linux: update to 2.25.2
[openwrt/openwrt.git] / package / utils / util-linux / patches / 001-no-printf-alloc.patch
index e3f048ab3c1dbfdd0434207a8cbb4112a4b785d4..ad9eef0959bf0c8ce269e8039d4d05ef58e1d527 100644 (file)
@@ -1,17 +1,13 @@
-for systems that don't support latest POSIX standard: %as
-
-https://bugs.gentoo.org/406303
-
 --- a/configure.ac
 +++ b/configure.ac
-@@ -688,7 +688,6 @@ AC_ARG_ENABLE([libmount],
+@@ -798,7 +798,6 @@ AC_ARG_ENABLE([libmount],
+ )
  UL_BUILD_INIT([libmount])
- UL_REQUIRES_LINUX([libmount])
  UL_REQUIRES_BUILD([libmount], [libblkid])
 -UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
- AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
+ AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
+ AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
  
- AC_SUBST([LIBMOUNT_VERSION])
 --- a/libmount/src/tab_parse.c
 +++ b/libmount/src/tab_parse.c
 @@ -22,6 +22,10 @@
@@ -22,10 +18,10 @@ https://bugs.gentoo.org/406303
 +# define UL_SCNsA "%s"
 +#endif
 +
- static inline char *skip_spaces(char *s)
+ static int next_number(char **s, int *num)
  {
-       assert(s);
-@@ -61,16 +65,31 @@ static int mnt_parse_table_line(struct l
+       char *end = NULL;
+@@ -52,16 +56,31 @@ static int mnt_parse_table_line(struct l
        int rc, n = 0, xrc;
        char *src = NULL, *fstype = NULL, *optstr = NULL;
  
@@ -57,7 +53,7 @@ https://bugs.gentoo.org/406303
                        &n);
        xrc = rc;
  
-@@ -136,6 +155,16 @@ static int mnt_parse_mountinfo_line(stru
+@@ -127,6 +146,16 @@ static int mnt_parse_mountinfo_line(stru
        unsigned int maj, min;
        char *fstype = NULL, *src = NULL, *p;
  
@@ -71,10 +67,10 @@ https://bugs.gentoo.org/406303
 +      src = malloc(len);
 +#endif
 +
-       rc = sscanf(s,  "%u "           /* (1) id */
-                       "%u "           /* (2) parent */
+       rc = sscanf(s,  "%d "           /* (1) id */
+                       "%d "           /* (2) parent */
                        "%u:%u "        /* (3) maj:min */
-@@ -147,9 +176,15 @@ static int mnt_parse_mountinfo_line(stru
+@@ -138,9 +167,15 @@ static int mnt_parse_mountinfo_line(stru
                        &fs->id,
                        &fs->parent,
                        &maj, &min,
@@ -90,7 +86,7 @@ https://bugs.gentoo.org/406303
                        &end);
  
        if (rc >= 7 && end > 0)
-@@ -167,9 +202,15 @@ static int mnt_parse_mountinfo_line(stru
+@@ -160,9 +195,15 @@ static int mnt_parse_mountinfo_line(stru
                        UL_SCNsA" "     /* (9) source */
                        UL_SCNsA,       /* (10) fs options (fs specific) */
  
@@ -105,4 +101,4 @@ https://bugs.gentoo.org/406303
 +#endif
  
        if (rc >= 10) {
-               fs->flags |= MNT_FS_KERNEL;
+               size_t sz;