From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5F1A842B1E for ; Wed, 13 Apr 2022 15:27:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 37B7068B39A; Wed, 13 Apr 2022 18:27:52 +0300 (EEST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6A11168A901 for ; Wed, 13 Apr 2022 18:27:45 +0300 (EEST) Received: by mail-wm1-f47.google.com with SMTP id x3so1311181wmj.5 for ; Wed, 13 Apr 2022 08:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xF9+CVSGQMcQvgmIUFR9Faz9S/l4nQEEZJoIUZSnZh0=; b=euF1CVDyqKmu2wiaZBnkLDgLTPD3/5JF7b1XnL5Nca8CsFDAKThueHxCnVV0Pa7o42 ZfbIn+eC9fIKBJ9epdtQOM5MvxikHs4W5ew+Dy4yEXaEj6zpZR/I3cQNBy8wzW0K8sAO zcM8rB96bV+E4FltnGQtPs0Z0+LJg+saeiqPZmRlvXsWoghETQ67jGzwcf0ez+5gvKgB qG5k23jAA5T+MT1xa7dd3hVKdjHwAKgLMwotbx6StWYwvZtzZBri6ZKbRwyHkWbLp81o fUWAUyafQQTTAjgU/PqQiyl8BAlfat3kZvx7ejuGn3Ve9+H5f6w96B/fE7JvR//io+DW oM8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=xF9+CVSGQMcQvgmIUFR9Faz9S/l4nQEEZJoIUZSnZh0=; b=l4WuYFieCsWzXQvlIZwgE9P2YtY9i7MfoUsOJRxzWSS9FdCVeDpx+huu8+7eq3b4jc 0WCQkrFxR7v0z89KZFyChZyULrLUP25SSVI2mUNIErs0/xixT8qfyxv8fjuMz3FAUfxa c6aiIbWxLrJbDa+bmb7OarwkUV4BNMkfeVg/YUTXsvEMayY2VzypU93G633Jl/mpE7xP leyoh1tUKtoQIpZ957QgDFmnEE2cEz9B/NRi5oHmyISju5kpP+T1FInSiUL0d9wzp/NJ IpNjm2qICRZLfYJN2RK6Gs2hFdGDr2oCRt3ZkhQht8t7Ttl1jcKoIxEQo49hDBNQNJ4M UFhw== X-Gm-Message-State: AOAM532BDSJrtWzGj41KiUB8sIlRq932vFdueess/hBDyyvQntUjAjMt fCA52y7n+dnuj7myFmOtGlkOFYvS+Uock6zIQE9vyuiU X-Google-Smtp-Source: ABdhPJzFc9+cLT/1tSEFaM+l/klPdXgFH1RZbmJ5EMdrV4S8be7t0jfYBAhn32SJHVG7/2aKSuujhkn9bXOoDLfhWxA= X-Received: by 2002:a1c:ed11:0:b0:38a:dd7:ab91 with SMTP id l17-20020a1ced11000000b0038a0dd7ab91mr9115466wmh.37.1649863664366; Wed, 13 Apr 2022 08:27:44 -0700 (PDT) MIME-Version: 1.0 References: <20220413152142.31981-1-markg85@gmail.com> In-Reply-To: <20220413152142.31981-1-markg85@gmail.com> From: Mark Gaiser Date: Wed, 13 Apr 2022 17:27:29 +0200 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v1] avformat/ipfsgateway: define PATH_MAX X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, Apr 13, 2022 at 5:21 PM Mark Gaiser wrote: > PATH_MAX is posix. Some compilers (MSVC) don't define this > thus failing to compile the ipfsgateway file. > Defining it fixes the compile. > > Signed-off-by: Mark Gaiser > --- > libavformat/ipfsgateway.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/libavformat/ipfsgateway.c b/libavformat/ipfsgateway.c > index ed37e552dd..9b0d3dea59 100644 > --- a/libavformat/ipfsgateway.c > +++ b/libavformat/ipfsgateway.c > @@ -25,6 +25,12 @@ > #include "os_support.h" > #include "url.h" > > +// Define the posix PATH_MAX if not there already. > +// This fixes a compile issue for MSVC. > +#ifndef PATH_MAX > +#define PATH_MAX 4096 > +#endif > + > typedef struct IPFSGatewayContext { > AVClass *class; > URLContext *inner; > -- > 2.35.1 > > I did verify the size of PATH_MAX. On my pc (arch with GCC compiler) this value is defined as 4096. That seems enough to me. Another way to fix this is to add it in os_support.h. I didn't add it there because ipfsgateway.c is currently the only cross-platform code that makes use of this. Lastly, I don't have an MSVC compiler and windows to test this on. I hope someone else in that setup can verify that this does indeed fix the ffmpeg master build? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".