From: Gert Doering Date: Sat, 23 Mar 2013 09:28:48 +0000 (+0100) Subject: Add MIN() compatibility macro X-Git-Tag: v2.4_alpha1~584 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15ca5c297b556fbb;p=thirdparty%2Fopenvpn.git Add MIN() compatibility macro commit 3b23b18dddb8f8f4a introduced usage of MIN(), and not all platforms have the macro in "readily usable" system header files, most notably it's missing on OpenSolaris and Android. Add macro if not defined yet. Signed-off-by: Gert Doering Acked-by: Arne Schwabe Message-Id: <20130323112234.GM17727@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/7450 --- diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index b14214dd0..4db29cc31 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -398,6 +398,13 @@ #define HAVE_GETTIMEOFDAY_NANOSECONDS 1 #endif +/* + * do we have the MIN() macro? + */ +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + /* * Do we have the capability to report extended socket errors? */