fix build issue (ptrdiff_t undefined)