  Context: The mass-loss rate is a key parameter of massive stars. Adequate
stellar atmosphere models are required for spectral analyses and mass-loss
determinations. Present models can only account for the inhomogeneity of
stellar winds in the approximation of small-scale structures that are optically
thin. This treatment of ``microclumping'' has led to reducing empirical
mass-loss rates by factors of two and more. Aims: Stellar wind clumps can be
optically thick in spectral lines. We investigate how this ``macroclumping''
impacts on empirical mass-loss rates. Methods: The Potsdam Wolf-Rayet (PoWR)
model atmosphere code is generalized in the ``formal integral'' to account for
clumps that are not necessarily optically thin. Results: Optically thick clumps
reduce the effective opacity. This has a pronounced effect on the emergent
spectrum. Our modeling for the O-type supergiant zeta Puppis reveals that the
optically thin H-alpha line is not affected by wind porosity, but that the PV
resonance doublet becomes significantly weaker when macroclumping is taken into
account. The reported discrepancies between resonance-line and
recombination-line diagnostics can be resolved entirely with the macroclumping
modeling without downward revision of the mass-loss rate. Conclusions:
Mass-loss rates inferred from optically thin emission, such as the H-alpha line
in O stars, are not influenced by macroclumping. The strength of optically
thick lines, however, is reduced because of the porosity effects. Therefore,
neglecting the porosity in stellar wind modeling can lead to underestimating
empirical mass-loss rates.
