From patchwork Mon Sep 13 08:55:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 12488345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B3ADC433F5 for ; Mon, 13 Sep 2021 08:56:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 852A760FBF for ; Mon, 13 Sep 2021 08:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238310AbhIMI5q (ORCPT ); Mon, 13 Sep 2021 04:57:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238280AbhIMI5p (ORCPT ); Mon, 13 Sep 2021 04:57:45 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 447E0C061574 for ; Mon, 13 Sep 2021 01:56:30 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id w9so5565723qvs.12 for ; Mon, 13 Sep 2021 01:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GTlyFSc3JDK1hmbg2FuCO4DgQxRbXW/SyuP028wIBEA=; b=ZqbD8AtxmdJOZJH1Fgqo+oyOAVyzwotKzB+4ILlOf2ibqQqTytQGrvtcp18pUaZXCK EnB3zl16WRG4xxrM0vjSw5m2Ua8UMBrOqpN+OYFAerkYCUEXVTrsIeRWsDQkRst6dDUb LhLUZFwr2JvwXKXp6Ao6ohoDToy4APQu3+hchDBXvqs+gCXjKulO6rWr2ooHzU/SN2+G p6EZIUoOXUiCmEiEdHV+ghr4KakrMKfRqXxNzyCAAXa6HWAj5Ghv282zpY5FbVhB9zeo 9VA+PrqctpAGNrRX/bQ98jE/pd3Jv0hcF7Z0S0j1Z1LM0Xm85/vkEpSuOhdtRPHn4mYY Xu0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GTlyFSc3JDK1hmbg2FuCO4DgQxRbXW/SyuP028wIBEA=; b=k4EcZIO4OXP9ARXLzLevSPuvudOVpgN4CSj9qk30cIImPwFE7i5MktJcTITRx4xhfo BGlqvEIT8waVHuj31I4+zCRo0vRqf9hpsSWITYK36LEgqFqKShLwrRiPq50kdwXRIT9v 3hXFTBOoh1iUdB5p7NlHIMni4PpxUtPsV9yKxYcBKVn1HA1sXxDcC2phgTn7fShRQSIk Kbjzk2J+IL4tLIBeSdltjrKyV9cGZL6SA7ikI0t6OdVSHdA2KyLJ3SQFv0VcVnuc6/Vx 62Xxk/QSw4lcwrjQcVge7styankCY5GYHulAMPDtIGfKvTNqNFIMpo97Uk9XP7OOxjM1 J2SA== X-Gm-Message-State: AOAM530f4JJoVV2hNdAYz3hWiwiQ5KuaOEYxmwlAKL9Y8jIWyOd9n6wy o8yk7tkinT1B3QZMXrDdbgmlKJ775ik= X-Google-Smtp-Source: ABdhPJxSC9kORUEpad0wsNwxGpHROVHfhHVrdt1SrHmz8Dr5+KGoeFhCpVQbsA/RnvclggoAnfcsjw== X-Received: by 2002:ad4:46ab:: with SMTP id br11mr8325670qvb.15.1631523389247; Mon, 13 Sep 2021 01:56:29 -0700 (PDT) Received: from carlos-mbp.lan (104-1-92-200.lightspeed.sntcca.sbcglobal.net. [104.1.92.200]) by smtp.gmail.com with ESMTPSA id q10sm4994321qke.108.2021.09.13.01.56.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Sep 2021 01:56:28 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: bagasdotme@gmail.com, gitster@pobox.com, =?utf-8?q?Carlo_Marcelo_Arenas_?= =?utf-8?q?Bel=C3=B3n?= Subject: [PATCH v2 1/3] t0301: fixes for windows compatibility Date: Mon, 13 Sep 2021 01:55:58 -0700 Message-Id: <20210913085600.35506-2-carenas@gmail.com> X-Mailer: git-send-email 2.33.0.481.g26d3bed244 In-Reply-To: <20210913085600.35506-1-carenas@gmail.com> References: <20210912202830.25720-1-carenas@gmail.com> <20210913085600.35506-1-carenas@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In preparation for a future patch that will allow building with Unix Sockets in Windows, workaround a couple of issues from the Mingw-W64 compatibility layer. test -S is not able to detect that a file is a socket, so use test -e instead (through a library function). `mkdir -m` will always fail with permission problems, so instead call mkdir followed by chmod. The last invocation of mkdir would likely need the same treatment but SYMLINK is unlikely to be enabled on Windows so it has been punted for now. Signed-off-by: Carlo Marcelo Arenas Belón --- v2: * avoid the confusing -f test as suggested by Bagas * try to help casual readers as suggested by Junio t/t0301-credential-cache.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index ebd5fa5249..1f7b1e29e6 100755 --- a/t/t0301-credential-cache.sh +++ b/t/t0301-credential-cache.sh @@ -9,6 +9,21 @@ test -z "$NO_UNIX_SOCKETS" || { test_done } +test_path_is_socket () { + test -S "$1" +} + +# in Windows, Unix Sockets look just like regular files +uname_s=$(uname -s) +case $uname_s in +*MINGW*) + test_socket_exist=test_path_exists + ;; +*) + test_socket_exist=test_path_is_socket + ;; +esac + # don't leave a stale daemon running test_atexit 'git credential-cache exit' @@ -21,7 +36,7 @@ test_expect_success 'socket defaults to ~/.cache/git/credential/socket' ' rmdir -p .cache/git/credential/ " && test_path_is_missing "$HOME/.git-credential-cache" && - test -S "$HOME/.cache/git/credential/socket" + $test_socket_exist "$HOME/.cache/git/credential/socket" ' XDG_CACHE_HOME="$HOME/xdg" @@ -31,7 +46,7 @@ helper_test cache test_expect_success "use custom XDG_CACHE_HOME if set and default sockets are not created" ' test_when_finished "git credential-cache exit" && - test -S "$XDG_CACHE_HOME/git/credential/socket" && + $test_socket_exist "$XDG_CACHE_HOME/git/credential/socket" && test_path_is_missing "$HOME/.git-credential-cache/socket" && test_path_is_missing "$HOME/.cache/git/credential/socket" ' @@ -48,7 +63,7 @@ test_expect_success 'credential-cache --socket option overrides default location username=store-user password=store-pass EOF - test -S "$HOME/dir/socket" + $test_socket_exist "$HOME/dir/socket" ' test_expect_success "use custom XDG_CACHE_HOME even if xdg socket exists" ' @@ -62,7 +77,7 @@ test_expect_success "use custom XDG_CACHE_HOME even if xdg socket exists" ' username=store-user password=store-pass EOF - test -S "$HOME/.cache/git/credential/socket" && + $test_socket_exist "$HOME/.cache/git/credential/socket" && XDG_CACHE_HOME="$HOME/xdg" && export XDG_CACHE_HOME && check approve cache <<-\EOF && @@ -71,7 +86,7 @@ test_expect_success "use custom XDG_CACHE_HOME even if xdg socket exists" ' username=store-user password=store-pass EOF - test -S "$XDG_CACHE_HOME/git/credential/socket" + $test_socket_exist "$XDG_CACHE_HOME/git/credential/socket" ' test_expect_success 'use user socket if user directory exists' ' @@ -79,14 +94,15 @@ test_expect_success 'use user socket if user directory exists' ' git credential-cache exit && rmdir \"\$HOME/.git-credential-cache/\" " && - mkdir -p -m 700 "$HOME/.git-credential-cache/" && + mkdir -p "$HOME/.git-credential-cache/" && + chmod 700 "$HOME/.git-credential-cache/" && check approve cache <<-\EOF && protocol=https host=example.com username=store-user password=store-pass EOF - test -S "$HOME/.git-credential-cache/socket" + $test_socket_exist "$HOME/.git-credential-cache/socket" ' test_expect_success SYMLINKS 'use user socket if user directory is a symlink to a directory' ' @@ -103,7 +119,7 @@ test_expect_success SYMLINKS 'use user socket if user directory is a symlink to username=store-user password=store-pass EOF - test -S "$HOME/.git-credential-cache/socket" + $test_socket_exist "$HOME/.git-credential-cache/socket" ' helper_test_timeout cache --timeout=1 From patchwork Mon Sep 13 08:55:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 12488347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CACD9C433FE for ; Mon, 13 Sep 2021 08:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2BA860241 for ; Mon, 13 Sep 2021 08:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238076AbhIMI5r (ORCPT ); Mon, 13 Sep 2021 04:57:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238308AbhIMI5q (ORCPT ); Mon, 13 Sep 2021 04:57:46 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3243EC061574 for ; Mon, 13 Sep 2021 01:56:31 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id u4so5585725qvb.6 for ; Mon, 13 Sep 2021 01:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2wC7lyCziR8JUTBlLrwj6AYRVSTAv0sL6gqPdiKtmOU=; b=dxE8OET9mdduPRuMVIUTeIIo1l8ShBYk1kTFI5UoCpGmxkoKyqHBApZACxuRZX+bHW 41fQ2z/S55YkOvYKxXol3XjPQMxNhioTcOiNKg+GIfxlPAwtRCc6/qQn6TcXDo1kSt2l oAm6od8PqbtyMaWkVO2Y5ufh7f17sHcYcENIxtguxjMjaU0cWak2V6pVzUl6VqvYhsIv VWk1GjDzWx38k9DmHOKXlBEGv+AwwPzbBHvGuAOsIr4rm3HRJYc7CffnqwL3XnVL7Cn5 UekSGQDTyDLLQIZW4hVxOCdrmfxETXk9noF5AV7B2XsIROfEiGyY5dmiaJ6YJkARqSHe Czqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2wC7lyCziR8JUTBlLrwj6AYRVSTAv0sL6gqPdiKtmOU=; b=Se4BYcY9qBhCUHW8fbdjmuTRmgVCzb/EBNHFjB1FxSJ36GL8Wgc7UDPh/uodniRWYD t3XDkjwhdb2sqaVzZ2DkTmcg1rcA0HRf5j+wKci7ElTNRmPqkZum7i768vY8HlyR1V3V 6TxTWsutJQ5RgUoKs1D00zOdW0HkeOC/A9r60fm0Xq3gNPQ+J3qgDDRBPOxDD7UzeH2E kq963ys3QoojOw0HRXcVvDfMlcvihy+WMRlkisnmaGR9EHUNpn0KUzviAYqMMuxNKflm /0lk9S5xzL0Fnml+aWfMhlVdndMhr/ZgVoAmXxad0ZacYhtnVhyDlmUO4j4ZPW6qRb51 s1KQ== X-Gm-Message-State: AOAM5339LQ//7a+uWCOH+mKGjppII9+HMhqOesOVgyJjx1xo8gCtYqzc LRwtGhGM2tMxIS3gJE4Znisepfl6+Oo= X-Google-Smtp-Source: ABdhPJwAvft8XasdtSrHFpJkLZVRcgYpszoFbOEd5a5RCIzs5nS21nTCY7h+jDYD7JG4ifk+hPxkkA== X-Received: by 2002:ad4:5aee:: with SMTP id c14mr9449390qvh.19.1631523390209; Mon, 13 Sep 2021 01:56:30 -0700 (PDT) Received: from carlos-mbp.lan (104-1-92-200.lightspeed.sntcca.sbcglobal.net. [104.1.92.200]) by smtp.gmail.com with ESMTPSA id q10sm4994321qke.108.2021.09.13.01.56.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Sep 2021 01:56:29 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: bagasdotme@gmail.com, gitster@pobox.com, =?utf-8?q?Carlo_Marcelo_Arenas_?= =?utf-8?q?Bel=C3=B3n?= Subject: [PATCH v2 2/3] credential-cache: check for windows specific errors Date: Mon, 13 Sep 2021 01:55:59 -0700 Message-Id: <20210913085600.35506-3-carenas@gmail.com> X-Mailer: git-send-email 2.33.0.481.g26d3bed244 In-Reply-To: <20210913085600.35506-1-carenas@gmail.com> References: <20210912202830.25720-1-carenas@gmail.com> <20210913085600.35506-1-carenas@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Connect and reset errors aren't what will be expected by POSIX but are compatible with the ones used by WinSock. To avoid any possibility of confusion with other systems checks for disconnection and availability had been abstracted into helper functions that are platform specific. Signed-off-by: Carlo Marcelo Arenas Belón --- V2: * Use helper functions to separate error handling as suggested by Junio builtin/credential-cache.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/builtin/credential-cache.c b/builtin/credential-cache.c index e8a7415747..fd9f33d993 100644 --- a/builtin/credential-cache.c +++ b/builtin/credential-cache.c @@ -11,6 +11,32 @@ #define FLAG_SPAWN 0x1 #define FLAG_RELAY 0x2 +#ifdef _WIN32 + +static int connection_closed(int error) +{ + return (error == EINVAL); +} + +static int connection_fatally_broken(int error) +{ + return (error != ENOENT) && (error != ENETDOWN); +} + +#else + +static int connection_closed(int error) +{ + return (error == ECONNRESET); +} + +static int connection_fatally_broken(int error) +{ + return (error != ENOENT) && (error != ECONNREFUSED); +} + +#endif + static int send_request(const char *socket, const struct strbuf *out) { int got_data = 0; @@ -28,7 +54,7 @@ static int send_request(const char *socket, const struct strbuf *out) int r; r = read_in_full(fd, in, sizeof(in)); - if (r == 0 || (r < 0 && errno == ECONNRESET)) + if (r == 0 || (r < 0 && connection_closed(errno))) break; if (r < 0) die_errno("read error from cache daemon"); @@ -75,7 +101,7 @@ static void do_cache(const char *socket, const char *action, int timeout, } if (send_request(socket, &buf) < 0) { - if (errno != ENOENT && errno != ECONNREFUSED) + if (connection_fatally_broken(errno)) die_errno("unable to connect to cache daemon"); if (flags & FLAG_SPAWN) { spawn_daemon(socket); From patchwork Mon Sep 13 08:56:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 12488349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1946AC433EF for ; Mon, 13 Sep 2021 08:56:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF75460F4A for ; Mon, 13 Sep 2021 08:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238314AbhIMI5s (ORCPT ); Mon, 13 Sep 2021 04:57:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238312AbhIMI5r (ORCPT ); Mon, 13 Sep 2021 04:57:47 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CA50C061574 for ; Mon, 13 Sep 2021 01:56:32 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id x5so7451546qtq.13 for ; Mon, 13 Sep 2021 01:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4XFtO4rfgFN8kQALf8OlEda79nvLwivi0RNh2hAVi54=; b=ZzZ1YKdoH4bAKeXBkLpZuRy7JQ48guWf8HKHjCypOWRTRIl6NTlEvamhWm8jr21v0b T4jUUw2MA7G5/nnXvrEAlqJBRdzoKkEdrG1erRZV9mQ6ZED2RWmJjpGNylOk0gcgoQ2A BQagaC/dKDTeh6lKzaUB76vdHmvzG8PwwxegP2impSXd2U+MaKyjoRByui2TClFblv6q xa1QJJY7A9PJO0V3NhrB7KsUTQ1eshtDQo5NhJo9WQRvVdzW7H58tggDYcmam4cgchwM J9i+vlytB/uCuVwGDAmU5hV7d2NGDWfYDM5mLvIG+4N8EFxgxeCReCgjBMHcgGOqRngL iXtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4XFtO4rfgFN8kQALf8OlEda79nvLwivi0RNh2hAVi54=; b=ShXmmKJpHphz9IxBFUPEtTvEpN3UHTKYcwIQngHwZAKMZGIoO63/FLPmqjPDm2PPcY Sx4l/RpQ8OirI3FSBcc/MxPEaXm1feuNadVuQ7lLB9SGg9hwAAI/QPUIIrzFQlQrWgxK M90QTk8B5ZA2CPfPIvNYroHrPw/NKUvjpDtsSdZJJLzeLUeeLAeB3iMni4GOo5FgjDh7 jl1ivxJqVW2fOQu1dV34eTFmxbzd/OlJk/0utKswMBdGdtNbXFcBRtdIW/iL/ErI8leI VtLWGTmvhmba/Av5nTz/fhwl1G2xOOnoEzFdhkVWzNOtDkmJSAYReSELq3A6klBEkb1W 0f1A== X-Gm-Message-State: AOAM531h1m7JHaVOjne3DJ5gk5fToX2pAtRUT6GMBJyU/mYlXME1Qy8c I6tGS7bUl15SuRi5bBdsMM3dQDFpO/A= X-Google-Smtp-Source: ABdhPJzWEiRU+VQ9Q1MDYPlhQa2F4F/9tdIW0/DpE3fb5cajNkmcDAYhtKL8aoXBx+qJK8DMlQyPdA== X-Received: by 2002:ac8:5442:: with SMTP id d2mr8670387qtq.176.1631523391121; Mon, 13 Sep 2021 01:56:31 -0700 (PDT) Received: from carlos-mbp.lan (104-1-92-200.lightspeed.sntcca.sbcglobal.net. [104.1.92.200]) by smtp.gmail.com with ESMTPSA id q10sm4994321qke.108.2021.09.13.01.56.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Sep 2021 01:56:30 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: bagasdotme@gmail.com, gitster@pobox.com, =?utf-8?q?Carlo_Marcelo_Arenas_?= =?utf-8?q?Bel=C3=B3n?= Subject: [PATCH v2 3/3] git-compat-util: include declaration for unix sockets Date: Mon, 13 Sep 2021 01:56:00 -0700 Message-Id: <20210913085600.35506-4-carenas@gmail.com> X-Mailer: git-send-email 2.33.0.481.g26d3bed244 In-Reply-To: <20210913085600.35506-1-carenas@gmail.com> References: <20210912202830.25720-1-carenas@gmail.com> <20210913085600.35506-1-carenas@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Available since Windows 10 release 1803, therefore only added if not using NO_UNIX_SOCKETS (which is not the current default). Signed-off-by: Carlo Marcelo Arenas Belón --- git-compat-util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-compat-util.h b/git-compat-util.h index b46605300a..6a420d104c 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -160,6 +160,9 @@ # endif #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ #include +#ifndef NO_UNIX_SOCKETS +#include +#endif #include #define GIT_WINDOWS_NATIVE #endif