updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / ncpfs / linux3.0_uname.patch
blob6818af87b1af1b93b6df09390521e113edd68e22
1 diff -aur ncpfs-2.2.6.org/sutil/ncpm_common.c ncpfs-2.2.6/sutil/ncpm_common.c
2 --- ncpfs-2.2.6.org/sutil/ncpm_common.c 2011-08-23 16:45:11.000000000 +0200
3 +++ ncpfs-2.2.6/sutil/ncpm_common.c 2011-08-23 16:52:26.049972551 +0200
4 @@ -245,13 +245,13 @@
6 static int getmountver(void) {
7 struct utsname name;
8 - int maj, mid, rev;
9 + int maj = 0, mid = 0, rev = 0;
10 int ver;
12 if (uname(&name)) {
13 errexit(1, _("Cannot get kernel release\n"));
15 - if (sscanf(name.release, "%d.%d.%d", &maj, &mid, &rev) != 3) {
16 + if (sscanf(name.release, "%d.%d-ARCH", &maj, &mid) != 2) {
17 errexit(2, _("Cannot convert kernel release \"%s\" to number\n"), name.release);
19 ver = maj*0x10000 + mid*0x100 + rev;