summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-28 13:18:14 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 02:39:09 +0200
commit2320b2144fcb1236c082278444e3c6df998e17ec (patch)
tree879bb402bca2d44eba5eb1571b2631c1830e6e72
parent6edd8e95f1ed0ac398c84e4050357097087ae15f (diff)
downloadsamba-2320b2144fcb1236c082278444e3c6df998e17ec.tar.gz
build: Remove SMB_STRUCT_DIRENT define
-rw-r--r--examples/VFS/skel_opaque.c2
-rw-r--r--examples/VFS/skel_transparent.c2
-rw-r--r--libgpo/gpext/gpext.c2
-rw-r--r--source3/include/includes.h8
-rw-r--r--source3/include/vfs.h4
-rw-r--r--source3/lib/util.c4
-rw-r--r--source3/modules/onefs.h2
-rw-r--r--source3/modules/onefs_dir.c8
-rw-r--r--source3/modules/onefs_streams.c2
-rw-r--r--source3/modules/vfs_cap.c12
-rw-r--r--source3/modules/vfs_default.c4
-rw-r--r--source3/modules/vfs_dirsort.c12
-rw-r--r--source3/modules/vfs_full_audit.c4
-rw-r--r--source3/modules/vfs_netatalk.c2
-rw-r--r--source3/modules/vfs_scannedonly.c16
-rw-r--r--source3/modules/vfs_shadow_copy.c14
-rw-r--r--source3/modules/vfs_shadow_copy2.c2
-rw-r--r--source3/modules/vfs_time_audit.c4
-rw-r--r--source3/param/loadparm.c2
-rw-r--r--source3/smbd/vfs.c4
-rw-r--r--source3/torture/cmd_vfs.c2
-rw-r--r--source3/utils/net_usershare.c4
22 files changed, 54 insertions, 62 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 5c97e2304e4..8a2c8e86c5b 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -99,7 +99,7 @@ static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *f
return NULL;
}
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
+static struct dirent *skel_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index c57545c2e54..2c28223214a 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -96,7 +96,7 @@ static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *f
return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
}
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
+static struct dirent *skel_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index 6b234509876..ae16d06a94e 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -488,7 +488,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
size_t *ext_list_len)
{
SMB_STRUCT_DIR *dir = NULL;
- SMB_STRUCT_DIRENT *dirent = NULL;
+ struct dirent *dirent = NULL;
dir = opendir(modules_path(talloc_tos(),
SAMBA_SUBSYSTEM_GPEXT));
diff --git a/source3/include/includes.h b/source3/include/includes.h
index ee7bb1cb7c2..ffdc1d28f3b 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -368,14 +368,6 @@ struct stat_ex {
typedef struct stat_ex SMB_STRUCT_STAT;
/*
- * Type for dirent structure.
- */
-
-#ifndef SMB_STRUCT_DIRENT
-# define SMB_STRUCT_DIRENT struct dirent
-#endif
-
-/*
* Type for DIR structure.
*/
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 212da7e5140..023f5b177e8 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -206,7 +206,7 @@ struct vfs_fn_pointers {
SMB_STRUCT_DIR *(*opendir_fn)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes);
SMB_STRUCT_DIR *(*fdopendir_fn)(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attributes);
- SMB_STRUCT_DIRENT *(*readdir_fn)(struct vfs_handle_struct *handle,
+ struct dirent *(*readdir_fn)(struct vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf);
void (*seekdir_fn)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset);
@@ -560,7 +560,7 @@ SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *mask,
uint32 attributes);
-SMB_STRUCT_DIRENT *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
+struct dirent *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf);
void smb_vfs_call_seekdir(struct vfs_handle_struct *handle,
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 88001cedc8a..b727f7b3d88 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1031,13 +1031,13 @@ libunwind_failed:
const char *readdirname(SMB_STRUCT_DIR *p)
{
- SMB_STRUCT_DIRENT *ptr;
+ struct dirent *ptr;
char *dname;
if (!p)
return(NULL);
- ptr = (SMB_STRUCT_DIRENT *)readdir(p);
+ ptr = (struct dirent *)readdir(p);
if (!ptr)
return(NULL);
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index e7ac0eb72dc..926138bdabc 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -28,7 +28,7 @@ SMB_STRUCT_DIR *onefs_opendir(struct vfs_handle_struct *handle,
const char *fname, const char *mask,
uint32 attributes);
-SMB_STRUCT_DIRENT *onefs_readdir(struct vfs_handle_struct *handle,
+struct dirent *onefs_readdir(struct vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf);
void onefs_seekdir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
diff --git a/source3/modules/onefs_dir.c b/source3/modules/onefs_dir.c
index eb11b9725c9..00ea145b2c5 100644
--- a/source3/modules/onefs_dir.c
+++ b/source3/modules/onefs_dir.c
@@ -296,12 +296,12 @@ onefs_opendir(vfs_handle_struct *handle, const char *fname, const char *mask,
*
* @return dirent structure, NULL if at the end of the directory, NULL on error
*/
-SMB_STRUCT_DIRENT *
+struct dirent *
onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
struct rdp_dir_state *dsp = NULL;
- SMB_STRUCT_DIRENT *ret_direntp;
+ struct dirent *ret_direntp;
bool same_as_last, filled_cache = false;
int ret = -1;
@@ -355,7 +355,7 @@ onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
* our cursor, then return the next entry */
if (!filled_cache) {
dsp->direntries_cursor +=
- ((SMB_STRUCT_DIRENT *)dsp->direntries_cursor)->d_reclen;
+ ((struct dirent *)dsp->direntries_cursor)->d_reclen;
dsp->stat_cursor++;
}
@@ -366,7 +366,7 @@ onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
dsp->resume_cookie = rdp_cookies[dsp->stat_cursor];
/* Return an entry from cache */
- ret_direntp = ((SMB_STRUCT_DIRENT *)dsp->direntries_cursor);
+ ret_direntp = ((struct dirent *)dsp->direntries_cursor);
if (sbuf) {
struct stat onefs_sbuf;
diff --git a/source3/modules/onefs_streams.c b/source3/modules/onefs_streams.c
index a9b4066cc7a..221825cdab0 100644
--- a/source3/modules/onefs_streams.c
+++ b/source3/modules/onefs_streams.c
@@ -584,7 +584,7 @@ static NTSTATUS walk_onefs_streams(connection_struct *conn, files_struct *fsp,
int stream_fd = -1;
int ret;
SMB_STRUCT_DIR *dirp = NULL;
- SMB_STRUCT_DIRENT *dp = NULL;
+ struct dirent *dp = NULL;
files_struct fake_fs;
struct fd_handle fake_fh;
SMB_STRUCT_STAT stream_sbuf;
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 06ff89d89bb..e7539902bc7 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -54,12 +54,12 @@ static SMB_STRUCT_DIR *cap_opendir(vfs_handle_struct *handle, const char *fname,
return SMB_VFS_NEXT_OPENDIR(handle, capname, mask, attr);
}
-static SMB_STRUCT_DIRENT *cap_readdir(vfs_handle_struct *handle,
+static struct dirent *cap_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
- SMB_STRUCT_DIRENT *result;
- SMB_STRUCT_DIRENT *newdirent;
+ struct dirent *result;
+ struct dirent *newdirent;
char *newname;
size_t newnamelen;
DEBUG(3,("cap: cap_readdir\n"));
@@ -75,14 +75,14 @@ static SMB_STRUCT_DIRENT *cap_readdir(vfs_handle_struct *handle,
}
DEBUG(3,("cap: cap_readdir: %s\n", newname));
newnamelen = strlen(newname)+1;
- newdirent = (SMB_STRUCT_DIRENT *)talloc_array(talloc_tos(),
+ newdirent = (struct dirent *)talloc_array(talloc_tos(),
char,
- sizeof(SMB_STRUCT_DIRENT)+
+ sizeof(struct dirent)+
newnamelen);
if (!newdirent) {
return NULL;
}
- memcpy(newdirent, result, sizeof(SMB_STRUCT_DIRENT));
+ memcpy(newdirent, result, sizeof(struct dirent));
memcpy(&newdirent->d_name, newname, newnamelen);
return newdirent;
}
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 31f1192af77..1f3dd6a89b1 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -367,11 +367,11 @@ static SMB_STRUCT_DIR *vfswrap_fdopendir(vfs_handle_struct *handle,
}
-static SMB_STRUCT_DIRENT *vfswrap_readdir(vfs_handle_struct *handle,
+static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
- SMB_STRUCT_DIRENT *result;
+ struct dirent *result;
START_PROFILE(syscall_readdir);
result = readdir(dirp);
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index 1c7aaba640a..7067a5892b7 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -22,14 +22,14 @@
#include "smbd/smbd.h"
#include "system/filesys.h"
-static int compare_dirent (const SMB_STRUCT_DIRENT *da, const SMB_STRUCT_DIRENT *db)
+static int compare_dirent (const struct dirent *da, const struct dirent *db)
{
return strcasecmp_m(da->d_name, db->d_name);
}
struct dirsort_privates {
long pos;
- SMB_STRUCT_DIRENT *directory_list;
+ struct dirent *directory_list;
long number_of_entries;
time_t mtime;
SMB_STRUCT_DIR *source_directory;
@@ -47,7 +47,7 @@ static void free_dirsort_privates(void **datap) {
static bool open_and_sort_dir (vfs_handle_struct *handle)
{
- SMB_STRUCT_DIRENT *dp;
+ struct dirent *dp;
struct stat dir_stat;
long current_pos;
struct dirsort_privates *data = NULL;
@@ -72,8 +72,8 @@ static bool open_and_sort_dir (vfs_handle_struct *handle)
/* Set up an array and read the directory entries into it */
SAFE_FREE(data->directory_list); /* destroy previous cache if needed */
- data->directory_list = (SMB_STRUCT_DIRENT *)SMB_MALLOC(
- data->number_of_entries * sizeof(SMB_STRUCT_DIRENT));
+ data->directory_list = (struct dirent *)SMB_MALLOC(
+ data->number_of_entries * sizeof(struct dirent));
if (!data->directory_list) {
return false;
}
@@ -166,7 +166,7 @@ static SMB_STRUCT_DIR *dirsort_fdopendir(vfs_handle_struct *handle,
return data->source_directory;
}
-static SMB_STRUCT_DIRENT *dirsort_readdir(vfs_handle_struct *handle,
+static struct dirent *dirsort_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 770d21f9efc..7997c2fab7c 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -760,10 +760,10 @@ static SMB_STRUCT_DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle,
return result;
}
-static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
+static struct dirent *smb_full_audit_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf)
{
- SMB_STRUCT_DIRENT *result;
+ struct dirent *result;
result = SMB_VFS_NEXT_READDIR(handle, dirp, sbuf);
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index 4e5df48ac88..c4a65e07ff8 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -152,7 +152,7 @@ static void atalk_add_to_list(name_compare_entry **list)
static void atalk_rrmdir(TALLOC_CTX *ctx, char *path)
{
char *dpath;
- SMB_STRUCT_DIRENT *dent = 0;
+ struct dirent *dent = 0;
SMB_STRUCT_DIR *dir;
if (!path) return;
diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c
index fcd2ed0a1c4..080e88c47e8 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -446,7 +446,7 @@ static bool scannedonly_allow_access(vfs_handle_struct * handle,
/* check the rest of the directory and notify the
scanner if some file needs scanning */
long offset;
- SMB_STRUCT_DIRENT *dire;
+ struct dirent *dire;
offset = SMB_VFS_NEXT_TELLDIR(handle, sDIR->DIR);
dire = SMB_VFS_NEXT_READDIR(handle, sDIR->DIR, NULL);
@@ -560,17 +560,17 @@ static SMB_STRUCT_DIR *scannedonly_fdopendir(vfs_handle_struct * handle,
}
-static SMB_STRUCT_DIRENT *scannedonly_readdir(vfs_handle_struct *handle,
+static struct dirent *scannedonly_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR * dirp,
SMB_STRUCT_STAT *sbuf)
{
- SMB_STRUCT_DIRENT *result;
+ struct dirent *result;
int allowed = 0;
char *tmp;
struct smb_filename *smb_fname;
char *notify_name;
int namelen;
- SMB_STRUCT_DIRENT *newdirent;
+ struct dirent *newdirent;
TALLOC_CTX *ctx=talloc_tos();
struct scannedonly_DIR *sDIR = (struct scannedonly_DIR *)dirp;
@@ -634,12 +634,12 @@ static SMB_STRUCT_DIRENT *scannedonly_readdir(vfs_handle_struct *handle,
ctx,"%s %s",result->d_name,
STRUCTSCANO(handle->data)->scanning_message);
namelen = strlen(notify_name);
- newdirent = (SMB_STRUCT_DIRENT *)talloc_array(
- ctx, char, sizeof(SMB_STRUCT_DIRENT) + namelen + 1);
+ newdirent = (struct dirent *)talloc_array(
+ ctx, char, sizeof(struct dirent) + namelen + 1);
if (!newdirent) {
return NULL;
}
- memcpy(newdirent, result, sizeof(SMB_STRUCT_DIRENT));
+ memcpy(newdirent, result, sizeof(struct dirent));
memcpy(&newdirent->d_name, notify_name, namelen + 1);
DEBUG(SCANNEDONLY_DEBUG,
("scannedonly_readdir, return newdirent at %p with "
@@ -860,7 +860,7 @@ static int scannedonly_rmdir(vfs_handle_struct * handle, const char *path)
/* if there are only .scanned: .virus: or .failed: files, we delete
those, because the client cannot see them */
DIR *dirp;
- SMB_STRUCT_DIRENT *dire;
+ struct dirent *dire;
TALLOC_CTX *ctx = talloc_tos();
bool only_deletable_files = true, have_files = false;
char *path_w_slash;
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index f3f4292cf08..3f9bc96f0cb 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -60,7 +60,7 @@ static int vfs_shadow_copy_debug_level = DBGC_VFS;
typedef struct {
int pos;
int num;
- SMB_STRUCT_DIRENT *dirs;
+ struct dirent *dirs;
} shadow_copy_Dir;
static bool shadow_copy_match_name(const char *name)
@@ -93,7 +93,7 @@ static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char
ZERO_STRUCTP(dirp);
while (True) {
- SMB_STRUCT_DIRENT *d;
+ struct dirent *d;
d = SMB_VFS_NEXT_READDIR(handle, p, NULL);
if (d == NULL) {
@@ -107,7 +107,7 @@ static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char
DEBUG(10,("shadow_copy_opendir: not hide [%s]\n",d->d_name));
- dirp->dirs = SMB_REALLOC_ARRAY(dirp->dirs,SMB_STRUCT_DIRENT, dirp->num+1);
+ dirp->dirs = SMB_REALLOC_ARRAY(dirp->dirs,struct dirent, dirp->num+1);
if (!dirp->dirs) {
DEBUG(0,("shadow_copy_opendir: Out of memory\n"));
break;
@@ -143,7 +143,7 @@ static SMB_STRUCT_DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_st
ZERO_STRUCTP(dirp);
while (True) {
- SMB_STRUCT_DIRENT *d;
+ struct dirent *d;
d = SMB_VFS_NEXT_READDIR(handle, p, NULL);
if (d == NULL) {
@@ -157,7 +157,7 @@ static SMB_STRUCT_DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_st
DEBUG(10,("shadow_copy_fdopendir: not hide [%s]\n",d->d_name));
- dirp->dirs = SMB_REALLOC_ARRAY(dirp->dirs,SMB_STRUCT_DIRENT, dirp->num+1);
+ dirp->dirs = SMB_REALLOC_ARRAY(dirp->dirs,struct dirent, dirp->num+1);
if (!dirp->dirs) {
DEBUG(0,("shadow_copy_fdopendir: Out of memory\n"));
break;
@@ -172,7 +172,7 @@ static SMB_STRUCT_DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_st
return((SMB_STRUCT_DIR *)dirp);
}
-static SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle,
+static struct dirent *shadow_copy_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *_dirp,
SMB_STRUCT_STAT *sbuf)
{
@@ -233,7 +233,7 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
while (True) {
SHADOW_COPY_LABEL *tlabels;
- SMB_STRUCT_DIRENT *d;
+ struct dirent *d;
d = SMB_VFS_NEXT_READDIR(handle, p, NULL);
if (d == NULL) {
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 02c5b3d5803..14d33085c2c 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1078,7 +1078,7 @@ static int shadow_copy2_get_shadow_copy_data(
{
SMB_STRUCT_DIR *p;
const char *snapdir;
- SMB_STRUCT_DIRENT *d;
+ struct dirent *d;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
snapdir = shadow_copy2_find_snapdir(tmp_ctx, handle, fsp->fsp_name);
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 0066e075a22..76e917c15dc 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -243,11 +243,11 @@ static SMB_STRUCT_DIR *smb_time_audit_fdopendir(vfs_handle_struct *handle,
return result;
}
-static SMB_STRUCT_DIRENT *smb_time_audit_readdir(vfs_handle_struct *handle,
+static struct dirent *smb_time_audit_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
- SMB_STRUCT_DIRENT *result;
+ struct dirent *result;
struct timespec ts1,ts2;
double timediff;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 86ea4a433fb..d42b04f18bf 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8734,7 +8734,7 @@ int load_usershare_shares(struct smbd_server_connection *sconn,
{
SMB_STRUCT_DIR *dp;
SMB_STRUCT_STAT sbuf;
- SMB_STRUCT_DIRENT *de;
+ struct dirent *de;
int num_usershares = 0;
int max_user_shares = Globals.iUsershareMaxShares;
unsigned int num_dir_entries, num_bad_dir_entries, num_tmp_dir_entries;
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index cbefb406595..cb7d2e44966 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -721,7 +721,7 @@ SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n)
const char *vfs_readdirname(connection_struct *conn, void *p,
SMB_STRUCT_STAT *sbuf, char **talloced)
{
- SMB_STRUCT_DIRENT *ptr= NULL;
+ struct dirent *ptr= NULL;
const char *dname;
char *translated;
NTSTATUS status;
@@ -1405,7 +1405,7 @@ SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
return handle->fns->fdopendir_fn(handle, fsp, mask, attributes);
}
-SMB_STRUCT_DIRENT *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
+struct dirent *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 715dda9da31..b845048ebe6 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -146,7 +146,7 @@ static NTSTATUS cmd_opendir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
static NTSTATUS cmd_readdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
SMB_STRUCT_STAT st;
- SMB_STRUCT_DIRENT *dent = NULL;
+ struct dirent *dent = NULL;
if (vfs->currentdir == NULL) {
printf("readdir: error=-1 (no open directory)\n");
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index e9490d1fb97..b7ec7a94c38 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -209,7 +209,7 @@ static struct file_list *flist;
static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
{
SMB_STRUCT_DIR *dp;
- SMB_STRUCT_DIRENT *de;
+ struct dirent *de;
uid_t myuid = geteuid();
struct file_list *fl = NULL;
char *basepath = get_basepath(ctx);
@@ -547,7 +547,7 @@ static int net_usershare_info(struct net_context *c, int argc, const char **argv
static int count_num_usershares(void)
{
SMB_STRUCT_DIR *dp;
- SMB_STRUCT_DIRENT *de;
+ struct dirent *de;
int num_usershares = 0;
TALLOC_CTX *ctx = talloc_tos();
char *basepath = get_basepath(ctx);