forked from NetBSD/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix build issue for SmartOS, the testing log is here: NetBSD#79
- Loading branch information
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- gpsd.h-orig Tue Dec 29 05:25:00 2020 | ||
+++ gpsd.h Tue Dec 29 05:25:50 2020 | ||
@@ -1077,7 +1077,7 @@ | ||
#define NAN (0.0f/0.0f) | ||
#endif | ||
|
||
-#if !defined(HAVE_CFMAKERAW) | ||
+#if !defined(HAVE_CFMAKERAW) || defined(__sun) | ||
/* | ||
* POSIX does not specify cfmakeraw, but it is pretty common. We | ||
* provide an implementation in serial.c for systems that lack it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- gpspipe.c-orig Tue Dec 29 05:30:39 2020 | ||
+++ gpspipe.c Tue Dec 29 05:32:35 2020 | ||
@@ -85,7 +85,15 @@ | ||
memset(&newtio, 0, sizeof(newtio)); | ||
|
||
/* make it raw */ | ||
+#if defined(__sun) | ||
+ newtio.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); | ||
+ newtio.c_oflag &= ~OPOST; | ||
+ newtio.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); | ||
+ newtio.c_cflag &= ~(CSIZE|PARENB); | ||
+ newtio.c_cflag |= CS8; | ||
+#else | ||
(void)cfmakeraw(&newtio); | ||
+#endif | ||
/* set speed */ | ||
(void)cfsetospeed(&newtio, BAUDRATE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- serial.c-orig Tue Dec 29 05:16:05 2020 | ||
+++ serial.c Tue Dec 29 05:17:32 2020 | ||
@@ -178,7 +178,7 @@ | ||
session->reawake = (time_t)0; | ||
} | ||
|
||
-#if !defined(HAVE_CFMAKERAW) | ||
+#if !defined(HAVE_CFMAKERAW) || defined(__sun) | ||
/* | ||
* Local implementation of cfmakeraw (which is not specified by | ||
* POSIX; see matching declaration in gpsd.h). | ||
@@ -187,7 +187,7 @@ | ||
void cfmakeraw(struct termios *termios_p) | ||
{ | ||
termios_p->c_iflag &= | ||
- ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); | ||
+ ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); | ||
termios_p->c_oflag &= ~OPOST; | ||
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); | ||
termios_p->c_cflag &= ~(CSIZE | PARENB); |