summaryrefslogtreecommitdiff
path: root/source4/lib/replace/repdir
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-12 07:04:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:26 -0500
commit566466319e3113ab872499c2ed7eb430ac2260ab (patch)
tree9f96b6070efc3d7a7721181d473e3e12815804b3 /source4/lib/replace/repdir
parentb5ea572f450a9161b96c9c08789791054d24df37 (diff)
downloadsamba-566466319e3113ab872499c2ed7eb430ac2260ab.tar.gz
samba-566466319e3113ab872499c2ed7eb430ac2260ab.tar.bz2
samba-566466319e3113ab872499c2ed7eb430ac2260ab.zip
r18418: Tru64 has a different prototype for seekdir() returning int
when _OSF_SOURCE is defined metze (This used to be commit 5279656a15e42e6dd96ddfa181597c71fc993ff3)
Diffstat (limited to 'source4/lib/replace/repdir')
-rw-r--r--source4/lib/replace/repdir/repdir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/replace/repdir/repdir.c b/source4/lib/replace/repdir/repdir.c
index 07b9568dc1..2f8264000b 100644
--- a/source4/lib/replace/repdir/repdir.c
+++ b/source4/lib/replace/repdir/repdir.c
@@ -118,7 +118,11 @@ long telldir(DIR *dir)
return d->seekpos + d->ofs;
}
+#ifdef _OSF_SOURCE
+int seekdir(DIR *dir, long ofs)
+#else
void seekdir(DIR *dir, long ofs)
+#endif
{
struct dir_buf *d = (struct dir_buf *)dir;
d->seekpos = lseek(d->fd, ofs & ~(DIR_BUF_SIZE-1), SEEK_SET);
@@ -127,6 +131,9 @@ void seekdir(DIR *dir, long ofs)
while (d->ofs < (ofs & (DIR_BUF_SIZE-1))) {
if (readdir(dir) == NULL) break;
}
+#ifdef _OSF_SOURCE
+ return -1;
+#else
}
void rewinddir(DIR *dir)