Add #ifdefs in case not all platforms support IPv4 and IPv6 multicast.
[tinc] / lib / utils.c
index 3283472..6ea904a 100644 (file)
@@ -23,9 +23,9 @@
 #include "../src/logger.h"
 #include "utils.h"
 
-const char hexadecimals[] = "0123456789ABCDEF";
+static const char hexadecimals[] = "0123456789ABCDEF";
 
-int charhex2bin(char c) {
+static int charhex2bin(char c) {
        if(isdigit(c))
                return c - '0';
        else
@@ -57,7 +57,7 @@ const char *winerror(int err) {
 
        if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
                NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, sizeof(buf), NULL)) {
-               strncpy(buf, _("(unable to format errormessage)"), sizeof(buf));
+               strncpy(buf, "(unable to format errormessage)", sizeof(buf));
        };
 
        if((newline = strchr(buf, '\r')))
@@ -67,7 +67,7 @@ const char *winerror(int err) {
 }
 #endif
 
-unsigned int bitfield_to_int(void *bitfield, size_t size) {
+unsigned int bitfield_to_int(const void *bitfield, size_t size) {
        unsigned int value = 0;
        if(size > sizeof value)
                size = sizeof value;