Never at Roland Garros had the men's singles champion lost in the opening round the following year, but the Swiss was in danger of making unwanted history after twice falling a set behind.
Wawrinka, who defeated the Czech on Friday in the Geneva Open semi-finals, dropped the opening set on Court Philippe Chatrier after surrendering his serve in game five.
French Open: Djokovic set for another crack at elusive title
The world number four rattled through the second set to level and seemingly get back on track, but 59th-ranked Rosol appeared on course for a repeat of his stunning 2012 win over Rafael Nadal at Wimbledon when he moved ahead once more in the third.
Wawrinka was forced to defend a pair of break points at 2-all in the fourth, with the Swiss then ripping a trademark cross-court backhand passing shot to move 5-3 ahead and send the contest to a fifth set.
Roger Federer withdraws from French Open
The defending champion forged ahead with a crucial break in the third game of the decider before closing it out to book a second-round match-up with Japan's Taro Daniel.
Muguruza struggles in first round
Spanish fourth seed Garbine Muguruza came back from a set down to defeat Slovakia's Anna Karolina Schmiedlova 3-6, 6-3, 6-3 to reach French Open’s second round.
Muguruza, who has made the quarter-finals for the last two years, will take on French wildcard Myrtille Georges, the world number 203, for a place in the last 32.
But the 22-year-old Wimbledon runner-up was far from impressive in the two and a half hour encounter.
Angry Kyrgios, Kvitova pass chilly Roland Garros test
After dropping the first set, Muguruza had to save nine break points just in the opening game of the second set.
She then allowed her 37th-ranked opponent, who has won just one match all year, to claw her way back from 0-4 down to 3-4 before the Spaniard settled herself to see out the win.
Muguruza fired 44 winners and 53 unforced errors and also saved 17 of 21 break points.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ