All real estate owned by a county and situate within the corporate limits of any city of the fourth class shall be subject to the provisions of all ordinances of such city which relate to the erection and maintenance of hitching posts, sidewalks, guttering, curbing, fences along streets and alleys, and the paving and macadamizing of streets to the same extent as that of private citizens of such city.