components/mc/patches/infopanel-cant-statvfs.patch
author John Beck <John.Beck@Oracle.COM>
Sat, 03 Oct 2015 12:39:15 -0700
changeset 4917 4c88f9d4ab8d
parent 3561 8806d147c2d5
permissions -rw-r--r--
21918688 Python 3.5 (fix pkglint warnings)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3561
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     1
Upstream bugId: #3277
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     2
Synopsis: Info panel can't obtain file system statistics
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     3
Bug record: https://www.midnight-commander.org/ticket/3277
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     4
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     5
diff -Naur mc-4.8.13.old/src/filemanager/mountlist.c mc-4.8.13.new/src/filemanager/mountlist.c
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     6
--- mc-4.8.13.old/src/filemanager/mountlist.c	2014-09-02 11:23:58.000000000 +0200
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     7
+++ mc-4.8.13.new/src/filemanager/mountlist.c	2014-09-26 17:07:08.135044849 +0200
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     8
@@ -999,9 +999,9 @@
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
     9
         char *table = MNTTAB;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    10
         FILE *fp;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    11
         int ret;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    12
-        int lockfd;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    13
 
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    14
 #if defined F_RDLCK && defined F_SETLKW
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    15
+        int lockfd;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    16
         /* MNTTAB_LOCK is a macro name of our own invention; it's not present in
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    17
            e.g. Solaris 2.6.  If the SVR4 folks ever define a macro
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    18
            for this file name, we should use their macro name instead.
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    19
@@ -1056,8 +1056,10 @@
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    20
             ret = fclose (fp) == EOF ? errno : 0 < ret ? 0 : -1;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    21
         }
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    22
 
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    23
+#if defined F_RDLCK && defined F_SETLKW
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    24
         if (lockfd >= 0 && close (lockfd) != 0)
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    25
             ret = errno;
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    26
+#endif
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    27
 
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    28
         if (ret >= 0)
8806d147c2d5 19702624 Update Midnight Commander
Milan Cermak <Milan.Cermak@oracle.com>
parents:
diff changeset
    29
         {