Add support for OpenIndiana.

Based on changes suggested by Reginald Beardsley <pulaskite@yahoo.com>.
This commit is contained in:
Daniel Beer 2014-07-05 10:35:07 +12:00
parent 89d81377fd
commit 9472dd46a9
3 changed files with 13 additions and 1 deletions

View File

@ -67,6 +67,8 @@ else
else ifneq ($(filter $(UNAME_S),FreeBSD DragonFly),)
OS_CFLAGS = -pthread
OS_LIBS = -lpthread
else ifneq ($(filter $(UNAME_S),SunOS),)
OS_LIBS = -lpthread -ldl -lresolv -lsocket -lnsl
else
OS_LIBS = -lpthread -ldl
endif

View File

@ -192,7 +192,7 @@ static int usbtr_flush(transport_t tr_base)
{
struct rf2500_transport *tr = (struct rf2500_transport *)tr_base;
#ifndef __APPLE__
#if !defined(__APPLE__) && !defined(__sun__)
char buf[64];
/* Flush out lingering data.

View File

@ -122,7 +122,17 @@ sport_t sport_open(const char *device, int rate, int flags)
return -1;
tcgetattr(fd, &attr);
#ifdef __sun__
attr.c_iflag &= ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP |
INLCR | IGNCR | ICRNL | IXON);
attr.c_oflag &= ~OPOST;
attr.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
attr.c_cflag &= ~(CSIZE | PARENB);
attr.c_cflag |= CS8;
#else
cfmakeraw(&attr);
#endif
if (rate_code >= 0) {
cfsetispeed(&attr, rate_code);