From 721eb0d4a24c50f765d01a33ec6d5619359c0f35 Mon Sep 17 00:00:00 2001 From: Alexey Sheplyakov Date: Sun, 26 Feb 2012 21:55:08 +0200 Subject: [PATCH] [compile fix] Remove incorrect forward-declaration of perror(). First of all, the return type is void, not int (according to C89). Secondly, perror is required by C89, so there's no need to check for it. Fixes (cross-) compilation with MinGW. --- src/timing/cl_t_current.cc | 8 ++------ src/timing/cl_t_current2.cc | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/timing/cl_t_current.cc b/src/timing/cl_t_current.cc index fd0e197..2d61760 100644 --- a/src/timing/cl_t_current.cc +++ b/src/timing/cl_t_current.cc @@ -23,12 +23,8 @@ #else #include #endif -#ifdef HAVE_PERROR_DECL - #include - #include -#else - extern "C" int perror (const char *); -#endif +#include +#include namespace cln { diff --git a/src/timing/cl_t_current2.cc b/src/timing/cl_t_current2.cc index 085a24e..e65f6c3 100644 --- a/src/timing/cl_t_current2.cc +++ b/src/timing/cl_t_current2.cc @@ -22,12 +22,8 @@ #include extern "C" clock_t times (struct tms * buffer); #endif -#ifdef HAVE_PERROR_DECL - #include - #include -#else - extern "C" int perror (const char *); -#endif +#include +#include namespace cln { -- 2.49.0