What OS are you running? I am running FreeBSD, and it doesn't support
O_DSYNC. It seems that this flag ensures that writes to this fd ensure
filesystem metadata is written out to disk with every write.

I added a #define O_DSYNC O_FSYNC to config.h. I don't think this will hurt
anything but perhaps performance (if it is in fact necessary).

I have seen references that O_FSYNC may even be a no-op on FreeBSD.

Tim
----- Original Message -----
From: "Sergey N. Romanov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 04, 2002 12:29 PM
Subject: Compilation problem...


> Hi,
>
> I have problems with compilation :(
>
> gcc -c -I.. -I/usr/local/db3/include  -I/usr/local/include
> -I/usr/local/openssl/
> include -I/usr/local/cyrus/include -DHAVE_CONFIG_H -I. -I. -Wall -g -O2
> \
> cyrusdb_skiplist.c
> cyrusdb_skiplist.c: In function `getsyncfd':
> cyrusdb_skiplist.c:190: `O_DSYNC' undeclared (first use in this
> function)
> cyrusdb_skiplist.c:190: (Each undeclared identifier is reported only
> once
> cyrusdb_skiplist.c:190: for each function it appears in.)
> cyrusdb_skiplist.c: In function `dump':
> cyrusdb_skiplist.c:1679: warning: int format, long int arg (arg 2)
> cyrusdb_skiplist.c:1679: warning: int format, long int arg (arg 3)
> cyrusdb_skiplist.c:1682: warning: unsigned int format, u_long arg (arg
> 2)
> cyrusdb_skiplist.c:1688: warning: unsigned int format, u_long arg (arg
> 2)
> gmake[1]: *** [cyrusdb_skiplist.o] Error 1
> gmake[1]: Leaving directory `/usr/tmp/install/cyrus-imapd-2.1.4/lib'
> gmake: *** [all] Error 1
>
>
> In this line [190] we see "... O_RDWR | O_DSYNC ..."
>
> O_DSYNC... That is it? I have not found description on this flag in the
> Berkeley DB documentation... How to correct an error?
>
>
>
> Best Regards,
> Sergey N. Romanov
>
>
>
>

Reply via email to