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

CWS-TOOLING: integrate CWS kfreebsdport01v2

......@@ -46,6 +46,12 @@
#undef HAVE_STATFS_H
#endif
#if defined(LINUX) && defined(__FreeBSD_kernel__)
#undef LINUX
#define FREEBSD 1
#endif
#if defined(SOLARIS)
#include <sys/mnttab.h>
......
......@@ -123,6 +123,11 @@
# define NO_PTHREAD_PRIORITY
# define PTHREAD_SIGACTION pthread_sigaction
#endif
# ifndef ETIME
# define ETIME ETIMEDOUT
# endif
#endif
#ifdef NETBSD
......
......@@ -162,7 +162,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
* And now, the real thing: the get address
*/
#ifdef LINUX
#ifdef SIOCGIFHWADDR
ret=ioctl(so, SIOCGIFHWADDR, &ifr);
#else
ret=ioctl(so, SIOCGIFADDR, &ifr);
......@@ -177,7 +177,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
close(so);
#ifdef LINUX
#ifdef SIOCGIFHWADDR
memcpy(hard_addr,ifr.ifr_hwaddr.sa_data,8);
#else
memcpy(hard_addr,ifr.ifr_ifru.ifru_addr.sa_data,8);
......
......@@ -39,7 +39,11 @@
#elif defined SOLARIS
#define THIS_OS "Solaris"
#elif defined LINUX
#ifdef __FreeBSD_kernel__
#define THIS_OS "kFreeBSD"
#else
#define THIS_OS "Linux"
#endif
#elif defined MACOSX
#define THIS_OS "MacOSX"
#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