summaryrefslogtreecommitdiff
blob: d9226d6970006401275294edf5e51a973b3d2d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 310d423d36ae7bb6dac5a2ae2fb7b57bda72dcb5 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Thu, 24 Aug 2017 17:27:08 +0200
Subject: [PATCH 1/2] priv: Add macro for MAX

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit de35212789d11086621e176a11399de0d75ab3a6)
Signed-off-by: Mihai Moldovan <ionic@ionic.de>
---
 include/libssh/priv.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 5a74915e..c3373c00 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -263,6 +263,10 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
 
+#ifndef MAX
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
 /** Free memory space */
 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
 
-- 
2.15.1