From 9ae2bfae492a5b07c9ec1e99d948a9eddfcb0ed4 Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Sat, 21 Apr 2018 15:31:05 +0200
Subject: [PATCH] MacOS does not have a working mlockall().

---
 gtests/net/packetdrill/run.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gtests/net/packetdrill/run.c b/gtests/net/packetdrill/run.c
index a0a7711f..f079e185 100644
--- a/gtests/net/packetdrill/run.c
+++ b/gtests/net/packetdrill/run.c
@@ -466,8 +466,10 @@ void set_scheduling_priority(void)
  */
 void lock_memory(void)
 {
+#if !defined(__APPLE__)
 	if (mlockall(MCL_CURRENT | MCL_FUTURE))
 		die_perror("lockall(MCL_CURRENT | MCL_FUTURE)");
+#endif
 }
 
 /* Wait for and return the wall time at which we should start the
-- 
GitLab