libgpg-error 1.28 build failures on arm64

Jakub Wilk jwilk at jwilk.net
Sat Mar 17 11:52:56 CET 2018


* Daniel Kahn Gillmor <dkg at fifthhorseman.net>, 2018-03-16, 23:20:
>../../src/logging.c: In function '_gpgrt_log_printhex':
>../../src/logging.c:1153:49: error: incompatible type for argument 4 of '_gpgrt_logv_printhex'
>     _gpgrt_logv_printhex (buffer, length, NULL, NULL);
>                                                 ^~~~

The prototype of the called function is:

void
_gpgrt_logv_printhex (const void *buffer, size_t length,
                      const char *fmt, va_list arg_ptr)

va_list is supposed to be an opaque type, but on most architectures it 
is a pointer or an array, so you can get away with using NULL. But on 
arm64 it's a struct, so this breaks.

Assuming that arg_ptr is unused when fmt is null, something like this 
should work:

  static va_list null_args;
  _gpgrt_logv_printhex (buffer, length, NULL, null_args);

-- 
Jakub Wilk



More information about the Gnupg-devel mailing list