Try to reply with node address only when decrementing the TTL.
[oweals/tinc.git] / src / utils.c
index db7a8cd631949d41e2ba4a73af9b91af2d8ecf92..65ba4b90402bc0df2df50fccf2f3e618c6e37597 100644 (file)
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
+#include "logger.h"
 #include "system.h"
-#include "xalloc.h"
-
-#include "../src/logger.h"
 #include "utils.h"
+#include "xalloc.h"
 
 static const char hexadecimals[] = "0123456789ABCDEF";
 static const char base64_original[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -192,6 +191,11 @@ bool check_id(const char *id) {
        return true;
 }
 
+/* Windows doesn't define HOST_NAME_MAX. */
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 255
+#endif
+
 char *replace_name(const char *name) {
        char *ret_name;