From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13989 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew DeVault Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH 3/3] unistd/renameat: use renameat2 when appropriate Date: Thu, 21 Mar 2019 11:32:40 -0400 Message-ID: <20190321153240.29328-4-sir@cmpwn.com> References: <20190321153240.29328-1-sir@cmpwn.com> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="69885"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Drew DeVault To: musl@lists.openwall.com Original-X-From: musl-return-14005-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 21 16:33:31 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1h6zhB-000I3H-T6 for gllmg-musl@m.gmane.org; Thu, 21 Mar 2019 16:33:30 +0100 Original-Received: (qmail 5563 invoked by uid 550); 21 Mar 2019 15:32:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 5220 invoked from network); 21 Mar 2019 15:32:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1553182494; bh=887yOmC4ZCS7TZkUCafes0Fys8HDvsmBNJ854aL8Hjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K00LTrLiD1WK2E5RwwPT/BOOt3o+Qp1lWd1/Qo6b43/BNrsBT5CJhifqSnvoatLEH UHHpUELiIHQ1zgyzq9SCXd6ecUylAxrDi+0SCfk7WdhrL2eodwJmbaslc++RSlaiqh ClNC4wGDTEoplxtAIhrQ5EciyENiqQO2TjN3tlHU= X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190321153240.29328-1-sir@cmpwn.com> Xref: news.gmane.org gmane.linux.lib.musl.general:13989 Archived-At: --- src/unistd/renameat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c index 12574822..c3b40a25 100644 --- a/src/unistd/renameat.c +++ b/src/unistd/renameat.c @@ -3,5 +3,9 @@ int renameat(int oldfd, const char *old, int newfd, const char *new) { +#ifdef SYS_renameat return syscall(SYS_renameat, oldfd, old, newfd, new); +#else + return syscall(SYS_renameat2, oldfd, old, newfd, new, 0); +#endif } -- 2.21.0