Skip to content

Commit

Permalink
More compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
thierry-martinez committed Oct 15, 2021
1 parent f1ae46e commit 1454e1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyml_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ file_of_file_descr(value file_descr, const char *mode)
{
CAMLparam1(file_descr);
int fd = win_CRT_fd_of_filedescr(file_descr);
FILE *result = _fdopen(dup(fd), mode);
FILE *result = _fdopen(_dup(fd), mode);
CAMLreturnT(FILE *, result);
}
#else
Expand Down
3 changes: 3 additions & 0 deletions pyml_stubs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _PYML_STUBS_H_
#define _PYML_STUBS_H_
#include <stdbool.h>
#include <stdint.h>

/* The following definitions are extracted and simplified from
#include <Python.h>
Expand All @@ -11,6 +12,8 @@
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#else
#include <unistd.h>
#endif

typedef ssize_t Py_ssize_t;
Expand Down

0 comments on commit 1454e1f

Please sign in to comment.