Bug#421136: FTBFS with GCC 4.3: missing #includes; extra ;
Martin Michlmayr
tbm at cyrius.com
Thu Apr 26 17:25:42 UTC 2007
Package: libccrtp
Version: 1.5.1-1
Usertags: ftbfs-gcc-4.3
Tags: patch
Your package fails to build with GCC 4.3. Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.
Problem 1: in GCC 4.3, the C++ header dependencies have been cleaned
up. The advantage of this is that programs will compile faster. The
downside is that you actually need to directly #include everything you
use (but you really should do this anyway, otherwise your program
won't work with any compiler other than GCC). Some background of this
can be found at http://gcc.gnu.org/PR28080
Problem 2: you mustn't put a semicolon after functions.
You can reproduce this problem with gcc-snapshot (20070422-1 or higher)
from unstable. (Currently not available for i386, but for amd64, powerpc
and ia64. I hope to have i386 binaries in the archive in the near
future.)
> Automatic build of libccrtp_1.5.1-1 on em64t by sbuild/amd64 0.53
...
> g++ -DHAVE_CONFIG_H -I. -I. -I. -Wall -ansi -pedantic -g -Wall -O2 -D_GNU_SOURCE -c rtppkt.cpp -fPIC -DPIC -o .libs/rtppkt.o
> In file included from private.h:88,
> from rtppkt.cpp:44:
> /usr/include/cc++/config.h:1088:28: error: bits/atomicity.h: No such file or directory
> In file included from rtppkt.cpp:45:
> ./ccrtp/rtppkt.h:124: warning: type qualifiers ignored on function return type
> ./ccrtp/rtppkt.h:271: warning: type qualifiers ignored on function return type
> ./ccrtp/rtppkt.h:282: error: extra ';'
> ./ccrtp/rtppkt.h:286: error: extra ';'
> ./ccrtp/rtppkt.h:297: error: extra ';'
> ./ccrtp/rtppkt.h:339: error: extra ';'
> ./ccrtp/rtppkt.h:468: error: extra ';'
> ./ccrtp/rtppkt.h:476: error: extra ';'
> ./ccrtp/rtppkt.h:484: error: extra ';'
> ./ccrtp/rtppkt.h:582: error: extra ';'
> make[4]: *** [rtppkt.lo] Error 1
> make[4]: Leaving directory `/build/tbm/libccrtp-1.5.1/src'
--- src/ccrtp/rtppkt.h~ 2007-04-26 17:09:32.000000000 +0000
+++ src/ccrtp/rtppkt.h 2007-04-26 17:10:57.000000000 +0000
@@ -279,11 +279,11 @@
**/
inline uint32
getRawPacketSize() const
- { return total; };
+ { return total; }
inline uint32
getRawPacketSizeSrtp() const
- { return total + srtpLength; };
+ { return total + srtpLength; }
inline size_t
getSizeOfFixedHeader() const
@@ -294,7 +294,7 @@
* Destructor, free the buffer provided in the constructor.
**/
inline virtual ~RTPPacket()
- { endPacket(); };
+ { endPacket(); }
/**
* Free memory allocated for the packet.
@@ -336,7 +336,7 @@
**/
inline uint32
getRawTimestamp() const
- { return ntohl(getHeader()->timestamp); };
+ { return ntohl(getHeader()->timestamp); }
inline void
setbuffer(const void* src, size_t len, size_t pos)
@@ -465,7 +465,7 @@
* @return low level 2833 data structure.
*/
inline struct RFC2833Payload *getRaw2833Payload(void)
- {return (struct RFC2833Payload *)getPayload();};
+ {return (struct RFC2833Payload *)getPayload();}
/**
* Fetch 2833 duration field.
@@ -473,7 +473,7 @@
* @return 2833 duration in native host machine byte order.
*/
inline uint16 get2833Duration(void)
- {return ntohs(getRaw2833Payload()->duration);};
+ {return ntohs(getRaw2833Payload()->duration);}
/**
* Set 2833 duration field.
@@ -481,7 +481,7 @@
* @param timestamp to use, native host machine byte order.
*/
inline void set2833Duration(uint16 timestamp)
- {getRaw2833Payload()->duration = htons(timestamp);};
+ {getRaw2833Payload()->duration = htons(timestamp);}
};
/**
@@ -579,7 +579,7 @@
**/
inline void
setPayloadType(PayloadType pt)
- { getHeader()->payload = pt; };
+ { getHeader()->payload = pt; }
/**
* Sets the sequence number in the header.
--- src/ccrtp/queuebase.h~ 2007-04-26 17:11:26.000000000 +0000
+++ src/ccrtp/queuebase.h 2007-04-26 17:11:38.000000000 +0000
@@ -95,7 +95,7 @@
*/
inline PayloadType
getType() const
- { return datablock->getPayloadType(); };
+ { return datablock->getPayloadType(); }
/**
* Get data as it is received in RTP packets (i.e. for
@@ -106,14 +106,14 @@
**/
inline const uint8* const
getData() const
- { return datablock->getPayload(); };
+ { return datablock->getPayload(); }
/**
* @return length of data in octets
**/
size_t
getSize() const
- { return datablock->getPayloadSize(); };
+ { return datablock->getPayloadSize(); }
/**
* @return Source that sent this data
--- src/ccrtp/iqueue.h~ 2007-04-26 17:11:59.000000000 +0000
+++ src/ccrtp/iqueue.h 2007-04-26 17:12:02.000000000 +0000
@@ -432,7 +432,7 @@
* @return 32 bit timestamp starting from 0 for each source.
*/
inline uint32 getTimestamp() const
- { return shiftedTimestamp; };
+ { return shiftedTimestamp; }
inline void setTimestamp(uint32 ts)
{ shiftedTimestamp = ts;}
--- src/ccrtp/oqueue.h~ 2007-04-26 17:12:16.000000000 +0000
+++ src/ccrtp/oqueue.h 2007-04-26 17:12:29.000000000 +0000
@@ -540,11 +540,11 @@
void purgeOutgoingQueue();
virtual void
- setControlPeer(const InetAddress &host, tpport_t port) {};
+ setControlPeer(const InetAddress &host, tpport_t port) {}
#ifdef CCXX_IPV6
virtual void
- setControlPeerIPV6(const IPV6Address &host, tpport_t port) {};
+ setControlPeerIPV6(const IPV6Address &host, tpport_t port) {}
#endif
// The crypto contexts for outgoing SRTP sessions.
@@ -561,11 +561,11 @@
{ }
virtual void
- setDataPeer(const InetAddress &host, tpport_t port) {};
+ setDataPeer(const InetAddress &host, tpport_t port) {}
#ifdef CCXX_IPV6
virtual void
- setDataPeerIPV6(const IPV6Address &host, tpport_t port) {};
+ setDataPeerIPV6(const IPV6Address &host, tpport_t port) {}
#endif
/**
@@ -578,11 +578,11 @@
* @return number of bytes sent.
**/
virtual size_t
- sendData(const unsigned char* const buffer, size_t len) {return 0;};
+ sendData(const unsigned char* const buffer, size_t len) {return 0;}
#ifdef CCXX_IPV6
virtual size_t
- sendDataIPV6(const unsigned char* const buffer, size_t len) {return 0;};
+ sendDataIPV6(const unsigned char* const buffer, size_t len) {return 0;}
#endif
static const microtimeout_t defaultSchedulingTimeout;
--- src/ccrtp/ioqueue.h~ 2007-04-26 17:13:46.000000000 +0000
+++ src/ccrtp/ioqueue.h 2007-04-26 17:13:50.000000000 +0000
@@ -282,7 +282,7 @@
{ return; }
void renewLocalSSRC()
- {IncomingDataQueue::renewLocalSSRC();};
+ {IncomingDataQueue::renewLocalSSRC();}
private:
RTPDataQueue(const RTPDataQueue &o);
--- src/ccrtp/cqueue.h~ 2007-04-26 17:14:11.000000000 +0000
+++ src/ccrtp/cqueue.h 2007-04-26 17:14:25.000000000 +0000
@@ -131,7 +131,7 @@
*/
inline void
setEnd2EndDelay(microtimeout_t t)
- { end2EndDelay = t; };
+ { end2EndDelay = t; }
inline microtimeout_t
getDefaultEnd2EndDelay() const
@@ -156,7 +156,7 @@
*/
inline void
setSendersControlFraction(float fraction)
- { sendControlBwFract = fraction; recvControlBwFract = 1 - fraction;};
+ { sendControlBwFract = fraction; recvControlBwFract = 1 - fraction;}
/**
* Manually set the minimum interval for sending RTP compound
@@ -309,11 +309,11 @@
**/
inline void
setPrevMembersNum(uint32 n)
- { reconsInfo.rtcpPMembers = n; };
+ { reconsInfo.rtcpPMembers = n; }
inline uint32
getPrevMembersCount() const
- { return reconsInfo.rtcpPMembers; };
+ { return reconsInfo.rtcpPMembers; }
/**
* This method is used to send an RTCP BYE packet. An RTCP
--- src/ccrtp/rtp.h~ 2007-04-26 17:15:47.000000000 +0000
+++ src/ccrtp/rtp.h 2007-04-26 17:16:40.000000000 +0000
@@ -190,7 +190,7 @@
}
inline RTPDataChannel *getDSO(void)
- {return dso;};
+ {return dso;}
protected:
/**
@@ -528,10 +528,10 @@
{TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::controlTransmissionService();}
inline timeval getRTCPCheckInterval(void)
-{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::getRTCPCheckInterval();};
+{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::getRTCPCheckInterval();}
inline size_t dispatchDataPacket(void)
-{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::dispatchDataPacket();};
+{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::dispatchDataPacket();}
#if defined(_MSC_VER) && _MSC_VER >= 1300
virtual void run(void);
@@ -738,7 +738,7 @@
}
inline RTPDataChannel *getDSO(void)
- {return dso;};
+ {return dso;}
protected:
/**
@@ -1053,10 +1053,10 @@
{TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::controlTransmissionService();}
inline timeval getRTCPCheckInterval(void)
-{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::getRTCPCheckInterval();};
+{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::getRTCPCheckInterval();}
inline size_t dispatchDataPacket(void)
-{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::dispatchDataPacket();};
+{return TRTPSessionBase<RTPDataChannel,RTCPChannel,ServiceQueue>::dispatchDataPacket();}
#if defined(_MSC_VER) && _MSC_VER >= 1300
virtual void run(void);
--- src/queue.cpp~ 2007-04-26 17:13:09.000000000 +0000
+++ src/queue.cpp 2007-04-26 17:13:14.000000000 +0000
@@ -96,7 +96,7 @@
virtual std::ostream &strDigest(std::ostream &os) = 0;
friend std::ostream &operator<<(std::ostream &os, Digest &ia)
- {return ia.strDigest(os);};
+ {return ia.strDigest(os);}
public:
/**
@@ -149,7 +149,7 @@
void initDigest(void);
inline unsigned getSize(void)
- {return 16;};
+ {return 16;}
unsigned getDigest(unsigned char *buffer);
--- src/control.cpp~ 2007-04-26 17:14:31.000000000 +0000
+++ src/control.cpp 2007-04-26 17:14:43.000000000 +0000
@@ -43,6 +43,8 @@
#include "private.h"
#include <ccrtp/cqueue.h>
+#include <cstdlib>
+#include <climits>
#ifdef CCXX_NAMESPACES
namespace ost {
--
Martin Michlmayr
http://www.cyrius.com/
More information about the Pkg-voip-maintainers
mailing list