From patchwork Thu Dec 22 02:28:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 13079330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2716C4332F for ; Thu, 22 Dec 2022 02:28:43 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1p8BK5-0004Lt-A0; Thu, 22 Dec 2022 02:28:41 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p8BK4-0004Ln-8m for linux-f2fs-devel@lists.sourceforge.net; Thu, 22 Dec 2022 02:28:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BJjx1P6uTGc0MvAfR+qnHnZ3YF2ePGv2gUWGfttFHPI=; b=bBrmMYf4v7F3dXz79DbtOhYYjZ 6JqjmcCELvr+g9SYfboloU38xcg/BAGZXXwXwJLNwnvYqa9jFEvxYa3YN5LVyARkQ1l/pUFTO2nUV xfliLW3N9X4WZBbbJzgrnvMo2nza3mjAdo/2ilPnrT8mAlOBw+Nf/yyNAnpeH1JxX5eo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BJjx1P6uTGc0MvAfR+qnHnZ3YF2ePGv2gUWGfttFHPI=; b=V1rsTVlVPSD5bMA60RyzJKYJYE Cy7vBWtSrWCv3F0uwxLTrt/zhvHaQKLYnh0/I3mq+Uy6sI828ENXtVqVIrJ9OR6Rjez445LitfHDw FEDxj9UZXHgXahaJ7h4iui6mN9/U5glpvTjQ5afs4xdk18TW5eHpyLWbWqBLZ4YyYjQI=; Received: from mail-pj1-f47.google.com ([209.85.216.47]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1p8BK3-007OJv-J6 for linux-f2fs-devel@lists.sourceforge.net; Thu, 22 Dec 2022 02:28:40 +0000 Received: by mail-pj1-f47.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so4304964pje.5 for ; Wed, 21 Dec 2022 18:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BJjx1P6uTGc0MvAfR+qnHnZ3YF2ePGv2gUWGfttFHPI=; b=ZGUsuvRI1XgADXNGbovzZpD/Z0LIYDtoWlUA8oxL8MYNxUzcMcqwN7q269/hWdgEzd SWJoI0S1AXIEwuOMZQdqXUk17V5DgaFEnypnkQPJtKZ5lSkbH7snMv+gkV7SdPyVjPFw 6dUzxY3RZUeOZGEWsKNVPiDBj3e5ABp7yN6WswFd+hxQTy78BgeU+0sfQn2fdJU5lnLS Adgtl3+YCzs7JDBtKVZl8gA8/8/5z1gbCtxVzxaZcTYKQ0XX5z9TBks152HMYeiM15sz afsZxuJjE9rpakSc49BM4IyrxmLZKqC6lQUewsbgSAZpYdNF2MPR8x9n/53hx21TPnVb lsWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BJjx1P6uTGc0MvAfR+qnHnZ3YF2ePGv2gUWGfttFHPI=; b=RpsimZRAuZsnqnEV7y/a11fOL3vVPIdtytTLL43wULIrAqk7iDC56biwTCIUuU8XxB Yd5DLtV8hthVP6OHe0jXVFcX4kqzsR4WXrZAKmnC2oeV39HOrH9V3rsGh7dEK23Qq5pY laINN0majuunYbWALvtZZ7+3+Sp/YQjyo6CyC8TuZb63eYwqVgA7CK2LJD3phIG6rtJX m/nkTcSNZKuU0R9K9JXzbhC8uP1A6iDRrJJ6y2UwrFlUz6c44vtzOLw9KOEb9/jOG3Dx 8anLXqWIc2XV4tjXmutCiVGMY9EKnqa8eKGyuz74LxcMQKyUP/t/g8zC6Jfg4ARHKxB7 8lnw== X-Gm-Message-State: AFqh2ko2GdXIaBnEDKTHUymJ/IBBgSE532TDXsrKSh9F1UlNXfxBWqmJ fI8D+O+VuR3UarRzHdCr8B0kzXqn6JU= X-Google-Smtp-Source: AMrXdXsfviNqBBMiICWtseY4ZrWgdvdiIA4ezkIPhWXjlDEgjkPRqvhp++rhlvqwWiR6bPqQ7KnYbg== X-Received: by 2002:a05:6a21:3949:b0:a7:9022:5d5e with SMTP id ac9-20020a056a21394900b000a790225d5emr5248001pzc.2.1671676113649; Wed, 21 Dec 2022 18:28:33 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::41f2]) by smtp.gmail.com with ESMTPSA id n20-20020a638f14000000b00478c48cf73csm10521278pgd.82.2022.12.21.18.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 18:28:33 -0800 (PST) From: Khem Raj To: linux-f2fs-devel@lists.sourceforge.net Date: Wed, 21 Dec 2022 18:28:30 -0800 Message-Id: <20221222022830.976309-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221222022830.976309-1-raj.khem@gmail.com> References: <20221222022830.976309-1-raj.khem@gmail.com> MIME-Version: 1.0 X-Headers-End: 1p8BK3-007OJv-J6 Subject: [f2fs-dev] [PATCH 2/2] f2fs_io: Define _FILE_OFFSET_BITS=64 X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Khem Raj Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Remove _LARGEFILE64_SOURCE, this is redundant when _FILE_OFFSET_BITS=64 additionally it fixes build with musl because the detection logic for lseek64 fails because when using _LARGEFILE64_SOURCE musl also define's lseek64 as an alias to lseek Signed-off-by: Khem Raj --- lib/libf2fs_io.c | 4 +++- tools/f2fs_io/f2fs_io.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c index 1a8167d..abb43a3 100644 --- a/lib/libf2fs_io.c +++ b/lib/libf2fs_io.c @@ -11,7 +11,9 @@ * * Dual licensed under the GPL or LGPL version 2 licenses. */ -#define _LARGEFILE64_SOURCE +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif #include #include diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index 6dcd840..cb99039 100644 --- a/tools/f2fs_io/f2fs_io.c +++ b/tools/f2fs_io/f2fs_io.c @@ -12,8 +12,8 @@ #ifndef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE #endif -#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 #endif #ifndef O_LARGEFILE #define O_LARGEFILE 0