Structures which have a common basic structure but perform different functions are called homologous structures. e.g. fore limbs of reptiles, amphibians and mammals. Yes, they have common ancestor but variously modified to carry out different activities.