From: Lennart Poettering Date: Wed, 24 Oct 2018 15:06:28 +0000 (+0200) Subject: tests: as per CODING_STYLE undefine basename() right after including libgen.h X-Git-Tag: v240~481^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=795919efdfab290ab341d8ffe6e82f6c85cb6198;p=thirdparty%2Fsystemd.git tests: as per CODING_STYLE undefine basename() right after including libgen.h --- diff --git a/src/shared/tests.c b/src/shared/tests.c index c6f608fe04b..ec8039575e8 100644 --- a/src/shared/tests.c +++ b/src/shared/tests.c @@ -1,9 +1,14 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -#include #include #include +/* 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 +#undef basename + #include "alloc-util.h" #include "env-util.h" #include "fileio.h"