In the subclass of high-mass X-ray binaries known as "microquasars, " relativistic hadrons in the jets launched by the compact object can interact with cold protons from the star's radiatively driven wind, producing pions that then quickly decay into gamma rays. Since the resulting gamma-ray emissivity depends on the target density, the detection of rapid variability in microquasars with Gamma-Ray Large Area Space Telescope and the new generation of Cherenkov imaging arrays could be used to probe the clumped structure of the stellar wind. We show here that the fluctuation in gamma rays can be modeled using a "porosity length" formalism, usually applied to characterize clumping effects. In particular, for a porosity length defined by h = l/f, i.e., as the ratio of the characteristic size l of clumps to their volume filling factor f, we find that the relative fluctuation in gammaray emission in a binary with orbital separation a scales as √h/πα in the "thin-jet" limit, and is reduced by a factor 1/√1 +φα/2l for a jet with a finite opening angle φ. For a thin jet and quite moderate porosity length h ≈ 0.03α, this implies a ca. 10% variation in the gamma-ray emission. Moreover, the illumination of individual large clumps might result in isolated flares, as has been recently observed in some massive gamma-ray binaries.