summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-10-12 20:32:25 +0200
committerDave Davenport <qball@gmpclient.org>2020-10-12 20:32:25 +0200
commit585538b42882ce8e8217a56f6b4dd05c0a0b68ff (patch)
treec0ab930681e45713425c0efd3c76a4f055899555
parent519d4d281826aedc8b2f6048a8f7cc0f154a0ec7 (diff)
Try fixing build on meson of readdir dirent args.
-rw-r--r--configure.ac1
-rw-r--r--meson.build1
-rw-r--r--source/dialogs/filebrowser.c3
3 files changed, 5 insertions, 0 deletions
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 <gmodule.h>
#include <gio/gio.h>
+#include <sys/types.h>
+#include <dirent.h>
+
#include "mode.h"
#include "helper.h"
#include "mode-private.h"