From 566466319e3113ab872499c2ed7eb430ac2260ab Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Sep 2006 07:04:12 +0000 Subject: r18418: Tru64 has a different prototype for seekdir() returning int when _OSF_SOURCE is defined metze (This used to be commit 5279656a15e42e6dd96ddfa181597c71fc993ff3) --- source4/lib/replace/repdir/repdir.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/replace') 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) -- cgit