Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: alexander.turenko@tarantool.org
Subject: [tarantool-patches] Re: [PATCH] cmake: fix sync_file_range detection
Date: Tue, 16 Oct 2018 21:55:26 +0300	[thread overview]
Message-ID: <20181016185526.GG5454@chai> (raw)
In-Reply-To: <ee711b32d79fcc65b6854f28a476354a75d67604.1538835045.git.vdavydov.dev@gmail.com>

* Vladimir Davydov <vdavydov.dev@gmail.com> [18/10/06 19:34]:
> sync_file_range is declared only if _GNU_SOURCE macro is defined.
> Also, in order to be used in a source file, HAVE_SYNC_FILE_RANGE
> must be present in config.h.cmake.
> 
> Fixes commit caae99e5eaa0 ("Refactor xlog writer").
> ---
> https://github.com/tarantool/tarantool/commits/dv/cmake-fix-gnu-symbol-detection
> 
>  CMakeLists.txt            | 2 ++
>  src/trivia/config.h.cmake | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index bf68d187..b26d2abf 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -69,6 +69,8 @@ include(cmake/profile.cmake)
>  include(cmake/module.cmake)
>  include(cmake/thread.cmake)
>  
> +list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
> +

Uhm, why are we defining this here and not where we check for sync
file range? 

>  check_symbol_exists(MAP_ANON sys/mman.h HAVE_MAP_ANON)
>  check_symbol_exists(MAP_ANONYMOUS sys/mman.h HAVE_MAP_ANONYMOUS)
>  check_include_file(sys/time.h HAVE_SYS_TIME_H)

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  parent reply	other threads:[~2018-10-16 18:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06 14:51 Vladimir Davydov
2018-10-08  3:04 ` Alexander Turenko
2018-10-08  8:00   ` Vladimir Davydov
2018-10-08  9:23     ` Alexander Turenko
2018-10-08 10:30       ` Vladimir Davydov
2018-10-08 13:14         ` Alexander Turenko
2018-10-08 14:42           ` Vladimir Davydov
2018-10-16 18:55 ` Konstantin Osipov [this message]
2018-10-17  7:13   ` [tarantool-patches] " Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181016185526.GG5454@chai \
    --to=kostja@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] cmake: fix sync_file_range detection' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox