[Dovecot] v2.2 dsync_brain_lock() FLOCK compatibility issue on Solaris 11.1

Walter Steiner ws+dovecot at iai.uni-bonn.de
Fri Mar 22 12:02:11 EET 2013


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


More information about the dovecot mailing list