diff options
author | David Robillard <d@drobilla.net> | 2021-04-14 14:05:47 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-04-14 14:05:47 -0400 |
commit | b72238c97fe2e3c9db550af7d4b22d41c8350eaf (patch) | |
tree | 5d48f01e80833b26878ff10802370e4c52a7c064 | |
parent | 31051dfdf23426c9804d343bbeb5756da89f28a8 (diff) | |
download | lilv-b72238c97fe2e3c9db550af7d4b22d41c8350eaf.tar.gz lilv-b72238c97fe2e3c9db550af7d4b22d41c8350eaf.tar.bz2 lilv-b72238c97fe2e3c9db550af7d4b22d41c8350eaf.zip |
Fix build on FreeBSD
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | src/filesystem.c | 3 | ||||
-rw-r--r-- | test/test_util.c | 1 | ||||
-rw-r--r-- | test/test_value.c | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 135cf7b..843ccad 100644 --- a/meson.build +++ b/meson.build @@ -26,6 +26,7 @@ if get_option('strict') c_warnings = all_c_warnings if cc.get_id() == 'clang' c_warnings += [ + '-Wno-c11-extensions', '-Wno-cast-align', '-Wno-cast-qual', '-Wno-documentation-unknown-command', @@ -41,6 +42,7 @@ if get_option('strict') '-Wno-shorten-64-to-32', '-Wno-sign-conversion', '-Wno-switch-enum', + '-Wno-unused-macros', '-Wno-vla', ] elif cc.get_id() == 'gcc' diff --git a/src/filesystem.c b/src/filesystem.c index 03614ce..2b383a7 100644 --- a/src/filesystem.c +++ b/src/filesystem.c @@ -17,6 +17,7 @@ #define _POSIX_C_SOURCE 200809L /* for fileno */ #define _BSD_SOURCE 1 /* for realpath, symlink */ #define _DEFAULT_SOURCE 1 /* for realpath, symlink */ +#define __BSD_VISIBLE 1 #ifdef __APPLE__ # define _DARWIN_C_SOURCE 1 /* for flock */ @@ -39,6 +40,8 @@ #endif #if USE_FLOCK && USE_FILENO +# include <sys/types.h> +# # include <sys/file.h> #endif diff --git a/test/test_util.c b/test/test_util.c index 8c8f36a..b49b14e 100644 --- a/test/test_util.c +++ b/test/test_util.c @@ -15,6 +15,7 @@ */ #define _XOPEN_SOURCE 600 /* for mkstemp */ +#define __BSD_VISIBLE 1 #undef NDEBUG diff --git a/test/test_value.c b/test/test_value.c index b36737a..82b44b7 100644 --- a/test/test_value.c +++ b/test/test_value.c @@ -72,12 +72,6 @@ main(void) assert(fabs(lilv_node_as_float(fval) - 1.6180) < FLT_EPSILON); assert(isnan(lilv_node_as_float(sval))); -#if defined(__clang__) -# pragma clang diagnostic pop -#elif defined(__GNUC__) && __GNUC__ > 4 -# pragma GCC diagnostic pop -#endif - LilvNode* loc_abs = lilv_new_file_uri(world, NULL, "/foo/bar"); LilvNode* loc_rel = lilv_new_file_uri(world, NULL, "foo"); LilvNode* host_abs = lilv_new_file_uri(world, "host", "/foo/bar"); |