{"thread":{"id":"38317","subject":"[PATCH 1/3] configure.ac: check 'tv_nsec' field in 'struct stat'","startedAt":"2015-01-08T20:00:55Z","lastAt":"2015-01-09T05:37:08Z","messageCount":6,"participants":["Reuben Hawkins","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"254483","messageId":"1420747257-16132-1-git-send-email-reubenhwk@gmail.com","threadId":"38317","inReplyTo":null,"subject":"[PATCH 1/3] configure.ac: check 'tv_nsec' field in 'struct stat'","fromName":"Reuben Hawkins","fromEmail":"reubenhwk@gmail.com","sentAt":"2015-01-08T20:00:55Z","receivedAt":"2015-01-08T20:00:55Z","isPatch":true,"sender":{"key":"reubenhwk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/201595?v=4"},"body":"Detect 'tv_nsec' field in 'struct stat' and set Makefile variable\nNO_NSEC appropriately.\n\nA side-effect of the above detection is that we also determine\nwhether 'stat.st_mtimespec' is available, so, as a bonus, set the\nMakefile variable USE_ST_TIMESPEC, as well.\n\nSigned-off-by: Reuben Hawkins <reubenhwk@gmail.com>\n---\n configure.ac | 13 +++++++++++++\n 1 file changed, 13 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 6af9647..210eb4e 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -754,6 +754,19 @@ AC_CHECK_TYPES([struct itimerval],\n [#include <sys/time.h>])\n GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])\n #\n+# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists.\n+# Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor\n+# stat.st_mtimespec.tv_nsec exists.\n+AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec])\n+AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec])\n+if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes ; then\n+\tUSE_ST_TIMESPEC=YesPlease\n+\tGIT_CONF_SUBST([USE_ST_TIMESPEC])\n+elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes ; then\n+\tNO_NSEC=YesPlease\n+\tGIT_CONF_SUBST([NO_NSEC])\n+fi\n+#\n # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.\n AC_CHECK_MEMBER(struct dirent.d_ino,\n [NO_D_INO_IN_DIRENT=],\n-- \n2.2.0.68.g8f72f0c.dirty\n"},{"id":"254485","messageId":"1420747257-16132-2-git-send-email-reubenhwk@gmail.com","threadId":"38317","inReplyTo":"1420747257-16132-1-git-send-email-reubenhwk@gmail.com","subject":"[PATCH 2/3] configure.ac: check for clock_gettime and CLOCK_MONOTONIC","fromName":"Reuben Hawkins","fromEmail":"reubenhwk@gmail.com","sentAt":"2015-01-08T20:00:56Z","receivedAt":"2015-01-08T20:00:56Z","isPatch":true,"sender":{"key":"reubenhwk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/201595?v=4"},"body":"The checks will override and unset YesPlease settings for HAVE_CLOCK_GETTIME\nand HAVE_CLOCK_MONOTONIC in config.mak.uname.\n\nCLOCK_MONOTONIC isn't available on RHEL3, but there are still RHEL3 systems\nbeing used in production.\n\nSigned-off-by: Reuben Hawkins <reubenhwk@gmail.com>\n---\n Makefile         |  6 ++++++\n config.mak.uname |  1 +\n configure.ac     | 22 ++++++++++++++++++++++\n trace.c          |  2 +-\n 4 files changed, 30 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 7482a4d..57e33f2 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -339,6 +339,8 @@ all::\n # return NULL when it receives a bogus time_t.\n #\n # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.\n+#\n+# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.\n \n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -1382,6 +1384,10 @@ ifdef HAVE_CLOCK_GETTIME\n \tEXTLIBS += -lrt\n endif\n \n+ifdef HAVE_CLOCK_MONOTONIC\n+\tBASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC\n+endif\n+\n ifeq ($(TCLTK_PATH),)\n NO_TCLTK = NoThanks\n endif\ndiff --git a/config.mak.uname b/config.mak.uname\nindex a2f380f..926773e 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -35,6 +35,7 @@ ifeq ($(uname_S),Linux)\n \tLIBC_CONTAINS_LIBINTL = YesPlease\n \tHAVE_DEV_TTY = YesPlease\n \tHAVE_CLOCK_GETTIME = YesPlease\n+\tHAVE_CLOCK_MONOTONIC = YesPlease\n endif\n ifeq ($(uname_S),GNU/kFreeBSD)\n \tHAVE_ALLOCA_H = YesPlease\ndiff --git a/configure.ac b/configure.ac\nindex 210eb4e..c3293b9 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -924,6 +924,28 @@ AC_CHECK_LIB([iconv], [locale_charset],\n                      [CHARSET_LIB=-lcharset])])\n GIT_CONF_SUBST([CHARSET_LIB])\n #\n+# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.\n+GIT_CHECK_FUNC(clock_gettime,\n+\t[HAVE_CLOCK_GETTIME=YesPlease],\n+\t[HAVE_CLOCK_GETTIME=])\n+GIT_CONF_SUBST([HAVE_CLOCK_GETTIME])\n+\n+AC_DEFUN([CLOCK_MONOTONIC_SRC], [\n+AC_LANG_PROGRAM([[\n+#include <time.h>\n+clockid_t id = CLOCK_MONOTONIC;\n+]])])\n+\n+#\n+# Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available.\n+AC_MSG_CHECKING([for CLOCK_MONOTONIC])\n+AC_COMPILE_IFELSE([CLOCK_MONOTONIC_SRC],\n+\t[AC_MSG_RESULT([yes])\n+\tHAVE_CLOCK_MONOTONIC=YesPlease],\n+\t[AC_MSG_RESULT([no])\n+\tHAVE_CLOCK_MONOTONIC=])\n+GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])\n+#\n # Define NO_SETITIMER if you don't have setitimer.\n GIT_CHECK_FUNC(setitimer,\n [NO_SETITIMER=],\ndiff --git a/trace.c b/trace.c\nindex 4778608..bfbd48f 100644\n--- a/trace.c\n+++ b/trace.c\n@@ -324,7 +324,7 @@ int trace_want(struct trace_key *key)\n \treturn !!get_trace_fd(key);\n }\n \n-#ifdef HAVE_CLOCK_GETTIME\n+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)\n \n static inline uint64_t highres_nanos(void)\n {\n-- \n2.2.0.68.g8f72f0c.dirty\n"},{"id":"254484","messageId":"1420747257-16132-3-git-send-email-reubenhwk@gmail.com","threadId":"38317","inReplyTo":"1420747257-16132-1-git-send-email-reubenhwk@gmail.com","subject":"[PATCH 3/3] configure.ac: check for HMAC_CTX_cleanup","fromName":"Reuben Hawkins","fromEmail":"reubenhwk@gmail.com","sentAt":"2015-01-08T20:00:57Z","receivedAt":"2015-01-08T20:00:57Z","isPatch":true,"sender":{"key":"reubenhwk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/201595?v=4"},"body":"OpenSSL version 0.9.6b and before defined the function HMAC_cleanup.\nNewer versions define HMAC_CTX_cleanup.  Check for HMAC_CTX_cleanup and\nfall back to HMAC_cleanup when the newer function is missing.\n\nSigned-off-by: Reuben Hawkins <reubenhwk@gmail.com>\n---\n Makefile          | 6 ++++++\n configure.ac      | 4 ++++\n git-compat-util.h | 3 +++\n 3 files changed, 13 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex 57e33f2..2ce1f1f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -341,6 +341,9 @@ all::\n # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.\n #\n # Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.\n+#\n+# Define NO_HMAC_CTX_CLEANUP if your OpenSSL is version 0.9.6b or earlier to\n+# cleanup the HMAC context with the older HMAC_cleanup function.\n \n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -1061,6 +1064,9 @@ ifndef NO_OPENSSL\n \tifdef NEEDS_CRYPTO_WITH_SSL\n \t\tOPENSSL_LIBSSL += -lcrypto\n \tendif\n+\tifdef NO_HMAC_CTX_CLEANUP\n+\t\tBASIC_CFLAGS += -DNO_HMAC_CTX_CLEANUP\n+\tendif\n else\n \tBASIC_CFLAGS += -DNO_OPENSSL\n \tBLK_SHA1 = 1\ndiff --git a/configure.ac b/configure.ac\nindex c3293b9..9c66c3e 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -924,6 +924,10 @@ AC_CHECK_LIB([iconv], [locale_charset],\n                      [CHARSET_LIB=-lcharset])])\n GIT_CONF_SUBST([CHARSET_LIB])\n #\n+# Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing.\n+AC_CHECK_LIB([crypto], [HMAC_CTX_cleanup],\n+\t[], [GIT_CONF_SUBST([NO_HMAC_CTX_CLEANUP], [YesPlease])])\n+#\n # Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.\n GIT_CHECK_FUNC(clock_gettime,\n \t[HAVE_CLOCK_GETTIME=YesPlease],\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 400e921..2fdca2d 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -213,6 +213,9 @@ extern char *gitbasename(char *);\n #ifndef NO_OPENSSL\n #include <openssl/ssl.h>\n #include <openssl/err.h>\n+#ifdef NO_HMAC_CTX_CLEANUP\n+#define HMAC_CTX_cleanup HMAC_cleanup\n+#endif\n #endif\n \n /* On most systems <netdb.h> would have given us this, but\n-- \n2.2.0.68.g8f72f0c.dirty\n"},{"id":"254496","messageId":"CAPig+cRpD0B2YRZYyJVUiM70AFcduTPOuJsuRFFKZE+bXttW1Q@mail.gmail.com","threadId":"38317","inReplyTo":"1420747257-16132-1-git-send-email-reubenhwk@gmail.com","subject":"Re: [PATCH 1/3] configure.ac: check 'tv_nsec' field in 'struct stat'","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-01-09T05:36:15Z","receivedAt":"2015-01-09T05:36:15Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jan 8, 2015 at 3:00 PM, Reuben Hawkins <reubenhwk@gmail.com> wrote:\n> Detect 'tv_nsec' field in 'struct stat' and set Makefile variable\n> NO_NSEC appropriately.\n>\n> A side-effect of the above detection is that we also determine\n> whether 'stat.st_mtimespec' is available, so, as a bonus, set the\n> Makefile variable USE_ST_TIMESPEC, as well.\n>\n> Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com>\n\nThese patches may or may not deserve a Helped-by:.\n\nWith or without the Helped-by: and the minor style fix-up below...\n\nReviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n\nThanks for the perseverance.\n\nFor convenience of other reviewers: This is v3. v1 through v3 are\nthreaded together here:\nhttp://thread.gmane.org/gmane.comp.version-control.git/261619\n\n> ---\n> diff --git a/configure.ac b/configure.ac\n> index 6af9647..210eb4e 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -754,6 +754,19 @@ AC_CHECK_TYPES([struct itimerval],\n>  [#include <sys/time.h>])\n>  GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])\n>  #\n> +# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists.\n> +# Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor\n> +# stat.st_mtimespec.tv_nsec exists.\n> +AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec])\n> +AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec])\n> +if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes ; then\n\nStyle: For consistency with all other 'if' conditionals in\nconfigure.ac, drop the space before the semicolon.\n\n> +       USE_ST_TIMESPEC=YesPlease\n> +       GIT_CONF_SUBST([USE_ST_TIMESPEC])\n> +elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes ; then\n\nDitto.\n\n> +       NO_NSEC=YesPlease\n> +       GIT_CONF_SUBST([NO_NSEC])\n> +fi\n> +#\n>  # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.\n>  AC_CHECK_MEMBER(struct dirent.d_ino,\n>  [NO_D_INO_IN_DIRENT=],\n> --\n> 2.2.0.68.g8f72f0c.dirty\n"},{"id":"254498","messageId":"CAPig+cRd5+9nq3YNA6e1R_tvmBTHByOg-=KRWG1m3Fxb0e_vFQ@mail.gmail.com","threadId":"38317","inReplyTo":"1420747257-16132-2-git-send-email-reubenhwk@gmail.com","subject":"Re: [PATCH 2/3] configure.ac: check for clock_gettime and CLOCK_MONOTONIC","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-01-09T05:36:41Z","receivedAt":"2015-01-09T05:36:41Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jan 8, 2015 at 3:00 PM, Reuben Hawkins <reubenhwk@gmail.com> wrote:\n> The checks will override and unset YesPlease settings for HAVE_CLOCK_GETTIME\n> and HAVE_CLOCK_MONOTONIC in config.mak.uname.\n\nI find this hard to grok and would rewrite it as:\n\n    Set or clear Makefile variables HAVE_CLOCK_GETTIME and\n    HAVE_CLOCK_MONOTONIC based upon results of the checks (overriding\n    default values from config.mak.uname).\n\n> CLOCK_MONOTONIC isn't available on RHEL3, but there are still RHEL3 systems\n> being used in production.\n>\n> Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com>\n\nWith or without the minor rewrite above...\n\nReviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n\n> ---\n> diff --git a/Makefile b/Makefile\n> index 7482a4d..57e33f2 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -339,6 +339,8 @@ all::\n>  # return NULL when it receives a bogus time_t.\n>  #\n>  # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.\n> +#\n> +# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.\n>\n>  GIT-VERSION-FILE: FORCE\n>         @$(SHELL_PATH) ./GIT-VERSION-GEN\n> @@ -1382,6 +1384,10 @@ ifdef HAVE_CLOCK_GETTIME\n>         EXTLIBS += -lrt\n>  endif\n>\n> +ifdef HAVE_CLOCK_MONOTONIC\n> +       BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC\n> +endif\n> +\n>  ifeq ($(TCLTK_PATH),)\n>  NO_TCLTK = NoThanks\n>  endif\n> diff --git a/config.mak.uname b/config.mak.uname\n> index a2f380f..926773e 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -35,6 +35,7 @@ ifeq ($(uname_S),Linux)\n>         LIBC_CONTAINS_LIBINTL = YesPlease\n>         HAVE_DEV_TTY = YesPlease\n>         HAVE_CLOCK_GETTIME = YesPlease\n> +       HAVE_CLOCK_MONOTONIC = YesPlease\n>  endif\n>  ifeq ($(uname_S),GNU/kFreeBSD)\n>         HAVE_ALLOCA_H = YesPlease\n> diff --git a/configure.ac b/configure.ac\n> index 210eb4e..c3293b9 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -924,6 +924,28 @@ AC_CHECK_LIB([iconv], [locale_charset],\n>                       [CHARSET_LIB=-lcharset])])\n>  GIT_CONF_SUBST([CHARSET_LIB])\n>  #\n> +# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.\n> +GIT_CHECK_FUNC(clock_gettime,\n> +       [HAVE_CLOCK_GETTIME=YesPlease],\n> +       [HAVE_CLOCK_GETTIME=])\n> +GIT_CONF_SUBST([HAVE_CLOCK_GETTIME])\n> +\n> +AC_DEFUN([CLOCK_MONOTONIC_SRC], [\n> +AC_LANG_PROGRAM([[\n> +#include <time.h>\n> +clockid_t id = CLOCK_MONOTONIC;\n> +]])])\n> +\n> +#\n> +# Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available.\n> +AC_MSG_CHECKING([for CLOCK_MONOTONIC])\n> +AC_COMPILE_IFELSE([CLOCK_MONOTONIC_SRC],\n> +       [AC_MSG_RESULT([yes])\n> +       HAVE_CLOCK_MONOTONIC=YesPlease],\n> +       [AC_MSG_RESULT([no])\n> +       HAVE_CLOCK_MONOTONIC=])\n> +GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])\n> +#\n>  # Define NO_SETITIMER if you don't have setitimer.\n>  GIT_CHECK_FUNC(setitimer,\n>  [NO_SETITIMER=],\n> diff --git a/trace.c b/trace.c\n> index 4778608..bfbd48f 100644\n> --- a/trace.c\n> +++ b/trace.c\n> @@ -324,7 +324,7 @@ int trace_want(struct trace_key *key)\n>         return !!get_trace_fd(key);\n>  }\n>\n> -#ifdef HAVE_CLOCK_GETTIME\n> +#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)\n>\n>  static inline uint64_t highres_nanos(void)\n>  {\n> --\n> 2.2.0.68.g8f72f0c.dirty\n"},{"id":"254497","messageId":"CAPig+cQb6k8ktWR5Fz+dstfhFj5dZ+kpfzVk1Vp5piYJ3zy4rg@mail.gmail.com","threadId":"38317","inReplyTo":"1420747257-16132-3-git-send-email-reubenhwk@gmail.com","subject":"Re: [PATCH 3/3] configure.ac: check for HMAC_CTX_cleanup","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-01-09T05:37:08Z","receivedAt":"2015-01-09T05:37:08Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jan 8, 2015 at 3:00 PM, Reuben Hawkins <reubenhwk@gmail.com> wrote:\n> OpenSSL version 0.9.6b and before defined the function HMAC_cleanup.\n> Newer versions define HMAC_CTX_cleanup.  Check for HMAC_CTX_cleanup and\n> fall back to HMAC_cleanup when the newer function is missing.\n>\n> Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com>\n\nReviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n\nNote that this patch has a minor and simple-to-resolve conflict with\nb195aa00c1 (git-compat-util: suppress unavoidable Apple-specific\ndeprecation warnings; 2014-12-16) which was just promoted to master.\nJunio may resolve it locally or ask you to re-send.\n\n> ---\n> diff --git a/Makefile b/Makefile\n> index 57e33f2..2ce1f1f 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -341,6 +341,9 @@ all::\n>  # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.\n>  #\n>  # Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.\n> +#\n> +# Define NO_HMAC_CTX_CLEANUP if your OpenSSL is version 0.9.6b or earlier to\n> +# cleanup the HMAC context with the older HMAC_cleanup function.\n>\n>  GIT-VERSION-FILE: FORCE\n>         @$(SHELL_PATH) ./GIT-VERSION-GEN\n> @@ -1061,6 +1064,9 @@ ifndef NO_OPENSSL\n>         ifdef NEEDS_CRYPTO_WITH_SSL\n>                 OPENSSL_LIBSSL += -lcrypto\n>         endif\n> +       ifdef NO_HMAC_CTX_CLEANUP\n> +               BASIC_CFLAGS += -DNO_HMAC_CTX_CLEANUP\n> +       endif\n>  else\n>         BASIC_CFLAGS += -DNO_OPENSSL\n>         BLK_SHA1 = 1\n> diff --git a/configure.ac b/configure.ac\n> index c3293b9..9c66c3e 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -924,6 +924,10 @@ AC_CHECK_LIB([iconv], [locale_charset],\n>                       [CHARSET_LIB=-lcharset])])\n>  GIT_CONF_SUBST([CHARSET_LIB])\n>  #\n> +# Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing.\n> +AC_CHECK_LIB([crypto], [HMAC_CTX_cleanup],\n> +       [], [GIT_CONF_SUBST([NO_HMAC_CTX_CLEANUP], [YesPlease])])\n> +#\n>  # Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.\n>  GIT_CHECK_FUNC(clock_gettime,\n>         [HAVE_CLOCK_GETTIME=YesPlease],\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 400e921..2fdca2d 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -213,6 +213,9 @@ extern char *gitbasename(char *);\n>  #ifndef NO_OPENSSL\n>  #include <openssl/ssl.h>\n>  #include <openssl/err.h>\n> +#ifdef NO_HMAC_CTX_CLEANUP\n> +#define HMAC_CTX_cleanup HMAC_cleanup\n> +#endif\n>  #endif\n>\n>  /* On most systems <netdb.h> would have given us this, but\n> --\n> 2.2.0.68.g8f72f0c.dirty\n"}]}