forked from pool/nfs-utils
- 0009-Allow-compilation-to-succeed-with-fno-common.patch
Allow compilation to success with -fno-common (boo#1160405) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=212
This commit is contained in:
parent
3df1d2bdfa
commit
6df8f0e2df
59
0009-Allow-compilation-to-succeed-with-fno-common.patch
Normal file
59
0009-Allow-compilation-to-succeed-with-fno-common.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From 212832f065dac884a2e9bc858263d7735b6e2230 Mon Sep 17 00:00:00 2001
|
||||||
|
From: NeilBrown <neilb@suse.de>
|
||||||
|
Date: Thu, 6 Feb 2020 08:59:13 +1100
|
||||||
|
Subject: [PATCH] Allow compilation to succeed with -fno-common
|
||||||
|
|
||||||
|
When compiled with -fno-common, global variables that are declared
|
||||||
|
multple times cause an error. With -fcommon (the default), they are
|
||||||
|
merged.
|
||||||
|
|
||||||
|
Declaring such variable multiple times is probably not a good idea, and
|
||||||
|
is definitely not necessary.
|
||||||
|
|
||||||
|
This patch changes all the global variables defined in include files to
|
||||||
|
be explicitly "extern", and where necessary, adds the variable
|
||||||
|
declaration to a suitable .c file.
|
||||||
|
|
||||||
|
To test, run
|
||||||
|
CFLAGS=-fno-common ./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||||
|
---
|
||||||
|
utils/mountd/v4root.c | 2 --
|
||||||
|
utils/statd/statd.c | 1 +
|
||||||
|
utils/statd/statd.h | 2 +-
|
||||||
|
3 files changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/utils/mountd/v4root.c
|
||||||
|
+++ b/utils/mountd/v4root.c
|
||||||
|
@@ -28,8 +28,6 @@
|
||||||
|
#include "v4root.h"
|
||||||
|
#include "pseudoflavors.h"
|
||||||
|
|
||||||
|
-int v4root_needed;
|
||||||
|
-
|
||||||
|
static nfs_export pseudo_root = {
|
||||||
|
.m_next = NULL,
|
||||||
|
.m_client = NULL,
|
||||||
|
--- a/utils/statd/statd.c
|
||||||
|
+++ b/utils/statd/statd.c
|
||||||
|
@@ -67,6 +67,7 @@ static struct option longopts[] =
|
||||||
|
};
|
||||||
|
|
||||||
|
extern void sm_prog_1 (struct svc_req *, register SVCXPRT *);
|
||||||
|
+stat_chge SM_stat_chge;
|
||||||
|
|
||||||
|
#ifdef SIMULATIONS
|
||||||
|
extern void simulator (int, char **);
|
||||||
|
--- a/utils/statd/statd.h
|
||||||
|
+++ b/utils/statd/statd.h
|
||||||
|
@@ -41,7 +41,7 @@ extern void load_state(void);
|
||||||
|
/*
|
||||||
|
* Host status structure and macros.
|
||||||
|
*/
|
||||||
|
-stat_chge SM_stat_chge;
|
||||||
|
+extern stat_chge SM_stat_chge;
|
||||||
|
#define MY_NAME SM_stat_chge.mon_name
|
||||||
|
#define MY_STATE SM_stat_chge.state
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 5 22:13:28 UTC 2020 - Neil Brown <nfbrown@suse.com>
|
||||||
|
|
||||||
|
- 0009-Allow-compilation-to-succeed-with-fno-common.patch
|
||||||
|
Allow compilation to success with -fno-common
|
||||||
|
(boo#1160405)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Nov 20 23:55:31 UTC 2019 - Neil Brown <nfbrown@suse.com>
|
Wed Nov 20 23:55:31 UTC 2019 - Neil Brown <nfbrown@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package nfs-utils
|
# spec file for package nfs-utils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -27,7 +27,7 @@ Release: 0
|
|||||||
Summary: Support Utilities for Kernel nfsd
|
Summary: Support Utilities for Kernel nfsd
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Productivity/Networking/NFS
|
Group: Productivity/Networking/NFS
|
||||||
Url: http://kernel.org/pub/linux/utils/nfs-utils/
|
URL: http://kernel.org/pub/linux/utils/nfs-utils/
|
||||||
Source0: http://kernel.org/pub/linux/utils/nfs-utils/%{version}/nfs-utils-%{version}.tar.xz
|
Source0: http://kernel.org/pub/linux/utils/nfs-utils/%{version}/nfs-utils-%{version}.tar.xz
|
||||||
# Download does not work:
|
# Download does not work:
|
||||||
# Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.bz2
|
# Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.bz2
|
||||||
@ -53,6 +53,7 @@ Patch5: 0005-nfs.conf-fail-to-disable-major-NFS-version-4-using-v.patch
|
|||||||
Patch6: 0006-conffile-allow-optional-include-files.patch
|
Patch6: 0006-conffile-allow-optional-include-files.patch
|
||||||
Patch7: 0007-statd-user-from-sm
|
Patch7: 0007-statd-user-from-sm
|
||||||
Patch8: 0008-mountd-Initialize-logging-early.patch
|
Patch8: 0008-mountd-Initialize-logging-early.patch
|
||||||
|
Patch0: 0009-Allow-compilation-to-succeed-with-fno-common.patch
|
||||||
|
|
||||||
BuildRequires: e2fsprogs-devel
|
BuildRequires: e2fsprogs-devel
|
||||||
BuildRequires: fedfs-utils-devel
|
BuildRequires: fedfs-utils-devel
|
||||||
@ -158,6 +159,7 @@ This package contains additional NFS documentation.
|
|||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
|
||||||
cp %{SOURCE6} .
|
cp %{SOURCE6} .
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user