[MPlayer-users] [PATCH] dirname undefined
Steven M. Schultz
sms at 2BSD.COM
Mon Jan 6 01:13:53 CET 2003
Hi -
Dirname doesn't appear to exist for me.
I do have strrchr though ;)
Steven Schultz
sms at 2bsd.com
--- libmpdemux/cue_read.c.dist Sun Jan 5 15:51:05 2003
+++ libmpdemux/cue_read.c Sun Jan 5 16:13:08 2003
@@ -8,7 +8,9 @@
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
+#ifdef __linux__
#include <libgen.h>
+#endif
#include "config.h"
#include "mp_msg.h"
@@ -291,7 +293,11 @@
/* split the filename into a path and filename part */
s = strdup(in_cue_filename);
- t = dirname(s);
+ t = strrchr(s, '/');
+ if (t == (char *)NULL)
+ t = s;
+ else
+ t++;
printf ("dirname: %s\n", t);
strcpy(bincue_path,t);
More information about the MPlayer-users
mailing list