projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eca27eb
)
tests: as per CODING_STYLE undefine basename() right after including libgen.h
author
Lennart Poettering
<lennart@poettering.net>
Wed, 24 Oct 2018 15:06:28 +0000
(17:06 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 24 Oct 2018 15:08:12 +0000
(17:08 +0200)
src/shared/tests.c
patch
|
blob
|
history
diff --git
a/src/shared/tests.c
b/src/shared/tests.c
index
c6f608f
..
ec80395
100644
(file)
--- a/
src/shared/tests.c
+++ b/
src/shared/tests.c
@@
-1,9
+1,14
@@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <libgen.h>
#include <stdlib.h>
#include <util.h>
+/* When we include libgen.h because we need dirname() we immediately
+ * undefine basename() since libgen.h defines it as a macro to the POSIX
+ * version which is really broken. We prefer GNU basename(). */
+#include <libgen.h>
+#undef basename
+
#include "alloc-util.h"
#include "env-util.h"
#include "fileio.h"