Skip to content

Commit

Permalink
Avoid a warning of the C compiler on Windows (#8796)
Browse files Browse the repository at this point in the history
The macro `unix_error` is also defined in `caml/unixsupport.h` so the C
compiler generates a warning when it is redefined in `fswatch_win_stubs`

Signed-off-by: Samuel Hym <[email protected]>
  • Loading branch information
shym authored Sep 29, 2023
1 parent 222a0ac commit d5bc7ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fswatch_win/fswatch_win_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ struct watch {
LPVOID buffer;
};

#ifdef unix_error
#undef unix_error
#endif

#define unix_error(s, err) \
do { \
caml_win32_maperr(err); \
Expand Down

0 comments on commit d5bc7ea

Please sign in to comment.