#include <sys/time.h>
#include <time.h>
#include <sys/wait.h>
+#include <libgen.h>
#include <atalk/adouble.h>
#include <atalk/ea.h>
return resolved_path;
#endif
}
+
+/**
+ * Returns pointer to static buffer with basename of path
+ **/
+const char *basename_safe(const char *path)
+{
+ static char buf[MAXPATHLEN+1];
+ strlcpy(buf, path, MAXPATHLEN);
+ return basename(buf);
+}