about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/misc/shared-mime-info/fix-clang-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/data/misc/shared-mime-info/fix-clang-warnings.patch')
-rw-r--r--nixpkgs/pkgs/data/misc/shared-mime-info/fix-clang-warnings.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/data/misc/shared-mime-info/fix-clang-warnings.patch b/nixpkgs/pkgs/data/misc/shared-mime-info/fix-clang-warnings.patch
new file mode 100644
index 000000000000..2d185549c4e6
--- /dev/null
+++ b/nixpkgs/pkgs/data/misc/shared-mime-info/fix-clang-warnings.patch
@@ -0,0 +1,31 @@
+diff --git a/meson.build b/meson.build
+index 1780c44..7998a51 100644
+--- a/meson.build
++++ b/meson.build
+@@ -49,12 +49,7 @@ endif
+ ###############################################################################
+ # Dependencies
+ 
+-check_functions = [
+-    'fdatasync',
+-]
+-foreach function : check_functions
+-    config.set('HAVE_'+function.to_upper(), cc.has_function(function))
+-endforeach
++config.set('HAVE_FDATASYNC', cc.has_function('fdatasync', prefix: '#include <unistd.h>'))
+ 
+ 
+ if get_option('build-translations')
+diff --git a/src/update-mime-database.cpp b/src/update-mime-database.cpp
+index 733ba06..4ca6d06 100644
+--- a/src/update-mime-database.cpp
++++ b/src/update-mime-database.cpp
+@@ -2158,7 +2158,7 @@ static void check_in_path_xdg_data(const char *mime_path)
+ 
+ 	env = getenv("XDG_DATA_DIRS");
+ 	if (!env)
+-		env = "/usr/local/share/"PATH_SEPARATOR"/usr/share/";
++		env = "/usr/local/share/" PATH_SEPARATOR "/usr/share/";
+ 	dirs = g_strsplit(env, PATH_SEPARATOR, 0);
+ 	g_return_if_fail(dirs != NULL);
+ 	for (n = 0; dirs[n]; n++)