From ec6112e0b140d0fac176cf8c1de4211b96bf2d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C5=93ur?= Date: Wed, 12 Jun 2024 09:34:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20compile=20error:=20no=20matching=20functi?= =?UTF-8?q?on=20for=20call=20to=20=E2=80=98flock::flock=E2=80=98=20(#6908)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix compile error with gcc 8.2: no matching function for call to ‘flock::flock(tr_sys_file_t&, const int&) * #error temp checking which pipelines have XFS * code review: removing duplicate include --------- Co-authored-by: yunhai --- libtransmission/file-posix.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtransmission/file-posix.cc b/libtransmission/file-posix.cc index c274748b0..dbec2b231 100644 --- a/libtransmission/file-posix.cc +++ b/libtransmission/file-posix.cc @@ -23,8 +23,11 @@ #include #include /* lseek(), write(), ftruncate(), pread(), pwrite(), pathconf(), etc */ -#ifdef HAVE_XFS_XFS_H +#ifdef HAVE_FLOCK #include /* flock() */ +#endif + +#ifdef HAVE_XFS_XFS_H #include #endif