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

Gdamore/win clock fix #1834

Merged
merged 2 commits into from
May 22, 2024
Merged
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
12 changes: 7 additions & 5 deletions src/platform/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Staysail Systems, Inc. <[email protected]>
# Copyright 2024 Staysail Systems, Inc. <[email protected]>
#
# This software is supplied under the terms of the MIT License, a
# copy of which should be located in the distribution where this
Expand All @@ -13,14 +13,16 @@
# the static library unless they also go into the dynamic.
if (NNG_PLATFORM_WINDOWS)
nng_check_sym(InitializeConditionVariable windows.h NNG_HAVE_CONDVAR)
nng_check_sym(timespec_get time.h NNG_HAVE_TIMESPEC_GET)
nng_check_sym(snprintf stdio.h NNG_HAVE_SNPRINTF)
if (NOT NNG_HAVE_CONDVAR OR NOT NNG_HAVE_SNPRINTF)
if (NOT NNG_HAVE_CONDVAR OR NOT NNG_HAVE_SNPRINTF OR NOT NNG_HAVE_TIMESPEC_GET)
message(FATAL_ERROR
"Modern Windows API support is missing. "
"Versions of Windows prior to Vista are not supported. "
"Further, the 32-bit MinGW environment is not supported. "
"Further, the legacy MinGW environments are not supported. "
"Ensure you have at least Windows Vista or newer, and are "
"using either Visual Studio 2013 or newer or MinGW-W64.")
"using either Visual Studio 2013 or compatible compiler, "
"and are also using the universal C runtime (UCRT).")
endif ()
nng_link_libraries(ws2_32 mswsock advapi32)

Expand Down Expand Up @@ -50,4 +52,4 @@ if (NNG_PLATFORM_WINDOWS)

nng_test(win_ipc_sec_test)

endif ()
endif ()
1 change: 0 additions & 1 deletion src/platform/windows/win_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ nni_clock(void)
int
nni_time_get(uint64_t *seconds, uint32_t *nanoseconds)
{
int rv;
struct timespec ts;
if (timespec_get(&ts, TIME_UTC) == TIME_UTC) {
*seconds = ts.tv_sec;
Expand Down
Loading