]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib: rename Prog to shadow_progname, with only one definition 472/head
authorAdam Sampson <ats@offog.org>
Sat, 25 Dec 2021 22:41:58 +0000 (22:41 +0000)
committerAdam Sampson <ats@offog.org>
Sat, 25 Dec 2021 22:41:58 +0000 (22:41 +0000)
commit0e6fe5e728a45baff3977d73e81a27adb6ae30c6
tree492dfbc6acb0a95cc2e5490ae63a653b5bc1a111
parent6761cf2d7e9defeed7f915c668a87b84bac2c9c3
lib: rename Prog to shadow_progname, with only one definition

The build was failing with duplicate symbol errors with -fno-common.
This is the default in GCC 10 and later, and explicitly enabled in some
distributions to catch problems like this. There were two causes:

- Prog and shadow_logfd were defined in a header file that was included
  in multiple other files. Fix this by defining them once in
  shadowlog.c, and having extern declarations in the header.

- Most of the tools (except id/nologin) also define a Prog variable,
  which is not intended to alias the one in the library. Fix
  this by renaming Prog in the library to shadow_progname, which also
  matches the new accessor functions for it.
lib/commonio.c
lib/nscd.c
lib/selinux.c
lib/shadowlog.c
lib/shadowlog_internal.h
lib/spawn.c
lib/sssd.c
lib/tcbfuncs.c