[Dovecot] v2.2 dsync_brain_lock() FLOCK compatibility issue on Solaris 11.1
Hello,
On Oracle Solaris 11.1 (Solaris gcc-45 package set) core libraries do not provide flock() anymore.
in file: src/doveadm/dsync/dsync-brain.c in function: dsync_brain_lock() around line: 234
is a (maybe unintentional) fix reference to FLOCK locks.
if (file_wait_lock(brain->lock_fd, brain->lock_path, F_WRLCK,
FILE_LOCK_METHOD_FLOCK, brain->lock_timeout,
&brain->lock) <= 0) {
resulting in a runtime error about unsupported flock() locks. (HAVE_FLOCK is not set by configure script)
Personally, I have just changed "FLOCK" to "FCNTL".
[ I have tried brain->lock->lock_method but this seems not to be the correct way => compile time error: dereferencing pointer to incomplete type ]
Walter
On 22.3.2013, at 12.02, Walter Steiner ws+dovecot@iai.uni-bonn.de wrote:
is a (maybe unintentional) fix reference to FLOCK locks.
if (file_wait_lock(brain->lock_fd, brain->lock_path, F_WRLCK, FILE_LOCK_METHOD_FLOCK, brain->lock_timeout, &brain->lock) <= 0) {
I'm not sure why I used flock instead of fcntl lock. Maybe by accident. Switched: http://hg.dovecot.org/dovecot-2.2/rev/b436c1f6bd06
participants (2)
-
Timo Sirainen
-
Walter Steiner