]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add MIN() compatibility macro
authorGert Doering <gert@greenie.muc.de>
Sat, 23 Mar 2013 09:28:48 +0000 (10:28 +0100)
committerGert Doering <gert@greenie.muc.de>
Sat, 23 Mar 2013 11:36:23 +0000 (12:36 +0100)
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 <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

src/openvpn/syshead.h

index b14214dd03544a0d6a847dd78745d308ea7d4525..4db29cc311fde77e822a804e7b1bbf1999dc80fa 100644 (file)
 #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?
  */