The recent libcap-2.x versions actually define capget and capset without having to undefine _POSIX_SOURCE. This leads to compile errors due to different signatures (static vs non-static defined capget/capset). Therefore, configure should properly detect this.
Created attachment 3153 [details] 3.0.28-libcap_detection.patch This patch adds the necessary check and the #ifdef ... #endif stuff.
samba-3.2_pre2 is also affected and doesn't build without the patch.
Applied your patch -- now it does not compile on my OpenSUSE 10.2 anymore. Volker
hmm, strange. What's the error?
Created attachment 3268 [details] Different approach for fixing compilation problems This patch: - removes explicit declarations of capget/capset from oplock_linux.c - removes struct definitions, relying on the definitions in linux/capabilities.h (also static is added, as they are not used outside oplock_linux.c) Samba will compile fine both under libcap-1.x and libcap-2.x w/o any warnings.
Sure it will compile fine since linux/capabilities.h is provided by the kernel and not libcap. If they once differ you've got a problem and this is (from my understanding) not what's wanted.
(In reply to comment #3) > Applied your patch -- now it does not compile on my OpenSUSE 10.2 anymore. > Volker On FC9 with patch https://bugzilla.samba.org/attachment.cgi?id=3153 compiled successfully
We should move away from capget/capset and use the portable equivalents.
Created attachment 3314 [details] move to portable capability functions (3-0-test)
Created attachment 3315 [details] move to portable capability functions (3-2-test/3-3-test)
Ok, I checked in these patches for 3-0-test, 3-2-test and 3-3-test. Build should be fine everywhere now. Thanks for the report!
*** Bug 5537 has been marked as a duplicate of this bug. ***