Skip to content

Instantly share code, notes, and snippets.

@xenoscopic
Last active August 29, 2015 14:25
Show Gist options
  • Save xenoscopic/46ac990b3e6b2a6d088e to your computer and use it in GitHub Desktop.
Save xenoscopic/46ac990b3e6b2a6d088e to your computer and use it in GitHub Desktop.
libssh2 VS2015 snprintf/strtoll detection patch
0a1,4
> # Patched version of (one of) libssh2's CMakeLists.txt. Overrides finding of
> # strtoll and snprintf for MSVC 14+, because CMake doesn't seem to find
> # functions or symbols, either due to them being inlined, the new universal CRT,
> # or something...
275a280,286
> # HACK: These aren't detected correctly for MSVC 14
> if(MSVC)
> if(NOT MSVC_VERSION VERSION_LESS 1900)
> SET(HAVE_STRTOLL 1)
> SET(HAVE_SNPRINTF 1)
> endif()
> endif()
@xenoscopic
Copy link
Author

Yeah, I think the problem has more to do with the universal CRT, because strtoll isn't new and wasn't broken before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment