From 0a7d0caf7bb26a4117f7b87c432986f5feb1cc97 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Fri, 5 Oct 2018 09:37:09 +0100 Subject: [PATCH] Define MIN macro if undefined --- ringbuf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ringbuf.c b/ringbuf.c index b18ddb6..d30c5e4 100644 --- a/ringbuf.c +++ b/ringbuf.c @@ -23,6 +23,9 @@ #include #include +#ifndef MIN +#define MIN(x,y) ((x)>(y)?(y):(x)) +#endif /* * The code is written for clarity, not cleverness or performance, and * contains many assert()s to enforce invariant assumptions and catch