Package: freerdp2
Version: 2.0.0~git20161130.1.e60d0d5+dfsg1-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Package freerdp2_2.0.0~git20161130.1.e60d0d5+dfsg1-1 FTBFS on mips, mipsel and 
mips64el with following error:

> /«BUILDDIR»/freerdp2-2.0.0~git20161130.1.e60d0d5+dfsg1/winpr/libwinpr/comm/comm_serial_sys.c:459:51:
>  error: 'CMSPAR' undeclared (first use in this function)
>     upcomingTermios.c_cflag &= ~(PARENB | PARODD | CMSPAR);
>                                                    ^~~~~~
> /«BUILDDIR»/freerdp2-2.0.0~git20161130.1.e60d0d5+dfsg1/winpr/libwinpr/comm/comm_serial_sys.c:459:51:
>  note: each undeclared identifier is reported only once for > each function 
> it appears in
> /«BUILDDIR»/freerdp2-2.0.0~git20161130.1.e60d0d5+dfsg1/winpr/libwinpr/comm/comm_serial_sys.c:
>  In function '_get_line_control':
> /«BUILDDIR»/freerdp2-2.0.0~git20161130.1.e60d0d5+dfsg1/winpr/libwinpr/comm/comm_serial_sys.c:542:36:
>  error: 'CMSPAR' undeclared (first use in this function)
>   else if (currentTermios.c_cflag & CMSPAR)
>                                     ^~~~~~
> winpr/libwinpr/CMakeFiles/winpr.dir/build.make:569: recipe for target 
> 'winpr/libwinpr/CMakeFiles/winpr.dir/comm/comm_serial_sys.c.o' failed
> make[3]: *** [winpr/libwinpr/CMakeFiles/winpr.dir/comm/comm_serial_sys.c.o] 
> Error 1

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=freerdp2&arch=mipsel&ver=2.0.0~git20161130.1.e60d0d5%2Bdfsg1-1&stamp=1486123249&raw=0

The problem occurs because bits/termios.h from glibc for mips does not define 
CMSPAR.

A similar problem has already been seen in freedp package for buildroot:
https://git.busybox.net/buildroot/diff/package/freerdp/0003-add-missing-define.patch?id=78cd32631e959e04b1a2f18be7b0757e21482438

I have created and attached a patch that define CMSPAR if it is not already 
defined.
With this patch package builds successfully on mips, mipsel and  mips64el.

Regards,
Radovan
--- freerdp2-2.0.0~git20161130.1.e60d0d5+dfsg1.orig/winpr/libwinpr/comm/comm_serial_sys.c
+++ freerdp2-2.0.0~git20161130.1.e60d0d5+dfsg1/winpr/libwinpr/comm/comm_serial_sys.c
@@ -37,6 +37,12 @@
 #include <winpr/crt.h>
 #include <winpr/wlog.h>
 
+#if defined __mips__
+#if !defined CMSPAR
+#define CMSPAR    010000000000  /* mark or space (stick) parity */
+#endif
+#endif
+
 /* hard-coded in N_TTY */
 #define TTY_THRESHOLD_THROTTLE		128 /* now based on remaining room */
 #define TTY_THRESHOLD_UNTHROTTLE 	128

Reply via email to