+diff --git a/zypp/OnMediaLocation.h b/zypp/OnMediaLocation.h
+index 264f6fadf..db16f72e3 100644
+--- a/zypp/OnMediaLocation.h
++++ b/zypp/OnMediaLocation.h
+@@ -125,8 +125,10 @@ namespace zypp
+ /** \relates OnMediaLocation Stream output */
+ std::ostream & operator<<( std::ostream & str, const OnMediaLocation & obj );
+
++#ifndef SWIG // Swig treats it as syntax error
+ /** \relates OnMediaLocation Verbose stream output */
+ std::ostream & dumOn( std::ostream & str, const OnMediaLocation & obj );
++#endif
+
+ } // namespace zypp
+ ///////////////////////////////////////////////////////////////////