--- a/libidav/crypto.c Tue Sep 12 21:07:54 2023 +0200 +++ b/libidav/crypto.c Thu Sep 14 18:11:50 2023 +0200 @@ -29,8 +29,12 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <fcntl.h> + +#ifndef _WIN32 #include <unistd.h> -#include <fcntl.h> +#endif + #include "utils.h" #include "crypto.h" @@ -1195,7 +1199,7 @@ copy_iv_len = len > copy_iv_len ? copy_iv_len : len; memcpy(buf, enc->iv, copy_iv_len); - buf += copy_iv_len; + (char*)buf += copy_iv_len; len -= copy_iv_len; nread = copy_iv_len;