fuse,fuse3: Avoid unnecessary build warnings

Do not set FUSERMOUNT_DIR since we already set it though
NIX_CFLAGS_COMPILE.

Setting it twice results in a lot of warnings like this one:

<command-line>:0:0: warning: "FUSERMOUNT_DIR" redefined

which makes the build look potentially broken.
This doesn't affect the result but fuse3 will now build without any
warnings and building fuse yields less warnings.
This commit is contained in:
Michael Weiss 2019-06-14 18:23:08 +02:00
parent 189c4de9bf
commit f2cfc158b2
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83
3 changed files with 26 additions and 1 deletions

@ -28,7 +28,9 @@ in stdenv.mkDerivation rec {
url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch";
sha256 = "1w4j6f1awjrycycpvmlv0x5v9gprllh4dnbjxl4dyl2jgbkaw6pa";
})
++ stdenv.lib.optional isFuse3 ./fuse3-install.patch;
++ (if isFuse3
then [ ./fuse3-install.patch ./fuse3-Do-not-set-FUSERMOUNT_DIR.patch ]
else [ ./fuse2-Do-not-set-FUSERMOUNT_DIR.patch ]);
nativeBuildInputs = if isFuse3
then [ meson ninja pkgconfig ]

@ -0,0 +1,11 @@
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = subdir-objects
-AM_CPPFLAGS = -I$(top_srcdir)/include -DFUSERMOUNT_DIR=\"$(bindir)\" \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26
lib_LTLIBRARIES = libfuse.la libulockmgr.la

@ -0,0 +1,12 @@
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -36,8 +36,7 @@ libfuse = library('fuse3', libfuse_sources, version: meson.project_version(),
soversion: '3', include_directories: include_dirs,
dependencies: deps, install: true,
link_depends: 'fuse_versionscript',
- c_args: [ '-DFUSE_USE_VERSION=34',
- '-DFUSERMOUNT_DIR="@0@"'.format(fusermount_path) ],
+ c_args: [ '-DFUSE_USE_VERSION=34' ],
link_args: ['-Wl,--version-script,' + meson.current_source_dir()
+ '/fuse_versionscript' ])