From a50097e83675964758d6428923b9e7c3278e123d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Feb 02 2016 16:40:40 +0000 Subject: Patched to build with GCC 6 --- diff --git a/bonnie++-1.96-minmax.patch b/bonnie++-1.96-minmax.patch new file mode 100644 index 0000000..f567b55 --- /dev/null +++ b/bonnie++-1.96-minmax.patch @@ -0,0 +1,68 @@ +--- bonnie++-1.96/port.h.in.orig 2016-02-02 16:27:37.985436571 +0000 ++++ bonnie++-1.96/port.h.in 2016-02-02 16:34:54.335729981 +0000 +@@ -4,9 +4,9 @@ + #include "conf.h" + + #ifndef HAVE_MIN_MAX +-#if defined(HAVE_ALGO_H) || defined(HAVE_ALGO) +-#ifdef HAVE_ALGO +-#include ++#if defined(HAVE_ALGO_H) || defined(HAVE_ALGORITHM) ++#ifdef HAVE_ALGORITHM ++#include + #else + #include + #endif +@@ -49,8 +49,8 @@ + #endif + + typedef int FILE_TYPE; +-#define __min min +-#define __max max ++// #define __min min ++// #define __max max + typedef unsigned int UINT; + typedef unsigned long ULONG; + typedef const char * PCCHAR; +--- bonnie++-1.96/bonnie++.cpp.orig 2016-02-02 16:35:22.160876227 +0000 ++++ bonnie++-1.96/bonnie++.cpp 2016-02-02 16:37:23.018511442 +0000 +@@ -73,7 +73,7 @@ + void set_io_chunk_size(int size) + { delete m_buf; pa_new(size, m_buf, m_buf_pa); m_io_chunk_size = size; } + void set_file_chunk_size(int size) +- { delete m_buf; m_buf = new char[__max(size, m_io_chunk_size)]; m_file_chunk_size = size; } ++ { delete m_buf; m_buf = new char[max(size, m_io_chunk_size)]; m_file_chunk_size = size; } + + // Return the page-aligned version of the local buffer + char *buf() { return m_buf_pa; } +@@ -138,7 +138,7 @@ + , m_buf(NULL) + , m_buf_pa(NULL) + { +- pa_new(__max(m_io_chunk_size, m_file_chunk_size), m_buf, m_buf_pa); ++ pa_new(max(m_io_chunk_size, m_file_chunk_size), m_buf, m_buf_pa); + SetName("."); + } + +@@ -393,8 +393,8 @@ + usage(); + } + #endif +- globals.byte_io_size = __min(file_size, globals.byte_io_size); +- globals.byte_io_size = __max(0, globals.byte_io_size); ++ globals.byte_io_size = min(file_size, globals.byte_io_size); ++ globals.byte_io_size = max(0, globals.byte_io_size); + + if(machine == NULL) + { +--- bonnie++-1.96/duration.cpp.orig 2016-02-02 16:40:22.751456099 +0000 ++++ bonnie++-1.96/duration.cpp 2016-02-02 16:40:31.686503061 +0000 +@@ -38,7 +38,7 @@ + getTime(&tv); + double ret; + ret = tv - m_start; +- m_max = __max(m_max, ret); ++ m_max = max(m_max, ret); + return ret; + } + diff --git a/bonnie++.spec b/bonnie++.spec index 8e5d880..922298b 100644 --- a/bonnie++.spec +++ b/bonnie++.spec @@ -1,6 +1,6 @@ Name: bonnie++ Version: 1.96 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Filesystem and disk benchmark & burn-in suite @@ -9,6 +9,7 @@ License: GPLv2 URL: http://www.coker.com.au/bonnie++/ Source0: http://www.coker.com.au/bonnie++/experimental/bonnie++-%{version}.tgz Patch0: %{name}-%{version}-makefile.patch +Patch1: %{name}-%{version}-minmax.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) %description @@ -24,6 +25,7 @@ test servers. %prep %setup -q -n bonnie++-%{version} %patch0 -p1 +%patch1 -p1 %build @@ -59,6 +61,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 02 2016 Jonathan Wakely 1.96-11 +- Patched to build with GCC 6 + * Wed Jun 17 2015 Fedora Release Engineering - 1.96-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild