It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "When you disagree about a road, leave seven cubits of space, then build, and whoever is asked by his neighbour to let him rest (his wood) on his wall, let him allow him to rest it."
Imam Ibn Majah (may Allah have mercy on him) narrated it through Muhammad bin Yahya al-Dhuhli and Muhammad bin Umar bin Hayyaj, from Qabisah, from Sufyan, and he did not mention the part at its end, "and whoever constructs a building".
Related hadith on this topic