diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-02-22 20:43:52 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-23 06:57:44 +0900 |
commit | a90d9ee1620ce65ecf07224f2d2d16f9f5c48ca9 (patch) | |
tree | 0e442d06435310ea19ab03eaf874a972e710f994 /src | |
parent | 58a80840e61c050811b6d007b6ae008c6af5e8c0 (diff) | |
download | systemd-a90d9ee1620ce65ecf07224f2d2d16f9f5c48ca9.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-journal/journal-send.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c index d0d29818c2..00c53f6d5b 100644 --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -21,6 +21,7 @@ #include "io-util.h" #include "journal-send.h" #include "memfd-util.h" +#include "missing_syscall.h" #include "socket-util.h" #include "stdio-util.h" #include "string-util.h" |