Porto defender Danilo has reportedly agreed to join Real Madrid after rejecting an offer from Manchester United.