Clang on FreeBSD reports:
```
Building CXX object src/global/CMakeFiles/libglobal_objs.dir/pidfile.cc.o
../src/global/pidfile.cc:170:5: warning: ISO C++ requires field designators to be specified in declaration order; field 'l_whence' will be initialized after field 'l_start' [-Wreorder-init-list]
.l_start = 0,
^~~~~~~~~~~~
../src/global/pidfile.cc:169:17: note: previous initialization for field 'l_whence' is here
.l_whence = SEEK_SET,
^~~~~~~~
```
And Linux and BSD have different orders in their `struct flock`
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
// Default Windows file share flags prevent other processes from writing
// to this file.
#ifndef _WIN32
- struct flock l = {
- .l_type = F_WRLCK,
- .l_whence = SEEK_SET,
- .l_start = 0,
- .l_len = 0
- };
+ struct flock l;
+ l.l_type = F_WRLCK;
+ l.l_whence = SEEK_SET;
+ l.l_start = 0;
+ l.l_len = 0;
+
int r = ::fcntl(pf_fd, F_SETLK, &l);
if (r < 0) {
if (errno == EAGAIN || errno == EACCES) {