Skip to content

Commit

Permalink
compile errors on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ldegio committed Jan 24, 2017
1 parent 9fd4b6d commit f2c0ef1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions userspace/libscap/scap.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ static int32_t scap_next_live(scap_t* handle, OUT scap_evt** pevent, OUT uint16_
#endif
}

#ifndef _WIN32
static int32_t scap_next_nodriver(scap_t* handle, OUT scap_evt** pevent, OUT uint16_t* pcpuid)
{
static scap_evt evt;
Expand All @@ -852,6 +853,7 @@ static int32_t scap_next_nodriver(scap_t* handle, OUT scap_evt** pevent, OUT uin
*pevent = &evt;
return SCAP_SUCCESS;
}
#endif // _WIN32

int32_t scap_next(scap_t* handle, OUT scap_evt** pevent, OUT uint16_t* pcpuid)
{
Expand All @@ -865,9 +867,11 @@ int32_t scap_next(scap_t* handle, OUT scap_evt** pevent, OUT uint16_t* pcpuid)
case SCAP_MODE_LIVE:
res = scap_next_live(handle, pevent, pcpuid);
break;
#ifndef _WIN32
case SCAP_MODE_NODRIVER:
res = scap_next_nodriver(handle, pevent, pcpuid);
break;
#endif
default:
res = SCAP_FAILURE;
}
Expand Down
6 changes: 6 additions & 0 deletions userspace/libscap/scap_procs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ bool scap_is_thread_alive(scap_t* handle, int64_t pid, int64_t tid, const char*
#endif // HAS_CAPTURE
}

#ifndef _WIN32
int scap_proc_scan_proc_table(scap_t *handle)
{
char filename[SCAP_MAX_PATH_SIZE];
Expand All @@ -1022,6 +1023,11 @@ void scap_refresh_proc_table(scap_t* handle)
}
scap_proc_scan_proc_table(handle);
}
#else
void scap_refresh_proc_table(scap_t* handle)
{
}
#endif // _WIN32

void scap_proc_free(scap_t* handle, struct scap_threadinfo* proc)
{
Expand Down

0 comments on commit f2c0ef1

Please sign in to comment.