[Bug 2154600] lv: C99 compatibility fixes