From c34a3a6e60c73a3e1ca28b40a0f9cd89d093c4bd Mon Sep 17 00:00:00 2001
From: murgatroid99 <mlumish@google.com>
Date: Wed, 1 Jul 2015 10:35:33 -0700
Subject: [PATCH] Added missing pthread gpr requirement

---
 Makefile                    | 7 +++----
 templates/Makefile.template | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index f081dfae58..a5fbc105a9 100644
--- a/Makefile
+++ b/Makefile
@@ -338,12 +338,11 @@ PC_TEMPLATE = prefix=$(prefix)\nexec_prefix=\$${prefix}\nincludedir=\$${prefix}/
 # gpr .pc file
 PC_NAME = Google Public Runtime
 PC_DESCRIPTION = Google Public Runtime
-PC_CFLAGS =
+PC_CFLAGS = -pthread
 PC_REQUIRES_PRIVATE =
+PC_LIBS_PRIVATE = -lpthread
 ifeq ($(SYSTEM),Darwin)
-PC_LIBS_PRIVATE = -lrt
-else
-PC_LIBS_PRIVATE =
+PC_LIBS_PRIVATE += -lrt
 endif
 GPR_PC_FILE := $(PC_TEMPLATE)
 
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 6b4b3e12a7..2a2f6960cf 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -363,12 +363,11 @@ Libs.private: $(PC_LIBS_PRIVATE)
 # gpr .pc file
 PC_NAME = Google Public Runtime
 PC_DESCRIPTION = Google Public Runtime
-PC_CFLAGS =
+PC_CFLAGS = -pthread
 PC_REQUIRES_PRIVATE =
+PC_LIBS_PRIVATE = -lpthread
 ifeq ($(SYSTEM),Darwin)
-PC_LIBS_PRIVATE = -lrt
-else
-PC_LIBS_PRIVATE =
+PC_LIBS_PRIVATE += -lrt
 endif
 GPR_PC_FILE := $(PC_TEMPLATE)
 
-- 
GitLab