On Mon, Jun 11, 2001 at 09:26:28PM +0300, Ruslan Ermilov wrote:
[...]
> While this is definitely a problem in fts.h, which is fixed with the
> attached patch, it is unclear why this warning is hidden after the
> -nostdinc.
> 
For those interested, here's the missing patch.


-- 
Ruslan Ermilov          Oracle Developer/DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age
Index: include/fts.h
===================================================================
RCS file: /home/ncvs/src/include/fts.h,v
retrieving revision 1.3
diff -u -p -r1.3 fts.h
--- include/fts.h       1997/05/07 19:59:58     1.3
+++ include/fts.h       2001/06/11 18:20:14
@@ -45,7 +45,8 @@ typedef struct {
        int fts_rfd;                    /* fd for root */
        int fts_pathlen;                /* sizeof(path) */
        int fts_nitems;                 /* elements in the sort array */
-       int (*fts_compar)();            /* compare function */
+       int (*fts_compar)               /* compare function */
+           __P((const struct _ftsent **, const struct _ftsent **));
 
 #define        FTS_COMFOLLOW   0x001           /* follow command line symlinks */
 #define        FTS_LOGICAL     0x002           /* logical walk */
Index: lib/libc/gen/fts.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/gen/fts.c,v
retrieving revision 1.18
diff -u -p -r1.18 fts.c
--- lib/libc/gen/fts.c  2001/06/01 21:53:50     1.18
+++ lib/libc/gen/fts.c  2001/06/11 18:20:17
@@ -936,7 +936,8 @@ fts_sort(sp, head, nitems)
        }
        for (ap = sp->fts_array, p = head; p; p = p->fts_link)
                *ap++ = p;
-       qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+       qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *),
+           (int (*) __P((const void *, const void *)))sp->fts_compar);
        for (head = *(ap = sp->fts_array); --nitems; ++ap)
                ap[0]->fts_link = ap[1];
        ap[0]->fts_link = NULL;

Reply via email to