blob: 6a1200ad2f175435a495f95a739d45f40e3b1e21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
If we're not building with glibc, then add its basename definition manually
diff --git a/tools/attr.c b/tools/attr.c
index f12e4af..d321b37 100644
--- a/tools/attr.c
+++ b/tools/attr.c
@@ -33,6 +33,15 @@
#include "misc.h"
+#if !defined(__GLIBC__)
+char *
+basename (const char *filename)
+{
+ char *p = strrchr (filename, '/');
+ return p ? p + 1 : (char *) filename;
+}
+#endif
+
#define SETOP 1 /* do a SET operation */
#define GETOP 2 /* do a GET operation */
#define REMOVEOP 3 /* do a REMOVE operation */
|