]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: do not redeclare globals provided by libraries
authorEric Sandeen <sandeen@redhat.com>
Thu, 30 Jan 2020 18:34:17 +0000 (13:34 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 30 Jan 2020 18:34:17 +0000 (13:34 -0500)
In each of these cases, db, logprint, and mdrestore are redeclaring
as a global variable something which was already provided by a
library they link with.

gcc now defaults to -fno-common and trips over these global variables
which are declared in utilities as well as in libxfs and libxlog, and
it causes the build to fail.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/init.c
logprint/logprint.c
mdrestore/xfs_mdrestore.c

index 455220a866f9fbe495be2f2eea5c05d264e43a89..0ac3736851601a124d6aaa0f02b4bf2bae491e3b 100644 (file)
--- a/db/init.c
+++ b/db/init.c
@@ -27,7 +27,6 @@ static int            force;
 static struct xfs_mount        xmount;
 struct xfs_mount       *mp;
 static struct xlog     xlog;
-libxfs_init_t          x;
 xfs_agnumber_t         cur_agno = NULLAGNUMBER;
 
 static void
index 7754a2a6e22164f44e0e646188b57cceef083ae4..511a32aca726b3c5ff558b0013bf599f2361c4ed 100644 (file)
@@ -24,7 +24,6 @@ int   print_buffer;
 int    print_overwrite;
 int     print_no_data;
 int     print_no_print;
-int     print_exit = 1; /* -e is now default. specify -c to override */
 static int     print_operation = OP_PRINT;
 
 static void
@@ -132,6 +131,7 @@ main(int argc, char **argv)
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
        memset(&mount, 0, sizeof(mount));
+       print_exit = 1; /* -e is now default. specify -c to override */
 
        progname = basename(argv[0]);
        while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) {
@@ -152,7 +152,7 @@ main(int argc, char **argv)
                        case 'e':
                            /* -e is now default
                             */
-                               print_exit++;
+                               print_exit = 1;
                                break;
                        case 'C':
                                print_operation = OP_COPY;
index 3375e0806de5b15c4a54121a035b7794221bd0f7..1cd399dbca4602cf8b00b0f288a342846b4cc841 100644 (file)
@@ -7,7 +7,6 @@
 #include "libxfs.h"
 #include "xfs_metadump.h"
 
-char           *progname;
 static int     show_progress = 0;
 static int     show_info = 0;
 static int     progress_since_warning = 0;