A numerical method for solving the Reynolds equations for the problem of the flow around a rectangular wing in the buffeting mode is validated and the flow around an infinitely long rectangular wing by an infinite transonic gas stream is calculated. It is shown that, instead of a two-dimensional flow, a flow that is periodic along the lateral coordinate is realized. In addition, there are time-periodic oscillations of the flow along the longitudinal coordinate (buffeting). The presence of the side walls of the pipe deforms this periodic structure and changes the buffeting frequency. The calculation of the flow around the wing–fuselage structure of a mainline aircraft in the transonic buffeting mode shows that the flow oscillations occur in a limited region of the wing both in the longitudinal and transverse directions.