Skip to content

Commit

Permalink
Define MIN macro if undefined. Fixes dhess#8
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Bullock committed Oct 3, 2018
1 parent 2f2cd4d commit c636fb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ringbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include <sys/types.h>
#include <assert.h>

#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
Expand Down

0 comments on commit c636fb3

Please sign in to comment.