Skip to content

Commit f99fc29

Browse files
piscisaureusry
authored andcommitted
Fix mingw build
1 parent 6329633 commit f99fc29

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

TODO.win32

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
- Better `net` support
77
* getaddrinfo
8+
* setMulticastTTL, setMembership, setLoopback
89
* pipe, socketpair
910
* A named pipe should be provided when a unix socket is requested.
1011
* SendMsg and RecvMsg should be supported with named pipes.

src/node_net.cc

+8
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,9 @@ static Handle<Value> SetTTL(const Arguments& args) {
13951395
return scope.Close(Integer::New(newttl));
13961396
}
13971397

1398+
1399+
#ifdef __POSIX__
1400+
13981401
static Handle<Value> SetMulticastTTL(const Arguments& args) {
13991402
HandleScope scope;
14001403

@@ -1492,6 +1495,9 @@ static Handle<Value> DropMembership(const Arguments& args) {
14921495
return SetMembership(args, IP_DROP_MEMBERSHIP);
14931496
}
14941497

1498+
#endif // __POSIX__
1499+
1500+
14951501
//
14961502
// G E T A D D R I N F O
14971503
//
@@ -1722,10 +1728,12 @@ void InitNet(Handle<Object> target) {
17221728
NODE_SET_METHOD(target, "setBroadcast", SetBroadcast);
17231729
NODE_SET_METHOD(target, "setTTL", SetTTL);
17241730
NODE_SET_METHOD(target, "setKeepAlive", SetKeepAlive);
1731+
#ifdef __POSIX__
17251732
NODE_SET_METHOD(target, "setMulticastTTL", SetMulticastTTL);
17261733
NODE_SET_METHOD(target, "setMulticastLoopback", SetMulticastLoopback);
17271734
NODE_SET_METHOD(target, "addMembership", AddMembership);
17281735
NODE_SET_METHOD(target, "dropMembership", DropMembership);
1736+
#endif // __POSIX__
17291737
NODE_SET_METHOD(target, "getsockname", GetSockName);
17301738
NODE_SET_METHOD(target, "getpeername", GetPeerName);
17311739
NODE_SET_METHOD(target, "getaddrinfo", GetAddrInfo);

0 commit comments

Comments
 (0)