Kaydet (Commit) 7315ce26 authored tarafından obo's avatar obo

CWS-TOOLING: integrate CWS kfreebsdport01v2

...@@ -46,6 +46,12 @@ ...@@ -46,6 +46,12 @@
#undef HAVE_STATFS_H #undef HAVE_STATFS_H
#endif #endif
#if defined(LINUX) && defined(__FreeBSD_kernel__)
#undef LINUX
#define FREEBSD 1
#endif
#if defined(SOLARIS) #if defined(SOLARIS)
#include <sys/mnttab.h> #include <sys/mnttab.h>
......
...@@ -123,6 +123,11 @@ ...@@ -123,6 +123,11 @@
# define NO_PTHREAD_PRIORITY # define NO_PTHREAD_PRIORITY
# define PTHREAD_SIGACTION pthread_sigaction # define PTHREAD_SIGACTION pthread_sigaction
#endif #endif
# ifndef ETIME
# define ETIME ETIMEDOUT
# endif
#endif #endif
#ifdef NETBSD #ifdef NETBSD
......
...@@ -162,7 +162,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr) ...@@ -162,7 +162,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
* And now, the real thing: the get address * And now, the real thing: the get address
*/ */
#ifdef LINUX #ifdef SIOCGIFHWADDR
ret=ioctl(so, SIOCGIFHWADDR, &ifr); ret=ioctl(so, SIOCGIFHWADDR, &ifr);
#else #else
ret=ioctl(so, SIOCGIFADDR, &ifr); ret=ioctl(so, SIOCGIFADDR, &ifr);
...@@ -177,7 +177,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr) ...@@ -177,7 +177,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
close(so); close(so);
#ifdef LINUX #ifdef SIOCGIFHWADDR
memcpy(hard_addr,ifr.ifr_hwaddr.sa_data,8); memcpy(hard_addr,ifr.ifr_hwaddr.sa_data,8);
#else #else
memcpy(hard_addr,ifr.ifr_ifru.ifru_addr.sa_data,8); memcpy(hard_addr,ifr.ifr_ifru.ifru_addr.sa_data,8);
......
...@@ -39,7 +39,11 @@ ...@@ -39,7 +39,11 @@
#elif defined SOLARIS #elif defined SOLARIS
#define THIS_OS "Solaris" #define THIS_OS "Solaris"
#elif defined LINUX #elif defined LINUX
#ifdef __FreeBSD_kernel__
#define THIS_OS "kFreeBSD"
#else
#define THIS_OS "Linux" #define THIS_OS "Linux"
#endif
#elif defined MACOSX #elif defined MACOSX
#define THIS_OS "MacOSX" #define THIS_OS "MacOSX"
#elif defined NETBSD #elif defined NETBSD
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment