summaryrefslogtreecommitdiff
path: root/src/machine/machinectl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-11 18:50:38 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-11 18:50:38 +0100
commiteef46c372f64f40dd75415b2c504c73138719c8d (patch)
treed13d0d3b02025f837ccc360e2e6adc259d61ec9a /src/machine/machinectl.c
parente89fe484df6b94fcd775b923327b54eaf0a116e2 (diff)
tree-wide: whenever we include libgen.h, immediately undefine basename()
Also, document in adjacent comments and in CODING_STYLE why we do that.
Diffstat (limited to 'src/machine/machinectl.c')
-rw-r--r--src/machine/machinectl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 16ce2f424b..9f8c68b184 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -31,8 +31,13 @@
#include <arpa/inet.h>
#include <net/if.h>
#include <sys/mount.h>
+
+/* When we include libgen.h because we need dirname() we immediately
+ * undefine basename() since libgen.h defines it as a macro to the XDG
+ * version which is really broken. */
#include <libgen.h>
#undef basename
+
#include "sd-bus.h"
#include "log.h"
#include "util.h"