Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 liboping (1.9.0-1) unstable; urgency=medium
 .
   * New upstream release
Author: Barak A. Pearlmutter <bap@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- liboping-1.9.0.orig/configure.ac
+++ liboping-1.9.0/configure.ac
@@ -199,12 +199,10 @@ fi
 
 AC_SUBST(LIBOPING_PC_LIBS_PRIVATE)
 
-nanosleep_needs_rt="no"
-AC_CHECK_FUNCS(nanosleep, [],
-	AC_CHECK_LIB(rt, nanosleep,
-		[nanosleep_needs_rt="yes"],
-		AC_MSG_ERROR(cannot find nanosleep)))
-AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
+AC_SEARCH_LIBS([nanosleep],[rt],[],
+		[AC_MSG_ERROR([cannot find nanosleep])])
+AC_SEARCH_LIBS([clock_gettime],[rt],[],
+		[AC_MSG_ERROR([cannot find clock_gettime])])
 
 with_ncurses="no"
 AC_CHECK_HEADERS(ncursesw/ncurses.h ncurses.h, [with_ncurses="yes"], [])
--- liboping-1.9.0.orig/src/Makefile.am
+++ liboping-1.9.0/src/Makefile.am
@@ -35,9 +35,6 @@ bin_PROGRAMS = oping
 
 oping_SOURCES = oping.c
 oping_LDADD = liboping.la -lm
-if BUILD_WITH_LIBRT
-oping_LDADD += -lrt
-endif
 
 if BUILD_WITH_LIBNCURSES
 bin_PROGRAMS += noping
@@ -45,9 +42,6 @@ bin_PROGRAMS += noping
 noping_SOURCES = oping.c
 noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1
 noping_LDADD = liboping.la -lm $(NCURSES_LIB)
-if BUILD_WITH_LIBRT
-noping_LDADD += -lrt
-endif
 endif # BUILD_WITH_LIBNCURSES
 
 install-exec-hook:
--- liboping-1.9.0.orig/src/oping.c
+++ liboping-1.9.0/src/oping.c
@@ -755,6 +755,7 @@ static int read_options (int argc, char
 					free (opt_outfile);
 					opt_outfile = strdup (optarg);
 				}
+				break;
 
 			case 'P':
 				{
