Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix inotify support to work with FreeBSD libinotify #39680

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Native/Unix/System.Native/pal_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
#elif HAVE_SENDFILE_4
#include <sys/sendfile.h>
#endif
#if HAVE_INOTIFY
#if defined(__FreeBSD__) & defined(HAVE_INOTIFY)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be defined(HAVE_NOTIFY), but rather just HAVE_INOTIFY. The cmake configuration always define that symbol, only its value indicates whether the config time check succeeded or not.

// FreeBSD requires a fully explicit path when using libinotify shim
#include </usr/local/include/sys/inotify.h>
#elif HAVE_INOTIFY
#include <sys/inotify.h>
#endif

Expand Down