summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-06-12 21:45:10 +0000
committerEric Andersen <andersen@codepoet.org>2001-06-12 21:45:10 +0000
commit92773db48eb6be7bc3ef12f44e4b163a7f5e0af3 (patch)
tree7a5097716ad65c0899d917a25379131e26a7e47b /libc/stdlib
parent23f586ed1edb81cea7c976eb1f2354ab24294908 (diff)
Cleanup the toploevel makefile handing of shared libs. Add weak_alias
define, and set things up so nasty old coff toolchains can now compile things and should actually work again. -Erik
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/random.c3
-rw-r--r--libc/stdlib/unix_grantpt.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c
index bef89c01f..cbd4206ae 100644
--- a/libc/stdlib/random.c
+++ b/libc/stdlib/random.c
@@ -34,5 +34,4 @@ void srandom(unsigned int seed)
seed3 = seed % 31656 + 1;
}
-__asm__(".weak srand; srand = srandom");
-
+weak_alias(srandom, srand);
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index eb6ce0b35..c8d70ad64 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -140,7 +140,11 @@ grantpt (int fd)
/* We have to use the helper program. */
helper:
+#ifdef __UCLIBC_HAS_MMU__
pid = fork ();
+#else
+ pid = vfork ();
+#endif
if (pid == -1)
goto cleanup;
else if (pid == 0)