Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393515 - sci-geosciences/gpsd-3.3 - fix build on MIPS
Summary: sci-geosciences/gpsd-3.3 - fix build on MIPS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: Normal normal
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2011-12-07 13:45 UTC by Manuel Lauss
Modified: 2012-01-13 17:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix build on platforms which don't have c_ispeed/c_ospeed in struct termios (gpsd-3.3-serialfix.patch,1.01 KB, patch)
2011-12-07 13:46 UTC, Manuel Lauss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Lauss 2011-12-07 13:45:36 UTC
Fixes a compile failure on MIPS where glibc is missing the
"c_ispeed" and "c_ospeed" members in struct termios.
Instead of accessing them directly, use the predetermined
getter functions, like is done everywhere else in the gpsd
source.

Run-tested on MIPSel.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>

--- serial.c.gpsd~3.3	2011-12-07 14:38:03.424877170 +0100
+++ serial.c	2011-12-07 14:38:51.077109900 +0100
@@ -594,7 +594,7 @@ void gpsd_close(struct gps_device_t *ses
 	 * obscure Linux 2.6 kernel bug that disables threaded
 	 * ioctl(TIOCMWAIT) on a device after tcsetattr() is called.
 	 */
-	if (session->ttyset_old.c_ispeed != session->ttyset.c_ispeed || (session->ttyset_old.c_cflag & CSTOPB) != (session->ttyset.c_cflag & CSTOPB)) {
+	if (cfgetispeed(&session->ttyset_old) != cfgetispeed(&session->ttyset) || (session->ttyset_old.c_cflag & CSTOPB) != (session->ttyset.c_cflag & CSTOPB)) {
 	    /*@ ignore @*/
 	    (void)cfsetispeed(&session->ttyset_old,
 			      (speed_t) session->gpsdata.dev.baudrate);


Reproducible: Always
Comment 1 Manuel Lauss 2011-12-07 13:46:20 UTC
Created attachment 295081 [details, diff]
fix build on platforms which don't have c_ispeed/c_ospeed in struct termios
Comment 2 SpanKY gentoo-dev 2012-01-13 17:20:52 UTC
fixed in gpsd-3.4 and sent upstream