Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some compilation errors when compiling using clang-cl.exe #560

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions osal/win32/osal.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,25 @@ void osal_free(void *ptr)
free(ptr);
}

int osal_thread_create(void **thandle, int stacksize, void *func, void *param)
int osal_thread_create(void *thandle, int stacksize, void *func, void *param)
{
*thandle = CreateThread(NULL, stacksize, func, param, 0, NULL);
if(!thandle)
PHANDLE phandle = thandle;
*phandle = CreateThread(NULL, stacksize, func, param, 0, NULL);
if(*phandle != NULL)
{
return 0;
}
return 1;
}

int osal_thread_create_rt(void **thandle, int stacksize, void *func, void *param)
int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param)
{
int ret;
ret = osal_thread_create(thandle, stacksize, func, param);
PHANDLE phandle = thandle;
ret = osal_thread_create(phandle, stacksize, func, param);
if (ret)
{
ret = SetThreadPriority(*thandle, THREAD_PRIORITY_TIME_CRITICAL);
ret = SetThreadPriority(*phandle, THREAD_PRIORITY_TIME_CRITICAL);
}
return ret;
}
2 changes: 0 additions & 2 deletions osal/win32/osal_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@
} \
} while (0)

int osal_gettimeofday (struct timeval *tv, struct timezone *tz);

#endif
1 change: 0 additions & 1 deletion oshw/win32/oshw.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ uint16 oshw_ntohs (uint16 network)
ec_adaptert * oshw_find_adapters (void)
{
int i = 0;
int ret = 0;
pcap_if_t *alldevs;
pcap_if_t *d;
ec_adaptert * adapter;
Expand Down
2 changes: 1 addition & 1 deletion oshw/win32/wpcap/Include/pcap-stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include <io.h>

#ifndef __MINGW32__
#include "IP6_misc.h"
#include "ip6_misc.h"
#endif

#define caddr_t char*
Expand Down