chiark / gitweb /
missing: add __NR_getrandom for powerpc architecture
[elogind.git] / src / shared / util.c
index c53f9cdb6acb1c3cd055bd7698d18b03a97c7082..f5fcebebe7a1c26028593ebd93446e5eefb2d4ad 100644 (file)
 #include <locale.h>
 #include <sys/personality.h>
 #include <sys/xattr.h>
-#include <libgen.h>
 #include <sys/statvfs.h>
 #include <sys/file.h>
 #include <linux/fs.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
 
 #ifdef HAVE_SYS_AUXV_H