summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 2760c718..39d1e1c4 100644
--- a/utf8.c
+++ b/utf8.c
@@ -25,11 +25,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#define UTF8_DECL_OPENDIR
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <signal.h>
+#include <dirent.h>
#include "config.h"
#include "lib.h"
#include "signal.h"
@@ -415,3 +417,11 @@ int w_rename(const wchar_t *wfrom, const wchar_t *wto)
free(from);
return err;
}
+
+DIR *w_opendir(const wchar_t *wname)
+{
+ char *name = utf8_dup_to(wname);
+ DIR *d = opendir(name);
+ free(name);
+ return d;
+}