summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2021-04-20 21:42:31 +0000
committerchristos <christos@NetBSD.org>2021-04-20 21:42:31 +0000
commit5bd020600400ae8ca1c366e998d224854c4fe219 (patch)
treeddaca3b447bff943af5c127518be54b7a982d323 /lib/libc/stdlib
parentf7ceb34426df187ab66f4ec7502e5054cd4b2c7a (diff)
Instead of compiling files with -fcommon, create an include file and declare
the 3 symbols that need to be common using an attribute. Put all the 3 symbol definitions in libc in one place (initfini.c). Reviewed by joerg@
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/_env.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdlib/_env.c b/lib/libc/stdlib/_env.c
index bade54e6b17..627db85ca41 100644
--- a/lib/libc/stdlib/_env.c
+++ b/lib/libc/stdlib/_env.c
@@ -1,4 +1,4 @@
-/* $NetBSD: _env.c,v 1.10 2020/02/22 10:05:12 kamil Exp $ */
+/* $NetBSD: _env.c,v 1.11 2021/04/20 21:42:32 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _env.c,v 1.10 2020/02/22 10:05:12 kamil Exp $");
+__RCSID("$NetBSD: _env.c,v 1.11 2021/04/20 21:42:32 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -44,6 +44,7 @@ __RCSID("$NetBSD: _env.c,v 1.10 2020/02/22 10:05:12 kamil Exp $");
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
+#include "csu-common.h"
#include "env.h"
#include "local.h"
@@ -94,8 +95,6 @@ __warn_references(__findenv,
/* Our initialization function. */
void __libc_env_init(void);
-char **environ;
-
/*ARGSUSED*/
static signed int
env_tree_compare_nodes(void *ctx, const void *node_a, const void *node_b)