From bed0cb5d3a6e098042ed9fec0e90464f1a092821 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 29 Aug 2019 06:58:56 -0700 Subject: [PATCH] Fix _DIRENT_HAVE_D_* macros. Don't define _DIRENT_HAVE_D_RECLEN or _DIRENT_HAVE_D_OFF, as WASI libc's dirent doesn't have d_reclen or d_off. --- libc-top-half/musl/include/dirent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc-top-half/musl/include/dirent.h b/libc-top-half/musl/include/dirent.h index b780ffe..20b1f79 100644 --- a/libc-top-half/musl/include/dirent.h +++ b/libc-top-half/musl/include/dirent.h @@ -25,11 +25,11 @@ typedef struct __dirstream DIR; #include <__typedef_DIR.h> #endif +#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF #define _DIRENT_HAVE_D_TYPE -#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ struct dirent { ino_t d_ino; off_t d_off; -- 2.39.5