Skip to content

Commit

Permalink
Merge pull request #6279 from kou/windows-lean-and-mean-include
Browse files Browse the repository at this point in the history
Include headers for malloc() explicitly; fix #6277
  • Loading branch information
matz committed May 29, 2024
2 parents f1dec39 + c258ead commit 0a11af7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#ifdef _MSC_VER
# define _CRT_NONSTDC_NO_DEPRECATE
# define WIN32_LEAN_AND_MEAN
#endif

#include <mruby.h>
Expand Down Expand Up @@ -840,6 +841,8 @@ str_rindex(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int pos)
}

#ifdef _WIN32
#include <stdlib.h>
#include <malloc.h>
#include <windows.h>

char*
Expand Down

0 comments on commit 0a11af7

Please sign in to comment.