Fix ZIP_OFF_MAX definition for CMake.
diff --git a/TODO b/TODO
index 13d9e8c..26c37ca 100644
--- a/TODO
+++ b/TODO
@@ -53,6 +53,8 @@
 Bugs
 ====
 ! D zip64 extra field not removed from local extra fields (extra_count_ignore_zip64.test)
+    create function to filter internal efs, use in _zip_dirent_read and _zip_read_local_ef
+    define macro ZIP_EF_IS_INTERNAL, use in zip_file_extra_field_set and filter function
 ! D check for off_t overflow
 ! D fix OpenSUSE i686 regression failures
 ! D readd zip_get_num_files man page
diff --git a/lib/zipint.h b/lib/zipint.h
index fae8177..1637794 100644
--- a/lib/zipint.h
+++ b/lib/zipint.h
@@ -98,6 +98,13 @@
 #endif
 #endif
 
+#ifndef SIZEOF_OFF_T
+#ifdef OFF_T_LIBZIP
+#define SIZEOF_OFF_T OFF_T_LIBZIP
+#else
+#error size of off_t unknown
+#endif
+
 #if SIZEOF_OFF_T == 8
 #define ZIP_OFF_MAX ZIP_INT64_MAX
 #elif SIZEOF_OFF_T == 4