Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build issue for SmartOS, the testing log is here: https://github.… #80

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions geography/gpsd/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ SHA1 (gpsd-3.21.tar.gz) = f32d7b18c7be98c4a1385af789b61be55a64c433
RMD160 (gpsd-3.21.tar.gz) = 3c521009854e2ae19bcd4f7fb0f0c33c334bcbc5
SHA512 (gpsd-3.21.tar.gz) = 7fbff3698a44ef24ce4631f1d0c5192b70c2e47f28e61372d8d0c437a6b4aeee459b08dcd69d9dc02bbda7b56949fd01ac57460fb922b5f807455f4ab3e91f2d
Size (gpsd-3.21.tar.gz) = 3984157 bytes
SHA1 (patch-serial.c) = 2f947976a7df43789c9d06d2f6b3f6c652f36aa0
SHA1 (patch-gpsd.h) = 140862d581fa1c605254063011bca13861910af4
SHA1 (patch-gpspipe.c) = 59b897d1642365612833924a74bf82c251beeadf
11 changes: 11 additions & 0 deletions geography/gpsd/patches/patch-gpsd.h
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.
17 changes: 17 additions & 0 deletions geography/gpsd/patches/patch-gpspipe.c
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);
20 changes: 20 additions & 0 deletions geography/gpsd/patches/patch-serial.c
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);