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 515DA4545B for ; Sat, 29 Jul 2023 18:48:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BEE7468C816; Sat, 29 Jul 2023 21:48:57 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FEF768BEC6 for ; Sat, 29 Jul 2023 21:48:51 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id F3A78C0003; Sat, 29 Jul 2023 18:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amyspark.me; s=gm1; t=1690656531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B23jA/vWyBvBKYUYKihC749v8DDAL9GZwVvLh7JPnNQ=; b=AQ8dp5Ywc5pN2wvBW/UmHYLHxUluBTivoEOH1SH3CdUgB2gasgHRRKJyuhghNN4ojcgPwq cQf2uCNLDlSeTldFlOXV+lhEVrIPSdcBlJGwoDqH/ohWKf4BuYJuICx77YaAXrFgIIkWgw 8COGgz8l7KEnL2QMyDgd8+B8hQF9McEsV8XPxj9UgI1FF+SxyR+9+H7HtWuQUCzDBDmFcI 18CBYu4G+mW986DgkStUJmq1Xygd+WlFmjcic0NVT6+Q66cNeo4duXCGUx3Vrah0GRU546 MDToZV/VC9i0z/AIMchd9lcccAA9hbU5zuvYfQC6iodXgPMNp2srgtPjeMt9DQ== Message-ID: Date: Sat, 29 Jul 2023 15:48:45 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: "L. E. Segovia" To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US In-Reply-To: X-GND-Sasl: amy@amyspark.me Subject: [FFmpeg-devel] [PATCH v2] os_support, network: Fix build failure on Windows with BZIP2 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: Including winsock2.h without WIN32_LEAN_AND_MEAN causes bzlib.h to parse as nonsense, due to an instance of #define char small in rpcndr.h (included transitively from windows.h). See: https://stackoverflow.com/a/27794577 Signed-off-by: L. E. Segovia --- libavformat/network.h | 1 + libavformat/os_support.c | 6 ++---- libavformat/os_support.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/network.h b/libavformat/network.h index ca214087fc..06b6117fc7 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -35,6 +35,7 @@ #endif #if HAVE_WINSOCK2_H +#define WIN32_LEAN_AND_MEAN #include #include diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 15cea7fa5b..2de6a7c3d9 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -34,11 +34,9 @@ #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ -#if HAVE_WINSOCK2_H -#include -#elif HAVE_SYS_SELECT_H +#if HAVE_SYS_SELECT_H #include -#endif /* HAVE_WINSOCK2_H */ +#endif /* HAVE_SYS_SELECT_H */ #endif /* !HAVE_POLL_H */ #include "network.h" diff --git a/libavformat/os_support.h b/libavformat/os_support.h index f2ff38e23b..5bdd275d70 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -140,6 +140,7 @@ typedef int socklen_t; typedef unsigned long nfds_t; #if HAVE_WINSOCK2_H +#define WIN32_LEAN_AND_MEAN #include #endif #if !HAVE_STRUCT_POLLFD -- 2.41.0 _______________________________________________ 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".