pkg/fileutil: fix constant for linux locking#12440
pkg/fileutil: fix constant for linux locking#12440moritzboth wants to merge 1 commit intoetcd-io:masterfrom moritzboth:31182
Conversation
The constant F_OFD_GETLK is 36, not 37, according to /usr/include/bits/fcntl-linux.h Credits go to joakim-tjernlund who digged deep enough to find this. Fixes #31182
| // constants from /usr/include/bits/fcntl-linux.h | ||
| const ( | ||
| F_OFD_GETLK = 37 | ||
| F_OFD_GETLK = 36 |
There was a problem hiding this comment.
Perhaps it'll be better to reuse golang.org/x/sys/unix instead, which have stuff like this available.
There was a problem hiding this comment.
very well. I'm out for lack of qualification, sorry
There was a problem hiding this comment.
I suggest you pull this one to get rid of the problem, then add your cleanup on top.
There was a problem hiding this comment.
Agree. This can be merged as-is.
There was a problem hiding this comment.
Alternatively, I have created #12444 which I will rebase if this one will be merged earlier.
ptabor
left a comment
There was a problem hiding this comment.
I would recommend adding a test that confirms proper behavior of the lock library.
kolyshkin
left a comment
There was a problem hiding this comment.
LGTM (not a maintainer)
|
This problem is still not fixed in version 19 branch which I guess most people use in production |
The constant F_OFD_GETLK is 36, not 37, according to
/usr/include/bits/fcntl-linux.h
Credits go to joakim-tjernlund who digged deep enough
to find this.
Fixes #31182