%Ld isn't standard, %lld is more portable. In addition, the format should be %llu since the printed values are unsigned. This should address issue #1013.