Skip to content

Commit

Permalink
Return a dummy value for lib_version on Windows
Browse files Browse the repository at this point in the history
It is used on global initialization.
  • Loading branch information
orgads committed Dec 12, 2024
1 parent c56a06a commit 33ebf47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcap_binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ NAN_METHOD(DefaultDevice)
NAN_METHOD(LibVersion)
{
#ifdef _WIN32
Nan::ThrowError("Not supported on Windows");
info.GetReturnValue().Set(Nan::New("libpcap version 1.10.5 (dummy for Windows)").ToLocalChecked());
#else
info.GetReturnValue().Set(Nan::New(pcap_lib_version()).ToLocalChecked());
#endif
Expand Down

0 comments on commit 33ebf47

Please sign in to comment.