Skip to content

_SH_DENYWR undeclared when building with MinGW-w64 #208

@brechtsanders

Description

@brechtsanders

When building version 0.9.2 on Windows with MinGW-w64 GCC the build failed with the following error.

sail-0.9.2/src/sail-common/utils.c:721:38: error: '_SH_DENYWR' undeclared (first use in this function)
  721 |     FILE *f = _wfsopen(wpath, L"rb", _SH_DENYWR);
      |                                      ^~~~~~~~~~

When adding the following line at the top of src/sail-common/utils.c the build succeeds:

#include <share.h>

I haven't checked if this is an issue on other platforms or if share.h also exists on all platforms where sail normally builds.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions