From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/625 Path: news.gmane.org!not-for-mail From: Georgi Chorbadzhiyski Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH 1/4] include/stdlib.h: Define clearenv() if (_SVID_SOURCE || _BSD_SOURCE) is set. Date: Fri, 9 Mar 2012 10:14:11 +0200 Message-ID: <1331280854-9080-2-git-send-email-gf@unixsol.org> References: <1331280854-9080-1-git-send-email-gf@unixsol.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1331280886 21546 80.91.229.3 (9 Mar 2012 08:14:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2012 08:14:46 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-623-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 09 09:14:46 2012 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 1S5uyJ-0000dZ-A5 for gllmg-musl@plane.gmane.org; Fri, 09 Mar 2012 09:14:43 +0100 Original-Received: (qmail 22023 invoked by uid 550); 9 Mar 2012 08:14:36 -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 21987 invoked from network); 9 Mar 2012 08:14:30 -0000 X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1331280854-9080-1-git-send-email-gf@unixsol.org> Xref: news.gmane.org gmane.linux.lib.musl.general:625 Archived-At: According to clearenv(3) man page, the function should be defined if (_SVID_SOURCE || _BSD_SOURCE) is set. --- include/stdlib.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index 9c8a118..441eef6 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -127,12 +127,15 @@ unsigned short *seed48 (unsigned short [3]); void lcong48 (unsigned short [7]); #endif +#if defined(_GNU_SOURCE) || defined(_SVID_SOURCE) || defined(_BSD_SOURCE) +int clearenv(void); +#endif + #if defined(_GNU_SOURCE) void *alloca(size_t); char *mktemp (char *); void *valloc (size_t); void *memalign(size_t, size_t); -int clearenv(void); int ptsname_r(int, char *, size_t); char *ecvt(double, int, int *, int *); char *fcvt(double, int, int *, int *); -- 1.7.5.1