autofs-5.0.8 - fix max() declaration From: Ian Kent Use a name other than the already defined max(). --- CHANGELOG | 1 + modules/replicated.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 839c1ea..a9c374a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ - fix options compare. - fix negative status being reset on map read. - check for existing offset mount before mounting. +- fix max() declaration. 17/10/2013 autofs-5.0.8 ======================= diff --git a/modules/replicated.c b/modules/replicated.c index 2463235..d43f778 100644 --- a/modules/replicated.c +++ b/modules/replicated.c @@ -73,8 +73,8 @@ static int volatile ifc_last_len = 0; /* Get numeric value of the n bits starting at position p */ #define getbits(x, p, n) ((x >> (p + 1 - n)) & ~(~0 << n)) -#define max(x, y) (x >= y ? x : y) -#define mmax(x, y, z) (max(x, y) == x ? max(x, z) : max(y, z)) +#define mymax(x, y) (x >= y ? x : y) +#define mmax(x, y, z) (mymax(x, y) == x ? mymax(x, z) : mymax(y, z)) unsigned int ipv6_mask_cmp(uint32_t *host, uint32_t *iface, uint32_t *mask) { @@ -961,7 +961,7 @@ int prune_host_list(unsigned logopt, struct host **list, max_tcp_count = mmax(v4_tcp_count, v3_tcp_count, v2_tcp_count); max_udp_count = mmax(v4_udp_count, v3_udp_count, v2_udp_count); - max_count = max(max_tcp_count, max_udp_count); + max_count = mymax(max_tcp_count, max_udp_count); if (max_count == v4_tcp_count) { selected_version = NFS4_TCP_SUPPORTED;