util.h: fix typo
Fix misuse of uint64_t as size_t

They have different size on 32 bit, so they are really not interchangable.
resolve-host: fix missed search&replace
terminal: avoid warning about signed-unsigned comparison