QNX 6.3.0 gcc 3.3.1

git-svn-id: svn://db.shs.com.ru/pip@212 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2016-07-26 13:08:49 +00:00
parent 4c30988c77
commit d951871dec
4 changed files with 46 additions and 22 deletions

View File

@@ -21,8 +21,18 @@
#include "piconfig.h"
#include "pisysteminfo.h"
#ifdef QNX
# include <net/if.h>
# include <net/if_dl.h>
# include <hw/nicinfo.h>
# include <netdb.h>
# include <sys/socket.h>
# include <sys/time.h>
# include <sys/types.h>
# include <sys/ioctl.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <ifaddrs.h>
# include <fcntl.h>
# ifdef BLACKBERRY
# include <netinet/in.h>
# else
@@ -304,14 +314,14 @@ void PIEthernet::applyTimeout(int fd, int opt, double ms) {
if (fd == 0) return;
//piCoutObj << "setReadIsBlocking" << yes;
#ifdef WINDOWS
DWORD tm = ms;
DWORD _tm = ms;
#else
double s = ms / 1000.;
timeval tm;
tm.tv_sec = piFloord(s); s -= tm.tv_sec;
tm.tv_usec = s * 1000000.;
timeval _tm;
_tm.tv_sec = piFloord(s); s -= _tm.tv_sec;
_tm.tv_usec = s * 1000000.;
#endif
ethSetsockopt(fd, SOL_SOCKET, opt, &tm, sizeof(tm));
ethSetsockopt(fd, SOL_SOCKET, opt, &_tm, sizeof(_tm));
}