The U.S. Senate has passed a bill earlier approved by the House of Representatives, narrowly averting a government shutdown. The bill extends government funding until mid-March.