[PATCH] replace: Add check for variable program_invocation_short_name

Martin Schwenke martin at meltin.net
Mon Nov 12 23:29:41 UTC 2018


It appears that wafsamba's configure() defines _GNU_SOURCE
unconditionally, so checking _GNU_SOURCE isn't enough to know if this
variable is available.

For example, it isn't available on AIX with the xlc compiler:

  [ 6/10] Compiling lib/replace/replace.c
  ...
  "../../lib/replace/replace.c", line 991.16: 1506-045 (S) Undeclared identifier program_invocation_short_name.

Instead, add a configure check for program_invocation_short_name and
use it.


With this fix, the code still compiles on various Linux flavours and
FreeBSD... and once again compiles on AIX with xlc.

Please review and maybe push...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-replace-Add-check-for-variable-program_invocation_sh.patch
Type: text/x-patch
Size: 2425 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181113/44d5c1c4/0001-replace-Add-check-for-variable-program_invocation_sh.bin>


More information about the samba-technical mailing list