#pragma once
#include <cstdlib>
-#include <arpa/inet.h>
+
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
struct server_t
{
- in_port_t port;
- uint32_t weight;
const char *c_str;
size_t size;
+ in_port_t port;
+ uint32_t weight;
};
-
-#if 0
-#include <iostream>
-inline std::ostream& operator<<(std::ostream& output, const server_t& arg)
-{
- output.write(arg.c_str, arg.size);
- output << ':' << arg.port;
- output << '+' << arg.weight;
- return output;
-}
-#endif