Set of patches for successful compilation on recent distros