Skip to content

Commit

Permalink
Fix build on FreeBSD (facebook#11218)
Browse files Browse the repository at this point in the history
Changes from facebook#10881 broke FreeBSD builds with:

    env/io_posix.h:39:9: error: 'POSIX_MADV_NORMAL' macro redefined [-Werror,-Wmacro-redefined]

This commit fixes FreeBSD builds by ignoring MADV defines.
  • Loading branch information
rriski committed Nov 18, 2023
1 parent 7780e98 commit 7464e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion env/io_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

// For non linux platform, the following macros are used only as place
// holder.
#if !(defined OS_LINUX) && !(defined CYGWIN) && !(defined OS_AIX)
#if !(defined OS_LINUX) && !(defined OS_FREEBSD) && !(defined CYGWIN) && !(defined OS_AIX)
#define POSIX_FADV_NORMAL 0 /* [MC1] no further special treatment */
#define POSIX_FADV_RANDOM 1 /* [MC1] expect random page refs */
#define POSIX_FADV_SEQUENTIAL 2 /* [MC1] expect sequential page refs */
Expand Down

0 comments on commit 7464e15

Please sign in to comment.