diff -Nru cqrlog-1.2.2/debian/changelog cqrlog-1.2.2/debian/changelog
--- cqrlog-1.2.2/debian/changelog	2011-12-16 07:05:12.000000000 +0800
+++ cqrlog-1.2.2/debian/changelog	2012-04-24 04:03:36.000000000 +0800
@@ -1,3 +1,10 @@
+cqrlog (1.2.2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixes FTBFS with fpc-2.6.0 (Closes: #661122)
+
+ -- Kefu Chai <tchaikov@gmail.com>  Tue, 24 Apr 2012 03:55:56 +0800
+
 cqrlog (1.2.2-2) unstable; urgency=low
 
   * debian/control: fixed alternative dependency order for lazarus, lcl
diff -Nru cqrlog-1.2.2/debian/patches/fix-ftbfs cqrlog-1.2.2/debian/patches/fix-ftbfs
--- cqrlog-1.2.2/debian/patches/fix-ftbfs	1970-01-01 08:00:00.000000000 +0800
+++ cqrlog-1.2.2/debian/patches/fix-ftbfs	2012-04-24 03:45:37.000000000 +0800
@@ -0,0 +1,13 @@
+Index: cqrlog-1.2.2/src/synaser.pas
+===================================================================
+--- cqrlog-1.2.2.orig/src/synaser.pas	2012-04-24 03:42:24.634550343 +0800
++++ cqrlog-1.2.2/src/synaser.pas	2012-04-24 03:44:50.129780140 +0800
+@@ -1899,7 +1899,7 @@
+   {$IFNDEF FPC}
+   SerialCheck(ioctl(integer(FHandle), TCFLSH, TCIOFLUSH));
+   {$ELSE}
+-  SerialCheck(fpioctl(integer(FHandle), TCFLSH, TCIOFLUSH));
++  SerialCheck(fpioctl(integer(FHandle), TCFLSH, Pointer(PtrInt(TCIOFLUSH))));
+   {$ENDIF}
+   FBuffer := '';
+   ExceptCheck;
diff -Nru cqrlog-1.2.2/debian/patches/series cqrlog-1.2.2/debian/patches/series
--- cqrlog-1.2.2/debian/patches/series	1970-01-01 08:00:00.000000000 +0800
+++ cqrlog-1.2.2/debian/patches/series	2012-04-24 03:54:04.000000000 +0800
@@ -0,0 +1 @@
+fix-ftbfs
