From 33ebf4719a74c725ce5999de1b943342174a9d6b Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 12 Dec 2024 13:00:00 +0200 Subject: [PATCH] Return a dummy value for lib_version on Windows It is used on global initialization. --- pcap_binding.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcap_binding.cc b/pcap_binding.cc index f821624..8f15c15 100644 --- a/pcap_binding.cc +++ b/pcap_binding.cc @@ -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