Add support for OpenIndiana.
Based on changes suggested by Reginald Beardsley <pulaskite@yahoo.com>.
This commit is contained in:
parent
89d81377fd
commit
9472dd46a9
2
Makefile
2
Makefile
|
@ -67,6 +67,8 @@ else
|
||||||
else ifneq ($(filter $(UNAME_S),FreeBSD DragonFly),)
|
else ifneq ($(filter $(UNAME_S),FreeBSD DragonFly),)
|
||||||
OS_CFLAGS = -pthread
|
OS_CFLAGS = -pthread
|
||||||
OS_LIBS = -lpthread
|
OS_LIBS = -lpthread
|
||||||
|
else ifneq ($(filter $(UNAME_S),SunOS),)
|
||||||
|
OS_LIBS = -lpthread -ldl -lresolv -lsocket -lnsl
|
||||||
else
|
else
|
||||||
OS_LIBS = -lpthread -ldl
|
OS_LIBS = -lpthread -ldl
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -192,7 +192,7 @@ static int usbtr_flush(transport_t tr_base)
|
||||||
{
|
{
|
||||||
struct rf2500_transport *tr = (struct rf2500_transport *)tr_base;
|
struct rf2500_transport *tr = (struct rf2500_transport *)tr_base;
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#if !defined(__APPLE__) && !defined(__sun__)
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
/* Flush out lingering data.
|
/* Flush out lingering data.
|
||||||
|
|
10
util/sport.c
10
util/sport.c
|
@ -122,7 +122,17 @@ sport_t sport_open(const char *device, int rate, int flags)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
tcgetattr(fd, &attr);
|
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);
|
cfmakeraw(&attr);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (rate_code >= 0) {
|
if (rate_code >= 0) {
|
||||||
cfsetispeed(&attr, rate_code);
|
cfsetispeed(&attr, rate_code);
|
||||||
|
|
Loading…
Reference in New Issue