diff --git a/src/md4c.c b/src/md4c.c
index e3f5cf9..d21e41a 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -139,6 +139,10 @@
*** Internal Types ***
************************/
+#ifdef OFF_MAX
+# undef OFF_MAX
+#endif
+
/* These are omnipresent so lets save some typing. */
#define CHAR MD_CHAR
#define SZ MD_SIZE