fixing those build errors with ptrdiff_t