summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/replacements.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/helper/replacements.h b/src/helper/replacements.h
index 70697b29..0b132d77 100644
--- a/src/helper/replacements.h
+++ b/src/helper/replacements.h
@@ -35,6 +35,18 @@
#include <fcntl.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h> /* for MIN/MAX macros */
+#endif
+
+/* MIN,MAX macros */
+#ifndef MIN
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+#ifndef MAX
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+
/* gettimeofday() */
#ifndef HAVE_GETTIMEOFDAY