fix(posix): preserve the socket helper during NID patching
This commit is contained in:
parent
7a771d2d89
commit
f9be27619e
|
|
@ -63,7 +63,7 @@ extern "C" int APS5_VABI mkstemp_nid_postfix(char* pattern) {
|
|||
|
||||
extern "C" int APS5_VABI isatty_nid_postfix(int descriptor) {
|
||||
if (descriptor >= GuestSockets::FirstDescriptor) {
|
||||
Failure(GuestSockets::IsOpen(descriptor) ? 25 : 9);
|
||||
Failure(GuestSocketIsOpen_nid_no_patch(descriptor) ? 25 : 9);
|
||||
return 0;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ constexpr int FirstDescriptor = 0x10000000;
|
|||
int Close(int descriptor);
|
||||
bool IsOpen(int descriptor);
|
||||
}
|
||||
|
||||
extern "C" bool GuestSocketIsOpen_nid_no_patch(int descriptor);
|
||||
|
|
|
|||
|
|
@ -181,6 +181,10 @@ bool GuestSockets::IsOpen(int descriptor) {
|
|||
return sockets.contains(descriptor);
|
||||
}
|
||||
|
||||
extern "C" bool GuestSocketIsOpen_nid_no_patch(int descriptor) {
|
||||
return GuestSockets::IsOpen(descriptor);
|
||||
}
|
||||
|
||||
namespace {
|
||||
#ifdef _WIN32
|
||||
using NativePollDescriptor = WSAPOLLFD;
|
||||
|
|
|
|||
Loading…
Reference in New Issue