summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c16
-rw-r--r--examples/VFS/skel_transparent.c16
-rw-r--r--examples/libsmbclient/Makefile4
-rw-r--r--examples/libsmbclient/tree.c2
4 files changed, 20 insertions, 18 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 8c05479a62..5b196af5eb 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -130,9 +130,9 @@ static int skel_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
return vfswrap_close(NULL, fsp, fd);
}
-static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t n)
+static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)
{
- return vfswrap_read(NULL, fsp, fd, data, n);
+ return vfswrap_read(NULL, fsp, data, n);
}
static ssize_t skel_pread(vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n, SMB_OFF_T offset)
@@ -140,9 +140,9 @@ static ssize_t skel_pread(vfs_handle_struct *handle, struct files_struct *fsp, v
return vfswrap_pread(NULL, fsp, data, n, offset);
}
-static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
+static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
{
- return vfswrap_write(NULL, fsp, fd, data, n);
+ return vfswrap_write(NULL, fsp, data, n);
}
ssize_t skel_pwrite(vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset)
@@ -155,15 +155,15 @@ static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB_OF
return vfswrap_lseek(NULL, fsp, offset, whence);
}
-static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fsp, int fromfd, const DATA_BLOB *hdr,
+static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *hdr,
SMB_OFF_T offset, size_t n)
{
- return vfswrap_sendfile(NULL, tofd, fsp, fromfd, hdr, offset, n);
+ return vfswrap_sendfile(NULL, tofd, fromfsp, hdr, offset, n);
}
-static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *fsp, int tofd, SMB_OFF_T offset, size_t n)
+static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *tofsp, SMB_OFF_T offset, size_t n)
{
- return vfswrap_recvfile(NULL, fromfd, fsp, tofd, offset, n);
+ return vfswrap_recvfile(NULL, fromfd, tofsp, offset, n);
}
static int skel_rename(vfs_handle_struct *handle, const char *oldname, const char *newname)
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f15cdfdb70..55407be10c 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -124,9 +124,9 @@ static int skel_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
return SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
}
-static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t n)
+static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n)
{
- return SMB_VFS_NEXT_READ(handle, fsp, fd, data, n);
+ return SMB_VFS_NEXT_READ(handle, fsp, data, n);
}
static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n, SMB_OFF_T offset)
@@ -134,9 +134,9 @@ static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp, void *da
return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
}
-static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
+static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
{
- return SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, n);
+ return SMB_VFS_NEXT_WRITE(handle, fsp, data, n);
}
static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset)
@@ -149,14 +149,14 @@ static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB_OF
return SMB_VFS_NEXT_LSEEK(handle, fsp, offset, whence);
}
-static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fsp, int fromfd, const DATA_BLOB *hdr, SMB_OFF_T offset, size_t n)
+static ssize_t skel_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *hdr, SMB_OFF_T offset, size_t n)
{
- return SMB_VFS_NEXT_SENDFILE(handle, tofd, fsp, fromfd, hdr, offset, n);
+ return SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, hdr, offset, n);
}
-static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *fsp, int tofd, SMB_OFF_T offset, size_t n)
+static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct *tofsp, SMB_OFF_T offset, size_t n)
{
- return SMB_VFS_NEXT_RECVFILE(handle, fromfd, fsp, tofd, offset, n);
+ return SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, n);
}
static int skel_rename(vfs_handle_struct *handle, const char *oldname, const char *newname)
diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile
index be383aea67..6500707e75 100644
--- a/examples/libsmbclient/Makefile
+++ b/examples/libsmbclient/Makefile
@@ -5,7 +5,7 @@ SAMBA_INCL = ../../source/include
EXTLIB_INCL = -I/usr/include/gtk-1.2 \
-I/usr/include/glib-1.2 \
-I/usr/lib/glib/include
-
+EXTLIB_INCL = `gtk-config --cflags`
DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
CFLAGS = -O0 -g -I$(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS)
@@ -13,7 +13,7 @@ CFLAGS = -O0 -g -I$(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS)
LDFLAGS = -L/usr/local/samba/lib \
-lldap -lkrb5 -lgssapi_krb5
#LIBSMBCLIENT = /usr/local/samba/lib/libsmbclient.so
-LIBSMBCLIENT = ../../source/bin/libsmbclient.a -ldl -lresolv
+LIBSMBCLIENT = -lsmbclient -ldl -lresolv
TESTS= testsmbc \
testacl \
diff --git a/examples/libsmbclient/tree.c b/examples/libsmbclient/tree.c
index d5a71e2868..6e34cd0562 100644
--- a/examples/libsmbclient/tree.c
+++ b/examples/libsmbclient/tree.c
@@ -24,6 +24,8 @@
#include <stdio.h>
#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
#include <gtk/gtk.h>
#include "libsmbclient.h"