[arch-commits] Commit in parted/trunk (PKGBUILD linux.c.patch)
Giovanni Scafora
giovanni at archlinux.org
Fri Jul 29 18:39:58 UTC 2011
Date: Friday, July 29, 2011 @ 14:39:57
Author: giovanni
Revision: 133576
upgpkg: parted 3.0-3
Fixed FS25307
Added:
parted/trunk/linux.c.patch
Modified:
parted/trunk/PKGBUILD
---------------+
PKGBUILD | 11 ++++++++---
linux.c.patch | 25 +++++++++++++++++++++++++
2 files changed, 33 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-07-29 14:35:19 UTC (rev 133575)
+++ PKGBUILD 2011-07-29 18:39:57 UTC (rev 133576)
@@ -4,7 +4,7 @@
pkgname=parted
pkgver=3.0
-pkgrel=2
+pkgrel=3
pkgdesc="A program for creating, destroying, resizing, checking and copying partitions"
arch=('i686' 'x86_64')
license=('GPL3')
@@ -13,12 +13,17 @@
makedepends=('pkgconfig')
options=('!libtool')
install=${pkgname}.install
-source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz")
-md5sums=('c415e5c97f86b5ff65a2d925e5a3feb7')
+source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"
+ linux.c.patch)
+md5sums=('c415e5c97f86b5ff65a2d925e5a3feb7'
+ '08c942e212424e238271217f52c59706')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ # FS#25307
+ patch -Np1 -i ${srcdir}/linux.c.patch
+
./configure --prefix=/usr \
--disable-debug \
--disable-rpath
Added: linux.c.patch
===================================================================
--- linux.c.patch (rev 0)
+++ linux.c.patch 2011-07-29 18:39:57 UTC (rev 133576)
@@ -0,0 +1,25 @@
+--- a/libparted/arch/linux.c 2011-05-27 14:52:37.000000000 +0200
++++ b/libparted/arch/linux.c 2011-07-29 20:25:38.000000000 +0200
+@@ -601,17 +601,17 @@
+ static int kver = -1;
+
+ struct utsname uts;
+- int major;
+- int minor;
+- int teeny;
++ int major = 0;
++ int minor = 0;
++ int teeny = 0;
+
+ if (kver != -1)
+ return kver;
+
+ if (uname (&uts))
+ return kver = 0;
+- if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) != 3)
+- return kver = 0;
++ int n = sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny);
++ assert (n == 2 || n == 3);
+
+ return kver = KERNEL_VERSION (major, minor, teeny);
+ }
More information about the arch-commits
mailing list