Page MenuHome GnuPG

gnupg-2.2.14: Compilation failure on OpenIndiana
Closed, ResolvedPublic

Description

dns.c:5278:73: error: expected identifier or ‘(’ before numeric constant

union { unsigned char b[dns_p_calcsize((512))]; struct dns_packet p; } _P = { 0 };
                                                                       ^~

dns.c:5279:39: error: request for member ‘p’ in something not a structure or union

struct dns_packet *P = dns_p_init(&_P.p, 512);
                                     ^

In file included from /usr/include/ctype.h:36,

from dns.c:44:

dns.c: In function ‘dns_hints_query’:
dns.c:6840:73: error: expected identifier or ‘(’ before numeric constant

union { unsigned char b[dns_p_calcsize((512))]; struct dns_packet p; } _P = { 0 };
                                                                       ^~

dns.c:6861:22: error: request for member ‘p’ in something not a structure or union

P   = dns_p_init(&_P.p, 512);
                    ^

...
(there's more occurrences of this pattern in the same file)

renaming _P to something like _GTLSP makes compilation succeed.

I believe this problem also exists on Solaris 10 (and 11).

Details

Version
2.2.14

Related Objects

Event Timeline

werner added projects: gnupg (gpg22), Solaris.
werner added a subscriber: werner.

Thanks for the report. underscore followed by an uppercase letter is actually reserved for the system; thus we should not have used that.

werner changed the task status from Open to Testing.Mar 25 2019, 2:51 PM

We fixed that in master and 2.2. Can you please test this with the next release and report or close this bug?