If you aren't concerned about voltage drop, power dissipation, or efficiency, then a single diode will do what you want. Otherwise a single P-MOSFET with a couple resistors makes an efficient and low-drop solution.