Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

libmemcached: fix build "tr1/cintypes" error on OS X 10.9 #22259

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions Library/Formula/libmemcached.rb
Expand Up @@ -13,4 +13,30 @@ def install
system "./configure", "--prefix=#{prefix}"
system "make install"
end

def patches
if MacOS.version >= :mavericks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also check if the compiler is clang. Shouldn't need patch (and will probably fail) when building using GNU GCC.

# build fix for tr1 -> std
DATA
end
end

end

__END__
diff --git a/libmemcached-1.0/memcached.h b/libmemcached-1.0/memcached.h
index 3c11f61..dcee395 100644
--- a/libmemcached-1.0/memcached.h
+++ b/libmemcached-1.0/memcached.h
@@ -43,7 +43,11 @@
#endif

#ifdef __cplusplus
+#ifdef _LIBCPP_VERSION
+# include <cinttypes>
+#else
# include <tr1/cinttypes>
+#endif
# include <cstddef>
# include <cstdlib>
#else