diff --git a/src/cdi.h b/src/cdi.h
index 08e7a4111be4fc6cd87ae15579dd020975f975c9..f8da84bc47b524cbfa3dbcbc4981ef6c73b22f37 100644
--- a/src/cdi.h
+++ b/src/cdi.h
@@ -12,11 +12,11 @@
 #include <sys/types.h>
 
 #ifndef CDI_SIZE_TYPE
-#define CDI_SIZE_TYPE int
+#define CDI_SIZE_TYPE size_t
 #endif
 
 #ifndef CDI_DATE_TYPE // Must be signed integer (int32_t or int64_t)!
-#define CDI_DATE_TYPE int
+#define CDI_DATE_TYPE int64_t
 #endif
 
 typedef CDI_SIZE_TYPE SizeType;