From: Alexey Sheplyakov Date: Sun, 26 Feb 2012 19:55:08 +0000 (+0200) Subject: [compile fix] Remove incorrect forward-declaration of perror(). X-Git-Tag: cln_1-3-7~34 X-Git-Url: https://www.ginac.de/CLN/cln.git//cln.git?a=commitdiff_plain;h=721eb0d4a24c50f765d01a33ec6d5619359c0f35;p=cln.git [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. --- 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 {