The U.S. Senate has passed a compromise bill to end the nation’s longest government shutdown, restoring federal funding.