[Date Prev][Date Next] [Chronological] [Thread] [Top]

back-perl coding error (ITS#1882)



Full_Name: Alexios Zavras
Version: 2.1.2
OS: GNU/Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.251.255.7)


While building openldap-2.1.2, with --enable-perl,
I got a compilation error:
> modify.c: In function `perl_back_modify':
> modify.c:72: request for member `ad_cname' in something not a structure or
union
The line in question contains:
> XPUSHs(sv_2mortal(newSVpv( mods->sm_desc.ad_cname.bv_val, 0 )));

By looking at the definitions in servers/slapd/slap.h, it seems
that "mods", a "Modification *" has a member "sm_desc" which is
a "AttributeDescription *", not a "AttributeDescription".

My guess is that the correct way to write the line should be:
> XPUSHs(sv_2mortal(newSVpv( mods->sm_desc->ad_cname.bv_val, 0 )));

But I haven't actually looked further into it
(just what I can glimpse from C definitions).
On the other hand, how did it ever compile with such a blatant error ?