Skip to content

Instantly share code, notes, and snippets.

@drussel
Created October 25, 2013 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drussel/7161086 to your computer and use it in GitHub Desktop.
Save drussel/7161086 to your computer and use it in GitHub Desktop.
Patch to add #include
diff --git a/Library/Formula/google-perftools.rb b/Library/Formula/google-perfto
index 6fb1434..928de56 100644
--- a/Library/Formula/google-perftools.rb
+++ b/Library/Formula/google-perftools.rb
@@ -11,6 +11,10 @@ class GooglePerftools < Formula
cause "Segfault during linking"
end
+ def patches
+ DATA
+ end
+
def install
ENV.append_to_cflags '-D_XOPEN_SOURCE'
system "./configure", "--disable-dependency-tracking",
@@ -19,3 +23,14 @@ class GooglePerftools < Formula
system "make install"
end
end
+
+__END__
+--- a/src/static_vars.cc
++++ b/src/static_vars.cc
+@@ -37,6 +37,7 @@
+ #include "common.h"
+ #include "sampler.h" // for Sampler
+ #include "base/googleinit.h"
++#include <pthread.h>
+
+ namespace tcmalloc {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment