From 595885409849fe92233e96d272f305423eca7499 Mon Sep 17 00:00:00 2001 From: Gon Solo Date: Mon, 28 Nov 2022 09:41:35 +0100 Subject: [PATCH 1/2] Fix getmntent check with -Werror. --- libs/pbd/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 33eaba7b9c6..da46f49cb03 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -122,7 +122,7 @@ def configure(conf): define_name='HAVE_POSIX_MEMALIGN', execute = False, mandatory=False) conf.check_cc( msg="Checking for function 'getmntent' in mntent.h", - fragment = "#include \n int main(void) { return (int)getmntent(0); }\n", + fragment = "#include \n int main(void) { getmntent(0); }\n", define_name='HAVE_GETMNTENT', execute = False, mandatory=False) conf.check_cc( msg="Checking for function 'localtime_r' in time.h", From cc135a8668d072187a7b03e7932d5dba75773c83 Mon Sep 17 00:00:00 2001 From: Gon Solo Date: Mon, 28 Nov 2022 09:54:30 +0100 Subject: [PATCH 2/2] Error if there is no getmntent found on Linux. --- libs/pbd/mountpoint.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/pbd/mountpoint.cc b/libs/pbd/mountpoint.cc index df128aaf62a..7a118cbc863 100644 --- a/libs/pbd/mountpoint.cc +++ b/libs/pbd/mountpoint.cc @@ -110,6 +110,10 @@ mountpoint (string path) #else // !HAVE_GETMNTENT +#ifdef __linux__ +#error "getmntent is supported on Linux. Is this a configuration error?" +#endif + #include #include #include