compat: add a basename() compatibility function
[git/git.git] / git-compat-util.h
index f7217ad..71445c6 100644 (file)
 #include "compat/mingw.h"
 #endif /* __MINGW32__ */
 
+#ifndef NO_LIBGEN_H
+#include <libgen.h>
+#else
+#define basename gitbasename
+extern char *gitbasename(char *);
+#endif
+
 #ifndef NO_ICONV
 #include <iconv.h>
 #endif