diff --git a/gtests/net/packetdrill/packetdrill.c b/gtests/net/packetdrill/packetdrill.c
index 8e03b4fd0f2a8ff3f6ee25465458ff8346b525a1..8d726ca8a86a8a61ec57c919a35c492019b9fbca 100644
--- a/gtests/net/packetdrill/packetdrill.c
+++ b/gtests/net/packetdrill/packetdrill.c
@@ -73,11 +73,7 @@ int main(int argc, char *argv[])
 	struct config config;
 	char **arg;
 
-#if defined(__APPLE__)
-	pthread_setname_np("main thread");
-#elif defined(linux)
-	prctl(PR_SET_NAME, "main thread");
-#elif defined(__FreeBSD__)
+#if defined(__FreeBSD__)
 	pthread_set_name_np(pthread_self(), "main thread");
 #endif
 
diff --git a/gtests/net/packetdrill/run_system_call.c b/gtests/net/packetdrill/run_system_call.c
index ad3c651012dbd2ea561ffdd2e917a2e9e3477389..e5ee89a79e68086285045fe5fca6d0e1937b2a7e 100644
--- a/gtests/net/packetdrill/run_system_call.c
+++ b/gtests/net/packetdrill/run_system_call.c
@@ -6269,11 +6269,7 @@ static void *system_call_thread(void *arg)
 	struct syscall_spec *syscall = NULL;
 	bool done = false;
 
-#if defined(__APPLE__)
-	pthread_setname_np("syscall thread");
-#elif defined(linux)
-	prctl(PR_SET_NAME, "syscall thread");
-#elif defined(__FreeBSD__)
+#if defined(__FreeBSD__)
 	pthread_set_name_np(pthread_self(), "syscall thread");
 #endif
 	DEBUGP("syscall thread: starting and locking\n");