Including <sys/ioctl.h> is still required on Emscripten, just like on other platforms, to make the ioctl function available.
Signed-off-by: Kohei Tokunaga <ktokunaga.m...@gmail.com> --- block/file-posix.c | 4 ++++ 1 file changed, 4 insertions(+) V2: - Split this from the previous 12th patch into a separate commit and revised the commit message to clarify the purpose of the patch. diff --git a/block/file-posix.c b/block/file-posix.c index 56d1972d15..69257c0891 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -110,6 +110,10 @@ #include <sys/diskslice.h> #endif +#ifdef EMSCRIPTEN +#include <sys/ioctl.h> +#endif + /* OS X does not have O_DSYNC */ #ifndef O_DSYNC #ifdef O_SYNC -- 2.25.1