#include <cstdio>
#include <cstring>
#include <string>
+#include <cstring>
#include <limits.h>
-#include <pbd/mountpoint.h>
+#include "pbd/mountpoint.h"
using std::string;
-#if HAVE_GETMNTENT
+#ifdef WAF_BUILD
+#include "libpbd-config.h"
+#endif
+
+#ifdef HAVE_GETMNTENT
#include <mntent.h>
struct mntent_sorter {