Skip to content

Commit

Permalink
account for windows
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Downs <[email protected]>
  • Loading branch information
briandowns committed Oct 30, 2023
1 parent 7065568 commit b5f0f50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/optionals/net.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef _WIN32
#include "windowsapi.h"
#include <Ws2tcpip.h>
//#include <Ws2tcpip.h>
#endif

#include <arpa/inet.h>
Expand Down Expand Up @@ -67,14 +67,14 @@ Value createNetModule(DictuVM *vm) {
ObjModule *module = newModule(vm, name);
push(vm, OBJ_VAL(module));

defineNativeProperty(vm, &module->values, "ip4Len", NUMBER_VAL(IP4_LEN));
defineNativeProperty(vm, &module->values, "ip6Len", NUMBER_VAL(IP6_LEN));

/**
* Define Net methods
*/
defineNative(vm, &module->values, "parseIp4", parseIp4);

defineNativeProperty(vm, &module->values, "ip4Len", NUMBER_VAL(IP4_LEN));
defineNativeProperty(vm, &module->values, "ip6Len", NUMBER_VAL(IP6_LEN));

pop(vm);
pop(vm);

Expand Down

0 comments on commit b5f0f50

Please sign in to comment.