From 7395087031dc7ee82cb8b5c1ad2acbe455ba21f7 Mon Sep 17 00:00:00 2001 From: enselic Date: Thu, 12 Mar 2009 07:09:01 +0000 Subject: Applied patch from Kevin Lo that fixes compilation on FreeBSD by addressing include and format string issues. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@599 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/rmd.c | 1 + recordmydesktop/src/rmd_cache.c | 2 ++ recordmydesktop/src/rmd_cache_frame.c | 1 + recordmydesktop/src/rmd_capture_sound.c | 4 ++++ recordmydesktop/src/rmd_flush_to_ogg.c | 1 + recordmydesktop/src/rmd_get_frame.c | 1 + recordmydesktop/src/rmd_make_dummy_pointer.c | 2 +- recordmydesktop/src/rmd_queryextensions.c | 1 + recordmydesktop/src/rmd_rescue.c | 1 + recordmydesktop/src/rmd_specsfile.c | 10 ++++++---- recordmydesktop/src/rmd_timer.c | 1 + 11 files changed, 20 insertions(+), 5 deletions(-) diff --git a/recordmydesktop/src/rmd.c b/recordmydesktop/src/rmd.c index 128399c..339244b 100644 --- a/recordmydesktop/src/rmd.c +++ b/recordmydesktop/src/rmd.c @@ -43,6 +43,7 @@ #include #include +#include #include int main(int argc,char **argv){ diff --git a/recordmydesktop/src/rmd_cache.c b/recordmydesktop/src/rmd_cache.c index 2d0b00e..61111b7 100644 --- a/recordmydesktop/src/rmd_cache.c +++ b/recordmydesktop/src/rmd_cache.c @@ -30,6 +30,8 @@ #include "rmd_specsfile.h" #include "rmd_types.h" +#include +#include #include #include #include diff --git a/recordmydesktop/src/rmd_cache_frame.c b/recordmydesktop/src/rmd_cache_frame.c index 41197a8..999d3c4 100644 --- a/recordmydesktop/src/rmd_cache_frame.c +++ b/recordmydesktop/src/rmd_cache_frame.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/recordmydesktop/src/rmd_capture_sound.c b/recordmydesktop/src/rmd_capture_sound.c index 8057311..e4498c0 100644 --- a/recordmydesktop/src/rmd_capture_sound.c +++ b/recordmydesktop/src/rmd_capture_sound.c @@ -34,6 +34,10 @@ #include #include #include +#include +#include +#include +#include void *rmdCaptureSound(ProgData *pdata){ diff --git a/recordmydesktop/src/rmd_flush_to_ogg.c b/recordmydesktop/src/rmd_flush_to_ogg.c index f672137..9a443b1 100644 --- a/recordmydesktop/src/rmd_flush_to_ogg.c +++ b/recordmydesktop/src/rmd_flush_to_ogg.c @@ -36,6 +36,7 @@ #include #include #include +#include diff --git a/recordmydesktop/src/rmd_get_frame.c b/recordmydesktop/src/rmd_get_frame.c index dd2a818..b4ce53c 100644 --- a/recordmydesktop/src/rmd_get_frame.c +++ b/recordmydesktop/src/rmd_get_frame.c @@ -43,6 +43,7 @@ #include #include #include +#include #define AVG_4_PIXELS(data_array,width_img,k_tm,i_tm,offset)\ diff --git a/recordmydesktop/src/rmd_make_dummy_pointer.c b/recordmydesktop/src/rmd_make_dummy_pointer.c index d86c7e5..ef8d164 100644 --- a/recordmydesktop/src/rmd_make_dummy_pointer.c +++ b/recordmydesktop/src/rmd_make_dummy_pointer.c @@ -31,7 +31,7 @@ #include "rmd_types.h" #include - +#include unsigned char *rmdMakeDummyPointer(Display *display, DisplaySpecs *specs, diff --git a/recordmydesktop/src/rmd_queryextensions.c b/recordmydesktop/src/rmd_queryextensions.c index 0995844..a7ecab0 100644 --- a/recordmydesktop/src/rmd_queryextensions.c +++ b/recordmydesktop/src/rmd_queryextensions.c @@ -32,6 +32,7 @@ #include #include #include +#include diff --git a/recordmydesktop/src/rmd_rescue.c b/recordmydesktop/src/rmd_rescue.c index 64d9c73..8b823a7 100644 --- a/recordmydesktop/src/rmd_rescue.c +++ b/recordmydesktop/src/rmd_rescue.c @@ -37,6 +37,7 @@ #include #include +#include int rmdRescue(const char *path){ diff --git a/recordmydesktop/src/rmd_specsfile.c b/recordmydesktop/src/rmd_specsfile.c index 1b25eeb..11b55dc 100644 --- a/recordmydesktop/src/rmd_specsfile.c +++ b/recordmydesktop/src/rmd_specsfile.c @@ -51,9 +51,9 @@ int rmdWriteSpecsFile(ProgData *pdata){ fprintf(fp,"NoSound = %d\n",pdata->args.nosound); fprintf(fp,"Frequency = %d\n",pdata->args.frequency); fprintf(fp,"Channels = %d\n",pdata->args.channels); - fprintf(fp,"BufferSize = %lu\n",pdata->args.buffsize); + fprintf(fp,"BufferSize = %lu\n",(unsigned long)pdata->args.buffsize); fprintf(fp,"SoundFrameSize = %d\n",pdata->sound_framesize); - fprintf(fp,"PeriodSize = %lu\n",pdata->periodsize); + fprintf(fp,"PeriodSize = %lu\n",(unsigned long)pdata->periodsize); fprintf(fp,"UsedJack = %d\n",pdata->args.use_jack); fprintf(fp,"v_bitrate = %d\n",pdata->args.v_bitrate); fprintf(fp,"v_quality = %d\n",pdata->args.v_quality); @@ -119,7 +119,8 @@ int rmdReadSpecsFile(ProgData *pdata){ fprintf(stderr,"Error reading Channels attribute!!!\n"); return 1; } - if(fscanf(fp,"BufferSize = %lu\n",&pdata->args.buffsize)!=1){ + if(fscanf(fp,"BufferSize = %lu\n", + (unsigned long *)&pdata->args.buffsize)!=1){ fprintf(stderr,"Error reading BufferSize attribute!!!\n"); return 1; } @@ -127,7 +128,8 @@ int rmdReadSpecsFile(ProgData *pdata){ fprintf(stderr,"Error reading SoundFrameSize attribute!!!\n"); return 1; } - if(fscanf(fp,"PeriodSize = %lu\n",&pdata->periodsize)!=1){ + if(fscanf(fp,"PeriodSize = %lu\n", + (unsigned long *)&pdata->periodsize)!=1){ fprintf(stderr,"Error reading PeriodSize attribute!!!\n"); return 1; } diff --git a/recordmydesktop/src/rmd_timer.c b/recordmydesktop/src/rmd_timer.c index 8891cc3..af6fa75 100644 --- a/recordmydesktop/src/rmd_timer.c +++ b/recordmydesktop/src/rmd_timer.c @@ -34,6 +34,7 @@ #include #include #include +#include void *rmdTimer(ProgData *pdata){ -- cgit v1.2.3