summaryrefslogtreecommitdiff
path: root/source3/smbd/oplock_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/oplock_linux.c')
-rw-r--r--source3/smbd/oplock_linux.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c
index 5de9dd56e6..fe324577e1 100644
--- a/source3/smbd/oplock_linux.c
+++ b/source3/smbd/oplock_linux.c
@@ -69,16 +69,21 @@ static void set_capability(unsigned capability)
#define _LINUX_CAPABILITY_VERSION 0x19980330
#endif
/* these can be removed when they are in glibc headers */
- struct {
+ struct cap_user_header {
uint32 version;
int pid;
} header;
- struct {
+ struct cap_user_data {
uint32 effective;
uint32 permitted;
uint32 inheritable;
} data;
+ extern int capget(struct cap_user_header * hdrp,
+ struct cap_user_data * datap);
+ extern int capset(struct cap_user_header * hdrp,
+ const struct cap_user_data * datap);
+
header.version = _LINUX_CAPABILITY_VERSION;
header.pid = 0;
@@ -133,7 +138,8 @@ static BOOL linux_oplock_receive_message(fd_set *fds, char *buffer, int buffer_l
fsp = file_find_fd(fd);
fd_pending_array[0] = (SIG_ATOMIC_T)-1;
if (signals_received > 1)
- memmove((void *)&fd_pending_array[0], (void *)&fd_pending_array[1],
+ memmove(CONST_DISCARD(void *, &fd_pending_array[0]),
+ CONST_DISCARD(void *, &fd_pending_array[1]),
sizeof(SIG_ATOMIC_T)*(signals_received-1));
signals_received--;
/* now we can receive more signals */