For the one in your second picture which looks to have broken below the surface of the barrel you can build up with weld exactly as I did in the post I have linked above, once you have it flush with the surface you can weld a washer to it if it is easier than using a nut.
Keep the welder turned...