From 585538b42882ce8e8217a56f6b4dd05c0a0b68ff Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 12 Oct 2020 20:32:25 +0200 Subject: [PATCH] Try fixing build on meson of readdir dirent args. --- configure.ac | 1 + meson.build | 1 + source/dialogs/filebrowser.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 3bf9aee1..2adc8c53 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,7 @@ AC_CHECK_FUNC([fcntl],, AC_MSG_ERROR("Could not find fcntl")) AC_CHECK_FUNC([setlocale],,AC_MSG_ERROR("Could not find setlocale")) AC_CHECK_FUNC([atexit],, AC_MSG_ERROR("Could not find atexit in c library")) AC_CHECK_FUNC([glob],, AC_MSG_ERROR("Could not find glob in c library")) +AC_CHECK_FUNC([readdir],, AC_MSG_ERROR("Could not find readdir in c library")) AC_CHECK_HEADER([math.h],, AC_MSG_ERROR("Could not find math.h header file")) AC_SEARCH_LIBS([floor],[m],, AC_MSG_ERROR("Could not find floor in math library")) diff --git a/meson.build b/meson.build index fef61f99..d220b030 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,7 @@ c_compiler = meson.get_compiler('c') add_project_arguments( '-I@0@'.format(meson.build_root()), '-I@0@'.format(join_paths(meson.source_root(), 'include')), + '-D_DEFAULT_SOURCE=1', language: 'c' ) diff --git a/source/dialogs/filebrowser.c b/source/dialogs/filebrowser.c index d4ab9576..90f1b133 100644 --- a/source/dialogs/filebrowser.c +++ b/source/dialogs/filebrowser.c @@ -31,6 +31,9 @@ #include #include +#include +#include + #include "mode.h" #include "helper.h" #include "mode-private.h"