Copied from git://git.code.sf.net/p/tuxbox-cvs/apps