Undefined ptrdiff_t symbol

Alexandre Savard <[email protected]> Tue, 10 May 2011 10:38:47 -0400 (EDT)
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <2005002746.4680.1305038327531.JavaMail.root@mail.savoirfairelinux.com>
Hi all,

SFLphone does not compile on Fedora 15 with the following error:

from /usr/include/ccrtp/ioqueue.h:47
error: 'ptrdiff_t' does not name a type

which can be easily fixed by the following two patches applied to
src/ccrtp/iqueue.h and src/ccrtp/sources.h respectively.

Tested with ccrtp-1.8.0

Regards,

Alexandre

--- iqueue.h	2010-04-18 14:51:49.000000000 -0400
+++ iqueue_patched.h	2011-05-10 10:20:11.000000000 -0400
@@ -894,7 +894,7 @@
 	public:
 		typedef std::forward_iterator_tag iterator_category;
 		typedef SyncSource value_type;
-		typedef ptrdiff_t difference_type;
+		typedef std::ptrdiff_t difference_type;
 		typedef const SyncSource* pointer;
 		typedef const SyncSource& reference;



--- sources.h	2010-04-18 14:51:49.000000000 -0400
+++ sources_patched.h	2011-05-10 10:20:43.000000000 -0400
@@ -406,7 +406,7 @@
 	public:
 		typedef std::forward_iterator_tag iterator_category;
 		typedef Participant value_type;
-		typedef ptrdiff_t difference_type;
+		typedef std::ptrdiff_t difference_type;
 		typedef const Participant* pointer;
 		typedef const Participant& reference;