From 70c25a2c6759fe8998d426adbe518f655c69b2e4 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven.rezic@idealo.de>
Date: Mon, 22 Jun 2020 16:27:02 +0200
Subject: [PATCH] avoid clash with system's gettid

---
 bson/bson-context.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bson/bson-context.c b/bson/bson-context.c
index d3554a1..18a4471 100644
--- a/bson/bson-context.c
+++ b/bson/bson-context.c
@@ -48,7 +48,7 @@ static bson_context_t gContextDefault;
 
 #if defined(__linux__)
 static uint16_t
-gettid (void)
+local_gettid (void)
 {
    return syscall (SYS_gettid);
 }
@@ -377,7 +377,7 @@ _bson_context_init (bson_context_t *context,    /* IN */
       if ((flags & BSON_CONTEXT_USE_TASK_ID)) {
          int32_t tid;
 
-         if ((tid = gettid ())) {
+         if ((tid = local_gettid ())) {
             pid = BSON_UINT16_TO_BE (tid);
          }
       }
-- 
2.25.1