On Tue, Dec 02, 2003 at 03:00:29PM +0100, Marco Benetton wrote:
> hi all
> I want to compile qmail with qmail-ldap-1.03-20031101.a.patch with -DDUPEALIAS 
> active in Makefile.
> When I compile I have this error:
> ............
> cc1: warning: changing search order for system directory "/usr/local/include"
> cc1: warning:   as it has already been specified as a non-system directory
> qmail-lspawn.c: In function `spawn':
> qmail-lspawn.c:803: parse error before "struct"
> qmail-lspawn.c:807: `pw' undeclared (first use in this function)
> qmail-lspawn.c:807: (Each undeclared identifier is reported only once
> qmail-lspawn.c:807: for each function it appears in.)
> make: *** [qmail-lspawn.o] Error 1
> ---------------------------------------------------------------------------------------------------------------
> I have try this in RedHat 8.0 and with SUSE 8.1.
> 
> Can you help me.

Bug. You need the appended patch.


-- 
:wq Claudio

"Contrary to popular belief, penguins are not the salvation of modern   
technology.  Neither do they throw parties for the urban proletariat."

Index: qmail-lspawn.c
===================================================================
RCS file: /home/cvs-djbware/CVS/qmail-ldap/qmail-lspawn.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- qmail-lspawn.c      26 Nov 2003 21:46:43 -0000      1.95
+++ qmail-lspawn.c      2 Dec 2003 15:12:48 -0000       1.96
@@ -785,27 +785,29 @@
 #ifdef DUPEALIAS
    case 3:
      /* the alias-user handling for dupe handling */
-     struct passwd *pw;
-     char num[FMT_ULONG];
+     {
+       struct passwd *pw;
+       char num[FMT_ULONG];
 
-     log(4, "LDAP lookup got too many hits, using dupe alias\n");
-     pw = getpwnam("dupealias");
-     if (!pw) _exit(QLX_NOALIAS);
+       log(4, "LDAP lookup got too many hits, using dupe alias\n");
+       pw = getpwnam("dupealias");
+       if (!pw) _exit(QLX_NOALIAS);
 
-     if (!stralloc_copys(&nughde, pw->pw_name)) _exit(QLX_NOMEM);
-     if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
-     if (!stralloc_catb(&nughde,num,fmt_ulong(num, (long) pw->pw_uid)))
-       _exit(QLX_NOMEM);
-     if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
-     if (!stralloc_catb(&nughde,num,fmt_ulong(num, (long) pw->pw_gid)))
-       _exit(QLX_NOMEM);
-     if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
-     if (!stralloc_cats(&nughde, pw->pw_dir)) _exit(QLX_NOMEM);
-     if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
-     if (!stralloc_cats(&nughde,"-")) _exit(QLX_NOMEM);
-     if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
-     if (!stralloc_cats(&nughde,r)) _exit(QLX_NOMEM);
-     if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+       if (!stralloc_copys(&nughde, pw->pw_name)) _exit(QLX_NOMEM);
+       if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+       if (!stralloc_catb(&nughde,num,fmt_ulong(num, (long) pw->pw_uid)))
+        _exit(QLX_NOMEM);
+       if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+       if (!stralloc_catb(&nughde,num,fmt_ulong(num, (long) pw->pw_gid)))
+        _exit(QLX_NOMEM);
+       if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+       if (!stralloc_cats(&nughde, pw->pw_dir)) _exit(QLX_NOMEM);
+       if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+       if (!stralloc_cats(&nughde,"-")) _exit(QLX_NOMEM);
+       if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+       if (!stralloc_cats(&nughde,r)) _exit(QLX_NOMEM);
+       if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
+     }
      break;
 #endif
    default:

Reply via email to