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

Fixes #1825 Compiler warnings / errors from new logging feature on Window #1826

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/platform/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
if (NNG_PLATFORM_WINDOWS)
nng_check_sym(InitializeConditionVariable windows.h NNG_HAVE_CONDVAR)
nng_check_sym(snprintf stdio.h NNG_HAVE_SNPRINTF)
nng_check_sym(timespec_get time.h NNG_HAVE_TIMESPEC_GET)
if (NOT NNG_HAVE_CONDVAR OR NOT NNG_HAVE_SNPRINTF)
message(FATAL_ERROR
"Modern Windows API support is missing. "
Expand Down Expand Up @@ -50,4 +51,4 @@ if (NNG_PLATFORM_WINDOWS)

nng_test(win_ipc_sec_test)

endif ()
endif ()
3 changes: 2 additions & 1 deletion src/platform/windows/win_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ nni_clock(void)
int
nni_time_get(uint64_t *seconds, uint32_t *nanoseconds)
{
int rv;
#if defined(NNG_HAVE_TIMESPEC_GET)
struct timespec ts;
if (timespec_get(&ts, TIME_UTC) == TIME_UTC) {
*seconds = ts.tv_sec;
*nanoseconds = ts.tv_nsec;
return (0);
}
#endif
return (nni_win_error(GetLastError()));
}

Expand Down