This is the portable way to do it according to stackoverflow. The less portable way is to use linker flags.

I could also use a static variable in mpg_open but this is nicer, isn't it?