This is a patch to the last version I supported (v6.204). To apply, change to the CORSIKA directory and run
patch -p1 < ~/corsika_update.diff