Hazrat Ikrimah says that if a roof does not have four walls, its ruling is the same as offering prayer in the open desert.