Skip to content

Commit

Permalink
Fix windows build: Use _malloca instead of alloca
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Nov 8, 2017
1 parent 1e6cdb8 commit b21e60a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libmariadb/ma_stmt_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,12 @@ static void convert_from_long(MYSQL_BIND *r_param, const MYSQL_FIELD *field, lon
char *endptr;
uint len;

buffer= alloca(MAX(field->length, 22));
buffer=
#ifdef WIN32
_malloca(MAX(field->length, 22));
#else
alloca(MAX(field->length, 22));
#endif
endptr= ma_ll2str(val, buffer, is_unsigned ? 10 : -10);
len= (uint)(endptr - buffer);

Expand Down

0 comments on commit b21e60a

Please sign in to comment.