• Thomas Haller's avatar
    shared/systemd: fix gettid() compat implementation shadowing function from glibc · cfb970b2
    Thomas Haller authored
    On Fedora rawhide we get the following build failure:
    
        In file included from shared/systemd/src/basic/alloc-util.c:3:
        ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:114:21: error: static declaration of 'gettid' follows non-static declaration
          114 | static inline pid_t gettid(void) {
              |                     ^~~~~~
        In file included from /usr/include/unistd.h:1170,
                         from /usr/include/glib-2.0/gio/gcredentials.h:32,
                         from /usr/include/glib-2.0/gio/gio.h:46,
                         from ./shared/nm-utils/nm-macros-internal.h:31,
                         from ./shared/nm-default.h:293,
                         from ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:22,
                         from shared/systemd/src/basic/alloc-util.c:3:
        /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of 'gettid' was here
           34 | extern __pid_t gettid (void) __THROW;
              |                ^~~~~~
    
    glibc supports now gettid() call ([1]) which conflicts with our compat
    implementation. Rename it.
    
    [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92
    
    (cherry picked from commit 10276322)
    cfb970b2
Name
Last commit
Last update
clients Loading commit data...
contrib Loading commit data...
data Loading commit data...
dispatcher Loading commit data...
docs Loading commit data...
examples Loading commit data...
introspection Loading commit data...
libnm Loading commit data...
libnm-core Loading commit data...
libnm-glib Loading commit data...
libnm-util Loading commit data...
m4 Loading commit data...
man Loading commit data...
po Loading commit data...
shared Loading commit data...
src Loading commit data...
tools Loading commit data...
vapi Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
Makefile.examples Loading commit data...
Makefile.glib Loading commit data...
Makefile.vapigen Loading commit data...
NEWS Loading commit data...
NetworkManager.pc.in Loading commit data...
README Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
config-extra.h.meson Loading commit data...
config.h.meson Loading commit data...
configure.ac Loading commit data...
linker-script-binary.ver Loading commit data...
linker-script-devices.ver Loading commit data...
linker-script-settings.ver Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
valgrind.suppressions Loading commit data...
zanata.xml Loading commit data...