From: Eric Sunshine Date: Sun, 12 May 2013 17:20:30 GMT Subject: Re: [PATCH] cache.h: avoid deprecation warnings on OS X 10.8 Message-ID: In-Reply-To: <1368239010-60894-1-git-send-email-davvid@gmail.com> On Fri, May 10, 2013 at 10:23 PM, David Aguilar wrote: > Mac OS X Mountain Lion prints warnings when building git: > > warning: 'SHA1_Init' is deprecated > (declared at /usr/include/openssl/sha.h:121) > > Silence the warnings by using the Common Digest SHA-1 > functions for SHA1_Init(), SHA1_Update(), and SHA1_Final(). On Lion, with this patch, I see diagnostics such as: warning: implicit declaration of function 'CC_SHA1_Init' If I #include , the "implicit declaration" warning is resolved, but a host of other warnings about incompatible pointer types crop up. (This is a bare Lion installation with latest XCode and "Command Line Tools" package. No MacPorts, no Homebrew.) > Add a COMMON_DIGEST_SHA1 knob to the Makefile to allow > choosing this implementation and define it by default on Darwin. > > Signed-off-by: David Aguilar > --- > This implements the suggestion from John Keeping instead > of blindly setting NO_OPENSSL on Darwin.