linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] mediastreamer2 compile troubles on Fedora 7


From: Simon Morlat
Subject: Re: [Linphone-users] mediastreamer2 compile troubles on Fedora 7
Date: Thu, 24 Jan 2008 22:16:53 +0100
User-agent: KMail/1.9.7

Hi,

Those compilation bugs are already solved in the CVS.
I'm sorry to have make you loose your time on this: indeed I made too 
unfrequent mediastreamer2 releases those last times.

regards,

Simon

Le Thursday 17 January 2008 16:52:25 Roman Imankulov, vous avez écrit :
> Hi,
>
> I'm trying to build mediastreamer-2.1.0 against Fedora 7 and discover
> strange errors during compilation. When I'm doing ./configure && make I get
> these messages:
>
> if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
> -I.. -I../include/   -I.. -D_REENTRANT -DORTP_INET6      -DORTP_INET6
> -DINET6 -Wall -O2 -g  -pthread -D_REENTRANT -MT ice.lo -MD -MP -MF
> ".deps/ice.Tpo" -c -o ice.lo ice.c; \
>         then mv -f ".deps/ice.Tpo" ".deps/ice.Plo"; else rm -f
> ".deps/ice.Tpo"; exit 1; fi
>  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include/ -I.. -D_REENTRANT
> -DORTP_INET6 -DORTP_INET6 -DINET6 -Wall -O2 -g -pthread -D_REENTRANT -MT
> ice.lo -MD -MP -MF .deps/ice.Tpo -c ice.c  -fPIC -DPIC -o .libs/ice.o
> ice.c:31: error: expected declaration specifiers or '...' before 'bool'
> ice.c:36: error: expected declaration specifiers or '...' before 'bool'
> ice.c: In function 'ice_sendtest':
> ice.c:38: error: 'bool' undeclared (first use in this function)
>
> [SKIPPED]
>
> make[1]: Leaving directory
> `/home/cyx/Download/soft/Phone/mediastreamer-2.1.0'
> make: *** [all] Error 2
>
> I found out that there is type "bool" and constants "true" and "false"
> occurred in the src/ice.c whereas another code of mediastreamer uses
> "bool_t". Moreover, I'm not sure but I think that variable
> "switch_to_address" (near line 217) have to be of type "int" not "bool".
>
> The patch which helps me to build mediastreamer (./configure
> --disable-strict && make && make install) without errors is below. I'd like
> to know if these troubles due to the bug in the "ice.c" or I'm doing
> something wrong... I'm ready to give some additional information about my
> build environment (installed libraries, etc).
>
> Thank you.
>
>
> --- src/ice.c.orig      2008-01-17 20:08:19.000000000 +0500
> +++ src/ice.c   2008-01-17 20:10:54.000000000 +0500
> @@ -28,16 +28,16 @@
>  static void
>  ice_sendtest( Socket myFd, StunAddress4 *dest,
>                const StunAtrString *username, const StunAtrString
> *password,
> -              int testNum, bool verbose , UInt128 *tid);
> +              int testNum, bool_t verbose , UInt128 *tid);
>
>  static void
>  ice_sendtest( Socket myFd, StunAddress4 *dest,
>                const StunAtrString *username, const StunAtrString
> *password,
> -              int testNum, bool verbose , UInt128 *tid)
> +              int testNum, bool_t verbose , UInt128 *tid)
>  {
> -   bool changePort=false;
> -   bool changeIP=false;
> -   bool discard=false;
> +   bool_t changePort=FALSE;
> +   bool_t changeIP=FALSE;
> +   bool_t discard=FALSE;
>
>     StunMessage req;
>     char buf[STUN_MAX_MESSAGE_SIZE];
> @@ -50,17 +50,17 @@
>        case 11:
>           break;
>        case 2:
> -         /* changePort=true; */
> -         changeIP=true;
> +         /* changePort=TRUE; */
> +         changeIP=TRUE;
>           break;
>        case 3:
> -         changePort=true;
> +         changePort=TRUE;
>           break;
>        case 4:
> -         changeIP=true;
> +         changeIP=TRUE;
>           break;
>        case 5:
> -         discard=true;
> +         discard=TRUE;
>           break;
>        default:
>           printf("Test %i is unkown\n", testNum);
> @@ -118,7 +118,7 @@
>              StunAddress4 stunServerAddr;
>              StunAtrString username;
>              StunAtrString password;
> -            bool res;
> +            bool_t res;
>
>              int  pad_size;
>
>              struct CandidatePair *cand_pair = &remote_candidates[pos];
> @@ -156,10 +156,10 @@
>
>              res = stunParseServerName(cand_pair->remote_candidate.ipaddr,
>                  &stunServerAddr);
> -            if ( res == true )
> +            if ( res == TRUE )
>              {
>                  stunServerAddr.port = cand_pair->remote_candidate.port;
> -                ice_sendtest(media_socket, &stunServerAddr, &username,
> &password, 1, 0/*false*/,
> +                ice_sendtest(media_socket, &stunServerAddr, &username,
> &password, 1, 0/*FALSE*/,
>                      &(cand_pair->tid));
>              }
>          }
> @@ -217,9 +217,9 @@
>
>  int ice_process_stun_message(RtpSession *session, struct CandidatePair
> *remote_candidates, OrtpEvent *evt)
>  {
> -    bool switch_to_address = -1;
> +    int switch_to_address = -1;
>      StunMessage msg;
> -    bool res;
> +    bool_t res;
>      int already_worked_once=-1;
>      OrtpEventData *evt_data = ortp_event_get_data(evt);
>      mblk_t *mp = evt_data->packet;
> @@ -296,8 +296,8 @@
>          StunAddress4 secondary;
>          StunAddress4 myAddr;
>          StunAddress4 myAltAddr;
> -        bool changePort = false;
> -        bool changeIp = false;
> +        bool_t changePort = FALSE;
> +        bool_t changeIp = FALSE;
>          struct sockaddr_storage name;
>          socklen_t namelen;
>          char localip[128];
> @@ -345,7 +345,7 @@
>              &hmacPassword,
>              &changePort,
>              &changeIp,
> -            false );
> +            FALSE );
>
>          if (!res)
>          {
> @@ -353,15 +353,15 @@
>              return -1;
>          }
>
> -        if (changePort == true || changeIp == true)
>
>
>
> +        if (changePort == TRUE || changeIp == TRUE)
>          {
>              ms_error("ice.c: STUN request with changePort or changeIP
> refused.");
>              return -1;
>          }
>
> -        res=true;
> -        if ( dest.addr == 0 ) res=false;
> -        if ( dest.port == 0 ) res=false;
> +        res=TRUE;
> +        if ( dest.addr == 0 ) res=FALSE;
> +        if ( dest.port == 0 ) res=FALSE;
>          if (!res)
>          {
>              ms_error("ice.c: Missing destination value for response.");
> @@ -369,7 +369,7 @@
>          }
>
>
> -        if (msg.hasUsername!=true || msg.username.sizeValue<=0)
> +        if (msg.hasUsername!=TRUE || msg.username.sizeValue<=0)
>          {
>              /* reply 430 */
>              ms_error("ice.c: Missing or bad username value.");
> @@ -471,9 +471,9 @@
>          {
>              char buf[STUN_MAX_MESSAGE_SIZE];
>              int len = sizeof(buf);
> -            len = stunEncodeMessage( &resp, buf, len, &hmacPassword,false
> );
> +            len = stunEncodeMessage( &resp, buf, len, &hmacPassword,FALSE
> );
>              if (len)
> -                sendMessage( rtp_socket, buf, len, dest.addr, dest.port,
> false );
> +                sendMessage( rtp_socket, buf, len, dest.addr, dest.port,
> FALSE );
>          }
>      }
>      else
> @@ -483,7 +483,7 @@
>          StunAddress4 mappedAddr;
>          memset(&resp, 0, sizeof(StunMessage));
>          res = stunParseMessage((char*)mp->b_rptr, mp->b_wptr-mp->b_rptr,
> -            &resp, false );
> +            &resp, FALSE );
>          if (!res)
>          {
>              ms_error("ice.c: Bad format for STUN answer.");






reply via email to

[Prev in Thread] Current Thread [Next in Thread]