Skip to content

Commit 0b5a39d

Browse files
committed
Update README.md
1 parent 6d81ca3 commit 0b5a39d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
systemd-netlogd
22
===================
33

4+
[![Build Status](https://travis-ci.org/systemd/systemd-netlogd.svg?branch=master)](https://travis-ci.org/systemd/systemd-netlogd)
45
[![Total alerts](https://img.shields.io/lgtm/alerts/g/systemd/systemd-netlogd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/systemd/systemd-netlogd/alerts/)
56

67
Forwards messages from the journal to other hosts over the network using

meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>'))
8484
conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>'))
8585

8686
foreach ident : [
87-
['gettid', '''#include <sys/types.h>'''],
87+
['gettid', '''#include <sys/types.h>
88+
#include <unistd.h>'''],
8889
]
8990
have = cc.has_function(ident[0], prefix : ident[1])
9091
conf.set10('HAVE_' + ident[0].to_upper(), have)

src/share/process-util.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,21 @@
88
#include <stddef.h>
99
#include <stdio.h>
1010
#include <string.h>
11+
#include <sys/syscall.h>
1112
#include <sys/types.h>
13+
#include <unistd.h>
1214

1315
#include "formats-util.h"
1416
#include "macro.h"
1517

16-
#define gettid() syscall(SYS_gettid)
18+
19+
#if !HAVE_GETTID
20+
static inline pid_t missing_gettid(void) {
21+
return (pid_t) syscall(__NR_gettid);
22+
}
23+
24+
# define gettid missing_gettid
25+
#endif
1726

1827
#define procfs_file_alloca(pid, field) \
1928
({ \

0 commit comments

Comments
 (0)