Add MIN() compatibility macro

commit 3b23b18ddd 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 <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20130323112234.GM17727@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7450
This commit is contained in:
Gert Doering 2013-03-23 10:28:48 +01:00
parent 11d21349a4
commit 15ca5c297b

View file

@ -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?
*/