]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-journal: fix build with older glibc
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 22 Feb 2023 19:43:52 +0000 (20:43 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Feb 2023 21:57:44 +0000 (06:57 +0900)
commita90d9ee1620ce65ecf07224f2d2d16f9f5c48ca9
tree0e442d06435310ea19ab03eaf874a972e710f994
parent58a80840e61c050811b6d007b6ae008c6af5e8c0
sd-journal: fix build with older glibc

In older glibc (like 2.28 on CentOS Stream 8) there is no wrapper
for the gettid() syscall, so we need to provide our own.

../src/libsystemd/sd-journal/journal-send.c: In function ‘close_journal_fd’:
../src/libsystemd/sd-journal/journal-send.c:88:25: error: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Werror=implicit-function-declaration]
         if (getpid() != gettid())
                         ^~~~~~
                         getgid
../src/libsystemd/sd-journal/journal-send.c:88:25: warning: nested extern declaration of ‘gettid’ [-Wnested-externs]
cc1: some warnings being treated as errors

Follow-up to 50b35193ec.
src/libsystemd/sd-journal/journal-send.c