Description: Bug 824742 - Use -lrt appropriately (or not) on Android, GNU/Hurd and GNU/kFreeBSD
Author: Mike Hommey <glandium@debian.org>

---
Origin: https://bugzilla.mozilla.org/attachment.cgi?id=696475
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=824742
Last-Update: <2012-12-29>

--- nspr-4.9.4.orig/mozilla/nsprpub/pr/src/Makefile.in
+++ nspr-4.9.4/mozilla/nsprpub/pr/src/Makefile.in
@@ -118,7 +118,8 @@ OS_LIBS		+= -lc_r
 endif
 endif
 
-ifeq ($(OS_ARCH),Linux)
+# Linux, GNU/Hurd, and GNU/kFreeBSD systems
+ifneq (,$(filter Linux GNU%,$(OS_ARCH)))
 ifeq ($(USE_PTHREADS), 1)
 ifeq ($(OS_TARGET),Android)
 # Android has no libpthread.so in NDK
@@ -129,8 +130,11 @@ endif
 else
 OS_LIBS		= -ldl
 endif
+ifneq ($(OS_TARGET),Android)
+# Android has no librt - realtime functions are in libc
 OS_LIBS		+= -lrt
 endif
+endif
 
 ifeq ($(OS_ARCH),HP-UX)
 ifeq ($(USE_PTHREADS), 1)
