Skip to content

Commit

Permalink
Merge pull request #215 from jeremy/strdup-segfault
Browse files Browse the repository at this point in the history
Fix strdup segfault
  • Loading branch information
tenderlove committed Nov 27, 2019
2 parents e847f1f + f48c58f commit 2121626
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/mri/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#include <stdlib.h>
#include <string.h>

/* Redefine strdup to ruby_strdup in case string.h doesn't export it. */
#include <ruby/util.h>

#include <errno.h>
#ifndef __set_errno
#define __set_errno(val) errno = (val)
Expand Down

0 comments on commit 2121626

Please sign in to comment.