diff --strip-trailing-cr -urN liblzf.orig/lzf_c.c liblzf/lzf_c.c
--- liblzf.orig/lzf_c.c	2010-06-01 09:11:20.000000000 +0000
+++ liblzf/lzf_c.c	2017-02-02 15:09:36.000000000 +0000
@@ -120,7 +120,7 @@
    * special workaround for it.
    */
 #if defined (WIN32) && defined (_M_X64)
-  unsigned _int64 off; /* workaround for missing POSIX compliance */
+  unsigned __int64 off; /* workaround for missing POSIX compliance */
 #else
   unsigned long off;
 #endif
diff --strip-trailing-cr -urN liblzf.orig/lzf.h liblzf/lzf.h
--- liblzf.orig/lzf.h	2008-08-25 01:40:29.000000000 +0000
+++ liblzf/lzf.h	2017-02-02 15:09:36.000000000 +0000
@@ -37,6 +37,10 @@
 #ifndef LZF_H
 #define LZF_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /***********************************************************************
 **
 **	lzf -- an extremely fast/free compression/decompression-method
@@ -96,5 +100,9 @@
 lzf_decompress (const void *const in_data,  unsigned int in_len,
                 void             *out_data, unsigned int out_len);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif
 
diff --strip-trailing-cr -urN liblzf.orig/lzfP.h liblzf/lzfP.h
--- liblzf.orig/lzfP.h	2010-06-01 08:16:09.000000000 +0000
+++ liblzf/lzfP.h	2019-05-23 06:43:27.000000000 +0000
@@ -79,7 +79,11 @@
  * Unconditionally aligning does not cost very much, so do it if unsure
  */
 #ifndef STRICT_ALIGN
-# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
+# if defined(__i386) || defined (__amd64)
+#  define STRICT_ALIGN 0
+# else
+#  define STRICT_ALIGN 1
+# endif
 #endif
 
 /*
@@ -141,15 +145,22 @@
 #endif
 
 #ifndef LZF_USE_OFFSETS
-# if defined (WIN32)
-#  define LZF_USE_OFFSETS defined(_M_X64)
+# if defined (WIN32) || defined(_WIN32)
+#  if defined(_M_X64)
+#   define LZF_USE_OFFSETS 1
+#  endif
 # else
 #  if __cplusplus > 199711L
 #   include <cstdint>
 #  else
 #   include <stdint.h>
 #  endif
-#  define LZF_USE_OFFSETS (UINTPTR_MAX > 0xffffffffU)
+#  if (UINTPTR_MAX > 0xffffffffU)
+#   define LZF_USE_OFFSETS 1
+#  endif
+# endif
+# ifndef LZF_USE_OFFSETS
+#   define LZF_USE_OFFSETS 0
 # endif
 #endif
 
