From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2716 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] Add support for mkostemp, mkstemps and mkostemps Date: Sat, 02 Feb 2013 20:59:21 +0100 Message-ID: <510D7019.3070907@barfooze.de> References: <1359830731-24717-1-git-send-email-basile@opensource.dyc.edu> <510D6E30.60206@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050800020601020507010102" X-Trace: ger.gmane.org 1359835209 10760 80.91.229.3 (2 Feb 2013 20:00:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Feb 2013 20:00:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2717-gllmg-musl=m.gmane.org@lists.openwall.com Sat Feb 02 21:00:30 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U1jGH-0004uS-7Z for gllmg-musl@plane.gmane.org; Sat, 02 Feb 2013 21:00:29 +0100 Original-Received: (qmail 1724 invoked by uid 550); 2 Feb 2013 20:00:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 1716 invoked from network); 2 Feb 2013 20:00:10 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 In-Reply-To: <510D6E30.60206@barfooze.de> Xref: news.gmane.org gmane.linux.lib.musl.general:2716 Archived-At: This is a multi-part message in MIME format. --------------050800020601020507010102 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/02/2013 08:51 PM, John Spencer wrote: > here's my version: > > oops, forgot to pass O_RDWR, here's a fixup --------------050800020601020507010102 Content-Type: text/x-patch; name="0001-fix-O_RDWR-not-being-passed-to-mkostemps.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-fix-O_RDWR-not-being-passed-to-mkostemps.patch" >From ebdecbd45156c5525fe2483982c77fab484bb946 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sat, 2 Feb 2013 20:58:32 +0100 Subject: [PATCH] fix O_RDWR not being passed to mkostemps --- src/temp/mkstemp.c | 3 ++- src/temp/mkstemps.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/temp/mkstemp.c b/src/temp/mkstemp.c index 07ec4d7..17bfcbb 100644 --- a/src/temp/mkstemp.c +++ b/src/temp/mkstemp.c @@ -1,10 +1,11 @@ #include "libc.h" +#include int __mkostemps (char *template, int suffixlen, int flags); int mkstemp(char *template) { - return __mkostemps(template, 0, 0); + return __mkostemps(template, 0, O_RDWR); } LFS64(mkstemp); diff --git a/src/temp/mkstemps.c b/src/temp/mkstemps.c index 6d16d9c..caad441 100644 --- a/src/temp/mkstemps.c +++ b/src/temp/mkstemps.c @@ -1,10 +1,11 @@ +#include #include "libc.h" int __mkostemps (char *template, int suffixlen, int flags); int mkstemps (char *template, int suffixlen) { - return __mkostemps(template, suffixlen, 0); + return __mkostemps(template, suffixlen, O_RDWR); } LFS64(mkstemps); -- 1.7.3.4 --------------050800020601020507010102--