mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Remove undefined directive-in-macro in test_util_writepid
clang 3.7 complains that using a preprocessor directive inside
a macro invocation in test_util_writepid in test_util.c is undefined.
Fix on 79e85313aa
on 0.2.7.1-alpha.
This commit is contained in:
parent
2b73dbf2a4
commit
e0477de0e2
6
changes/bug16115-undef-directive-in-macro
Normal file
6
changes/bug16115-undef-directive-in-macro
Normal file
@ -0,0 +1,6 @@
|
||||
o Minor fixes (threads, comments):
|
||||
- Remove undefined directive-in-macro in test_util_writepid
|
||||
clang 3.7 complains that using a preprocessor directive inside
|
||||
a macro invocation in test_util_writepid in test_util.c is undefined.
|
||||
Patch by "teor".
|
||||
Fix on 79e85313aa61 on 0.2.7.1-alpha.
|
@ -4319,13 +4319,12 @@ test_util_writepid(void *arg)
|
||||
|
||||
int n = sscanf(contents, "%lu\n%c", &pid, &c);
|
||||
tt_int_op(n, OP_EQ, 1);
|
||||
tt_uint_op(pid, OP_EQ,
|
||||
|
||||
#ifdef _WIN32
|
||||
_getpid()
|
||||
tt_uint_op(pid, OP_EQ, _getpid());
|
||||
#else
|
||||
getpid()
|
||||
tt_uint_op(pid, OP_EQ, getpid());
|
||||
#endif
|
||||
);
|
||||
|
||||
done:
|
||||
tor_free(contents);
|
||||
|
Loading…
Reference in New Issue
Block a user