The haymaking machine consists of a frame (1) with a central lengthwise member (2) and a transverse structure (3) carrying tedding rotors (13), with lateral sections (6, 7) that can be folded for transport, and guards (17) in front of the rotors. The guards have supple sections (18, 19) made from natural or synthetic material that are retracted automatically onto spring-loaded reels (22, 23) when the lateral sections of the transverse structure are folded.