From c12c3facbd32c30267949ddf4eaa71ca5134718e Mon Sep 17 00:00:00 2001 From: Yaniv Kamay Date: Mon, 26 Oct 2009 23:30:41 +0200 Subject: [PATCH] fix build on Debian --- client/display_channel.cpp | 5 +---- client/windows/redc.vcproj | 4 ++-- client/x11/Makefile.am | 1 + common/linux/ffmpeg_inc.h.in | 12 ++++++++++++ common/win/ffmpeg_inc.h | 4 ++++ configure.ac | 7 +++++++ server/Makefile.am | 1 + server/red_worker.c | 2 +- server/reds.c | 8 +++++--- 9 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 common/linux/ffmpeg_inc.h.in create mode 100644 common/win/ffmpeg_inc.h diff --git a/client/display_channel.cpp b/client/display_channel.cpp index 5d3a7afd..2e2e4f56 100644 --- a/client/display_channel.cpp +++ b/client/display_channel.cpp @@ -40,10 +40,7 @@ #include "red_gdi_canvas.h" #endif #include "platform_utils.h" - -extern "C" { -#include "libavcodec/avcodec.h" -} +#include "ffmpeg_inc.h" static Mutex avcodec_mutex; diff --git a/client/windows/redc.vcproj b/client/windows/redc.vcproj index 90d235ca..f65e3a2f 100644 --- a/client/windows/redc.vcproj +++ b/client/windows/redc.vcproj @@ -41,7 +41,7 @@ #include #include -#include #include #include #include @@ -356,7 +355,10 @@ typedef struct PingItem { int size; } PingItem; -static uint8_t zero_page[PAGE_SIZE] = {0}; + +#define ZERO_BUF_SIZE 4096 + +static uint8_t zero_page[ZERO_BUF_SIZE] = {0}; static void reds_main_write(void *data); static void reds_push(); @@ -1085,7 +1087,7 @@ static void reds_prepare_ping_item(RedsOutItem *in_item, struct iovec* vec, int int pos = 2; while (size) { ASSERT(pos < REDS_MAX_SEND_IOVEC); - int now = MIN(PAGE_SIZE, size); + int now = MIN(ZERO_BUF_SIZE, size); size -= now; vec[pos].iov_base = zero_page; vec[pos].iov_len = now;