[windows] - fixups for building on windows
authorMemphiz <memphiz@xbmc.org>
Sat, 12 May 2012 15:24:07 +0000 (17:24 +0200)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 16 May 2012 21:56:45 +0000 (00:56 +0300)
src/lib/base64.c
src/lib/compat.h
src/lib/crypto/os_port.h
src/lib/http_response.c
src/lib/netutils.c
src/lib/raop.c
src/lib/raop_buffer.c

index d1bf68053ed47446e3fbb6e01b83a0b2b5e1ae9f..8ced9003bc3285d0261e50113a4b3545a8728131 100644 (file)
@@ -32,9 +32,7 @@ struct base64_s {
        int skip_spaces;
 };
 
-static base64_t default_base64 =
-       { .charlist = DEFAULT_CHARLIST,
-         .use_padding = 1 };
+static base64_t default_base64 = {DEFAULT_CHARLIST, "", 0, 1, 0};
 
 static void
 initialize_charmap(base64_t *base64)
index ab32385f784f07ddcb0226b2ab8d3d08cba92600..927fc965fce30458d9a908516cdcd20817265118 100644 (file)
@@ -18,6 +18,9 @@
 #if defined(WIN32)
 #include <ws2tcpip.h>
 #include <windows.h>
+#ifndef snprintf
+#define snprintf _snprintf
+#endif
 #else
 #include <sys/types.h>
 #include <sys/socket.h>
index cd505b588b655604e34d9b70f0a49c90c10f73b6..9a4813650eb8c15420d35d3806360529a4de6e96 100644 (file)
@@ -44,7 +44,6 @@ extern "C" {
 #include <stdio.h>
 
 #if defined(WIN32)
-#define STDCALL                 __stdcall
 #define EXP_FUNC                __declspec(dllexport)
 #else
 #define STDCALL
index 45ccea27aae6dbe4c4c03d30b5c395c4c1e973a5..49166ccbc03490adfbddcea96a6eb453d4ebf05d 100644 (file)
@@ -18,6 +18,7 @@
 #include <assert.h>
 
 #include "http_response.h"
+#include "compat.h"
 
 struct http_response_s {
        int complete;
index 5399fb07f56520e7b3001176770666b60526ca36..8226e4f32d8c926ea3b2e746babda0d0f56f1da9 100644 (file)
@@ -178,7 +178,7 @@ netutils_parse_address(int family, const char *src, void *dst, int dstlen)
 
        length = -1;
        for (ptr=result; ptr!=NULL; ptr=ptr->ai_next) {
-               if (family == ptr->ai_family && dstlen >= ptr->ai_addrlen) {
+               if (family == ptr->ai_family && (unsigned int)dstlen >= ptr->ai_addrlen) {
                        memcpy(dst, ptr->ai_addr, ptr->ai_addrlen);
                        length = ptr->ai_addrlen;
                        break;
index dbd6ea241d189e08abfc3bb28c618141b227d934..fc57feec22f74041159e2f3a1263ddd3e14ac831 100644 (file)
@@ -28,6 +28,7 @@
 #include "utils.h"
 #include "netutils.h"
 #include "logger.h"
+#include "compat.h"
 
 /* Actually 345 bytes for 2048-bit key */
 #define MAX_SIGNATURE_LEN 512
index 38995c220bd21ae0837461ec75ce46f903aacdeb..37bfa79dab86ac3352c7e8faf7fa1491c40ab46e 100644 (file)
@@ -186,7 +186,7 @@ raop_buffer_init(const char *fmtp,
                raop_buffer_entry_t *entry = &raop_buffer->entries[i];
                entry->audio_buffer_size = audio_buffer_size;
                entry->audio_buffer_len = 0;
-               entry->audio_buffer = raop_buffer->buffer+i*audio_buffer_size;
+               entry->audio_buffer = (char *)raop_buffer->buffer+i*audio_buffer_size;
        }
 
        /* Initialize ALAC decoder */