The teams announced the trade Monday.
Zolnierczyk played in 44 regular-season games over two years for the Flyers. He had three goals and seven points this season.
Rosehill has spent the season with the Ducks' AHL affiliate, the Norfolk Admirals, where he had four goals and eight points, and 90 penalty minutes in 33 games. He did not score a point in 31 career NHL games with Toronto.