Mishkat al-Masabih
Al-Hasan said that Samura reported the Prophet (ﷺ) as saying, “If anyone puts a wall round land*, it belongs to him.” Abu Dawud transmitted it. * Mirqat, iii, 369 says the reference is to barren land.
عَنِ الْحَسَنِ عَنْ سَمُرَةَ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «مَنْ أَحَاطَ حَائِطًا عَلَى الْأَرْضِ فَهُوَ لَهُ» . رَوَاهُ أَبُو دَاوُدَ
Reference