set up windows build

This commit is contained in:
Martin Michelsen
2023-03-02 22:15:20 -08:00
parent 2c5f0ea904
commit c5f05de082
2 changed files with 2 additions and 6 deletions
-6
View File
@@ -6,13 +6,7 @@
#include <event2/buffer.h> #include <event2/buffer.h>
#include <event2/bufferevent.h> #include <event2/bufferevent.h>
#include <event2/listener.h> #include <event2/listener.h>
#ifndef PHOSG_WINDOWS
#include <arpa/inet.h> #include <arpa/inet.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#include <string> #include <string>
#include <phosg/Network.hh> #include <phosg/Network.hh>
+2
View File
@@ -1086,6 +1086,7 @@ int main(int argc, char** argv) {
} }
} }
#ifndef PHOSG_WINDOWS
if (!state->ip_stack_addresses.empty()) { if (!state->ip_stack_addresses.empty()) {
config_log.info("Starting IP stack simulator"); config_log.info("Starting IP stack simulator");
ip_stack_simulator.reset(new IPStackSimulator(base, state)); ip_stack_simulator.reset(new IPStackSimulator(base, state));
@@ -1094,6 +1095,7 @@ int main(int argc, char** argv) {
ip_stack_simulator->listen(netloc.first, netloc.second); ip_stack_simulator->listen(netloc.first, netloc.second);
} }
} }
#endif
} else { } else {
throw logic_error("invalid behavior"); throw logic_error("invalid behavior");