The Sages taught in the Tosefta: In order to construct a fit sukka, two of the walls must be walls in the standard sense, sealing the entire length and height of the sukka, and the third wall may be even one handbreadth long. Rabbi Shimon says: Three of the walls must be walls in the standard sense, and the fourth wall may be even one handbreadth long.
Rava said: And the sukka consisting of two adjacent walls with a third wall measuring one handbreadth is permitted and fit only if the third wall is in the form of a doorway. One can render the sukka fit only by splitting the one-handbreadth wall and attaching one half to the standing wall and one half across from the other wall that emerges from the standing wall, and then placing a pole across the two halves. By creating the form of a doorway, that third wall becomes like an open gate, which is considered a halakhic partition.
...
...
Regarding the walls of the sukkah, if there are two walls adjacent to each other like a gamma, one makes a wall that has its width greater than a tefach and puts it within three [tefachim] from one wall. One then places a rod (parallel to the wall) (Tur) over this tefach[-wide pseudo-wall] to make the form of a doorway, placing a rod on top of [the real wall] and on top of the tefach[-wide pseudo-wall], and it is kosher, even if the rod does not touch them. Rema: And if the tefach [pseudo-wall] and the wall reach schach, no rod is needed above them (Mordechai, Hagahot Maimoni ch. 4). And the custom that the form of the doorway is circular is just for decorative reasons (so wrote Mordechai).
...