Sprinkle consts and casts to make it valid C++ as well as C