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 929DB4711F for ; Thu, 27 Jul 2023 18:51:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E36BC68CA97; Thu, 27 Jul 2023 21:51:32 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8DE268C962 for ; Thu, 27 Jul 2023 21:51:25 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5A33140003; Thu, 27 Jul 2023 18:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amyspark.me; s=gm1; t=1690483885; 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; bh=1Vnh7PHSFtBxJ4ga1PZxITJ8L5QzVyY0U/h/jyjrh/s=; b=l3/CmhVh8ptoLBfs+P+ZsoiXPGTIn5vwOKSVekECKzfNuTvOVd05lNSgWmQt/tGoSfBMfe z3RhnSuD9HNrhywqlrUMDg3fP919fjYWvvZZ7gXa9U21mGhLVhc6q0nXrsbMWjPjTrJbQv pvW8GlFnsV5nIlAY+2N7u/vWb+TCUZyvLcKYGCmEMmuqdx6IIvQsF8quvphZIxHfQfMn0b NIxaiacXTCtBm6DQpvhmLfdBVUT85avoxvCLVl6YboUZtrr4n5iGnWoraiTO7JMBf+TFg+ g6XTwyey64R5+17iEemAiOxx4PunY3i+lJqkNlqOVZwyfsVtuqafXZ91UNZuYA== Message-ID: Date: Thu, 27 Jul 2023 15:51:19 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: "L. E. Segovia" To: ffmpeg-devel@ffmpeg.org Content-Language: en-US X-GND-Sasl: amy@amyspark.me Subject: [FFmpeg-devel] [PATCH] 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".