From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7FD2C2C0AE for ; Tue, 16 Oct 2018 14:55:29 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CNNt5GTc5V7H for ; Tue, 16 Oct 2018 14:55:29 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 411B22C08F for ; Tue, 16 Oct 2018 14:55:29 -0400 (EDT) Date: Tue, 16 Oct 2018 21:55:26 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH] cmake: fix sync_file_range detection Message-ID: <20181016185526.GG5454@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: alexander.turenko@tarantool.org * Vladimir Davydov [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