applied a new versiono of the patch for DragonFlyBSD compatibility from lhmwzy in #2.