fix compile errors in util.c