inetcomm: Fix compilation on systems that don't support nameless unions.

This commit is contained in:
Francois Gouget 2007-12-07 01:02:08 +01:00 committed by Alexandre Julliard
parent 90834020da
commit 842450e96b
1 changed files with 5 additions and 4 deletions

View File

@ -20,6 +20,7 @@
*/ */
#define COBJMACROS #define COBJMACROS
#define NONAMELESSUNION
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
@ -343,7 +344,7 @@ static void read_value(header_t *header, char **cur)
} }
header->value.vt = VT_LPSTR; header->value.vt = VT_LPSTR;
header->value.pszVal = value; header->value.u.pszVal = value;
*cur = end; *cur = end;
} }
@ -359,15 +360,15 @@ static void init_content_type(MimeBody *body, header_t *header)
return; return;
} }
slash = strchr(header->value.pszVal, '/'); slash = strchr(header->value.u.pszVal, '/');
if(!slash) if(!slash)
{ {
WARN("malformed context type value\n"); WARN("malformed context type value\n");
return; return;
} }
len = slash - header->value.pszVal; len = slash - header->value.u.pszVal;
body->content_pri_type = HeapAlloc(GetProcessHeap(), 0, len + 1); body->content_pri_type = HeapAlloc(GetProcessHeap(), 0, len + 1);
memcpy(body->content_pri_type, header->value.pszVal, len); memcpy(body->content_pri_type, header->value.u.pszVal, len);
body->content_pri_type[len] = '\0'; body->content_pri_type[len] = '\0';
body->content_sub_type = strdupA(slash + 1); body->content_sub_type = strdupA(slash + 1);
} }