backporting to older C style to fix the kernel build