diff --git a/gstlal-inspiral/bin/gstlal_inspiral b/gstlal-inspiral/bin/gstlal_inspiral
index 448353bf27821686ecdedf85927d39b7a1bef7c7..2b6509cbb31871783787761d5de7d5bf2d60503c 100755
--- a/gstlal-inspiral/bin/gstlal_inspiral
+++ b/gstlal-inspiral/bin/gstlal_inspiral
@@ -199,15 +199,16 @@ def setrlimit(res, lim):
 	hard_lim = resource.getrlimit(res)[1]
 	resource.setrlimit(res, (lim if lim is not None else hard_lim, hard_lim))
 
-# set the number of processes and total set size up to hard limit and
-# shrink the per-thread stack size (default is 10 MiB)
-setrlimit(resource.RLIMIT_NPROC, None)
-setrlimit(resource.RLIMIT_AS, None)
-setrlimit(resource.RLIMIT_RSS, None)
-# FIXME:  tests at CIT show that this next tweak has no effect.  it's
-# possible that SL7 has lowered the default stack size from SL6 and we
-# don't need to do this anymore.  remove?
-setrlimit(resource.RLIMIT_STACK, 1024 * 1024) # 1 MiB per thread
+if sys.platform == "linux":
+	# set the number of processes and total set size up to hard limit and
+	# shrink the per-thread stack size (default is 10 MiB)
+	setrlimit(resource.RLIMIT_NPROC, None)
+	setrlimit(resource.RLIMIT_AS, None)
+	setrlimit(resource.RLIMIT_RSS, None)
+	# FIXME:	tests at CIT show that this next tweak has no effect.	it's
+	# possible that SL7 has lowered the default stack size from SL6 and we
+	# don't need to do this anymore.	remove?
+	setrlimit(resource.RLIMIT_STACK, 1024 * 1024) # 1 MiB per thread
 
 
 def service_domain(gracedb_search, gracedb_pipeline):