Once you have fixed the cause of the damp which has caused the rot, cut away or replace any damaged wood. Paint with a fungicidal wood preservative, making sure to get into the joints and end grain well. Now apply a wood hardener to reinforce the wood and follow this by using wood filler to repair the surface. Paint to finish.