You can get adapters, called logically enough Leica-M-to-PC, or you can have the socket changed. A long-established camera store (not Jessops!) might have one in a drawer. I have one somewhere that came with a Leica but damned if I know where.
But using flash with an M-series Leica is heresy anyway!
I bought an adapter the other day from Mr Cad of Croydon for £8 (Kaiser, product # 1313). They might have another! I also bought some cover plugs for the flash sockets from India (Active Industries).