Patch for building with gcc45.

This commit is contained in:
Toshio Kuratomi 2010-08-02 21:23:51 -04:00
parent 416d2922b7
commit 4fa3b4da2c
2 changed files with 31 additions and 5 deletions

21
ocfs2-tools-gcc45.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c.bak ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c
--- ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c.bak 2010-08-02 20:11:37.428252707 -0400
+++ ocfs2-tools-1.4.3/mount.ocfs2/mount.ocfs2.c 2010-08-02 20:11:57.114252733 -0400
@@ -261,7 +261,7 @@ int main(int argc, char **argv)
char *extra = NULL;
int dev_ro = 0;
char *hbstr = NULL;
- char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1] = "";
+ char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1];
ocfs2_filesys *fs = NULL;
struct o2cb_cluster_desc cluster;
struct o2cb_region_desc desc;
@@ -269,6 +269,8 @@ int main(int argc, char **argv)
int hb_started = 0;
struct stat statbuf;
+ stackstr[0] = "\0";
+
initialize_ocfs_error_table();
initialize_o2dl_error_table();
initialize_o2cb_error_table();

View File

@ -1,12 +1,12 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define with_console %{?_without_console: 0} %{?!_without_console: 1}
%global with_console %{?_without_console: 0} %{?!_without_console: 1}
## define alphatag 20080221git
Summary: Tools for managing the Ocfs2 cluster file system
Name: ocfs2-tools
Version: 1.4.3
Release: 6%{?alphatag:.%{alphatag}}%{?dist}
Release: 7%{?alphatag:.%{alphatag}}%{?dist}
License: GPLv2
Group: System Environment/Base
# The source for this package was pulled from upstream's git repo and manually
@ -22,6 +22,7 @@ Source0: %{name}-%{version}.tar.gz
Patch0: minor_build_fixes.diff
Patch1: o2cb_pcmk.diff
Patch2: no_stonithd.diff
Patch3: ocfs2-tools-gcc45.patch
URL: http://oss.oracle.com/projects/ocfs2-tools/
Requires(post): chkconfig
Requires(preun): chkconfig
@ -101,6 +102,7 @@ pacemaker cluster manager
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%{configure} \
@ -211,10 +213,13 @@ fi
%files pcmk
%defattr(-,root,root,-)
/sbin/ocfs2_controld.pcmk
%dir /usr/lib/ocf/resource.d/ocfs2
/usr/lib/ocf/resource.d/ocfs2
%dir %{_prefix}/lib/ocf/resource.d/ocfs2
%{_prefix}/lib/ocf/resource.d/ocfs2
%changelog
* Mon Aug 2 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4.3-7
- Patch for gcc45 compilation failures
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.4.3-6
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild