Replace MinGW with Windows to avoid ambiguities
[tinc] / src / utils.c
index 6104fad..4150d92 100644 (file)
@@ -176,7 +176,7 @@ size_t b64encode_tinc_urlsafe(const void *src, char *dst, size_t length) {
        return b64encode_tinc_internal(src, dst, length, base64_urlsafe);
 }
 
-#ifdef HAVE_MINGW
+#ifdef HAVE_WINDOWS
 const char *winerror(int err) {
        static char buf[1024], *ptr;
 
@@ -195,17 +195,6 @@ const char *winerror(int err) {
 }
 #endif
 
-unsigned int bitfield_to_int(const void *bitfield, size_t size) {
-       unsigned int value = 0;
-
-       if(size > sizeof(value)) {
-               size = sizeof(value);
-       }
-
-       memcpy(&value, bitfield, size);
-       return value;
-}
-
 bool check_id(const char *id) {
        if(!id || !*id) {
                return false;