----- Original Message -----
From: "Paul Theodoropoulos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 5:48 AM
Subject: [qmailadmin] compile error
>
> i'm getting the following error trying to compile qmailadmin 1.07, which
> i've never run across in previous version builds.
>
> solaris 9, sparc, gcc 3.2.1
>
> make all-recursive
> make[1]: Entering directory
> `/usr/local/src/djbware/vpop/qmailadmin-1.0.7-01102003'
> make[2]: Entering directory
> `/usr/local/src/djbware/vpop/qmailadmin-1.0.7-01102003'
> gcc -I. -I/u1/include -O3 -c alias.c
> alias.c: In function `show_dotqmail_lines':
> alias.c:80: `alphasort' undeclared (first use in this function)
> alias.c:80: (Each undeclared identifier is reported only once
> alias.c:80: for each function it appears in.)
> make[2]: *** [alias.o] Error 1
> make[2]: Leaving directory
> `/usr/local/src/djbware/vpop/qmailadmin-1.0.7-01102003'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/usr/local/src/djbware/vpop/qmailadmin-1.0.7-01102003'
> make: *** [all-recursive-am] Error 2
I did a bit of a search on the web and found some other references to the
scandir() function using the alphasort paramater failing to compile on
solaris
The way that call has been written in the 1.0.7 code seems to match exactly
with the example I get when I run "man scandir" on my Redhat linux box :
EXAMPLE
/* print files in current directory in reverse order */
#include <dirent.h>
main(){
struct dirent **namelist;
int n;
n = scandir(".", &namelist, 0, alphasort);
if (n < 0)
perror("scandir");
else {
while(n--) {
printf("%s\n", namelist[n]->d_name);
free(namelist[n]);
}
free(namelist);
}
}
Not sure what the fix is to make it compatible with solaris..
ps. v1.0.7 does compile ok for me under redhat
Michael.