Accepting request 110352 from Kernel:kdump

Fix build with gcc 4.7 - Please work with upstream to resolve it in upstream code base. There is also a chance that a newer version of the package might have this fixed already. (forwarded request 109811 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/110352
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdump?expand=0&rev=51
This commit is contained in:
Stephan Kulow 2012-03-22 11:33:35 +00:00 committed by Git OBS Bridge
commit 6b23554927
3 changed files with 56 additions and 7 deletions

36
kdump-gcc47.patch Normal file
View File

@ -0,0 +1,36 @@
Index: kdump-0.8.1/kdumptool/dataprovider.cc
===================================================================
--- kdump-0.8.1.orig/kdumptool/dataprovider.cc
+++ kdump-0.8.1/kdumptool/dataprovider.cc
@@ -20,6 +20,7 @@
#include <cstdarg>
#include <cerrno>
#include <algorithm>
+#include <unistd.h>
#include "dataprovider.h"
#include "global.h"
Index: kdump-0.8.1/kdumptool/debug.cc
===================================================================
--- kdump-0.8.1.orig/kdumptool/debug.cc
+++ kdump-0.8.1/kdumptool/debug.cc
@@ -22,6 +22,7 @@
#include <cstring>
#include <string>
#include <sstream>
+#include <unistd.h>
#include "debug.h"
Index: kdump-0.8.1/kdumptool/socket.cc
===================================================================
--- kdump-0.8.1.orig/kdumptool/socket.cc
+++ kdump-0.8.1/kdumptool/socket.cc
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
+#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Mar 17 15:23:22 UTC 2012 - dimstar@opensuse.org
- Add kdump-gcc47.patch: Fix build with gcc 4.7.
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jun 5 17:38:54 UTC 2011 - bernhard@bwalle.de Sun Jun 5 17:38:54 UTC 2011 - bernhard@bwalle.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package kdump # spec file for package kdump
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# 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
@ -15,20 +15,26 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
Url: http://freehg.org/u/bwalle/kdump/ Url: http://freehg.org/u/bwalle/kdump/
Name: kdump Name: kdump
License: GPL-2.0+
Version: 0.8.1 Version: 0.8.1
Release: 11 Release: 0
Requires: curl openssh makedumpfile Requires: curl
Requires: makedumpfile
Requires: openssh
Summary: Script for kdump Summary: Script for kdump
License: GPL-2.0+
Group: System/Kernel Group: System/Kernel
BuildRequires: asciidoc
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libcurl-devel
BuildRequires: libelf0-devel
BuildRequires: libesmtp-devel BuildRequires: libesmtp-devel
BuildRequires: gcc-c++ libcurl-devel libelf0-devel zlib-devel BuildRequires: libxslt
BuildRequires: asciidoc cmake libxslt BuildRequires: zlib-devel
#!BuildIgnore: fop #!BuildIgnore: fop
%if %suse_version > 1100 %if %suse_version > 1100
BuildRequires: libssh2-devel BuildRequires: libssh2-devel
@ -37,6 +43,7 @@ PreReq: %insserv_prereq %fillup_prereq mkinitrd
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source2: %{name}-%{version}-rpmlintrc Source2: %{name}-%{version}-rpmlintrc
Patch0: %{name}-fix-gcc46.diff Patch0: %{name}-fix-gcc46.diff
Patch1: kdump-gcc47.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2) # rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
Provides: kdump-helpers = 0.2.4 Provides: kdump-helpers = 0.2.4
@ -71,6 +78,7 @@ Authors:
%prep %prep
%setup %setup
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
export CFLAGS="%optflags" export CFLAGS="%optflags"