If a leg is obviously broken, taping or tying a splint can prevent a compound fracture where the bone breaks through the skin. Your main goal, however, is to get the animal to a veterinarian as soon as possible.
Do not attempt to reset the bone. Any straight, firm object can suffice as an emergency splint as long as it extends past the injured joint, immobilizing the joints above and below the injury. Tape or tie the splint into place so that it is secure, but not so tight that it cuts off circulation. If an open wound is present, cover it with clean gauze before applying the splint.
If the fracture is high on the leg, it may be best not to try to splint the area for your trip to the veterinarian. Just have the animal assume the most comfortable position. Large dogs may be able to hop on three legs sufficiently. Small dogs and cats do well immobilized in a box.
Give Arnica 30c for general pain. The following day, give Ruta 30c for the pain of torn connective tissues around the bone. Three days later, give Symphytum 30c to speed up healing of the bones.