libeatmydata icon indicating copy to clipboard operation
libeatmydata copied to clipboard

error: use of undeclared identifier 'O_DSYNC' on FreeBSD

Open Mno-hime opened this issue 3 years ago • 1 comments

Building on FreeBSD 11.4 fails with:

--- libeatmydata/la-libeatmydata.lo ---
CC       libeatmydata/la-libeatmydata.lo
libeatmydata/libeatmydata.c:181:21: error: use of undeclared identifier 'O_DSYNC'
                flags &= ~(O_SYNC|O_DSYNC);

O_DSYNC does not exist on FreeBSD.

Mno-hime avatar Jun 17 '21 12:06 Mno-hime

Maybe just a bit of

#ifndef O_DSYNC
#define O_DSYNC 0
#endif

will do?

Artoria2e5 avatar Jun 02 '23 14:06 Artoria2e5