summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/Makefile6
-rw-r--r--mbbsd/random.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/mbbsd/Makefile b/mbbsd/Makefile
index f637e95e..1c4b6ee6 100644
--- a/mbbsd/Makefile
+++ b/mbbsd/Makefile
@@ -17,7 +17,7 @@ OBJS= admin.o announce.o args.o assess.o bbs.o board.o cache.o cal.o card.o\
xyz.o voteboard.o syspost.o var.o passwd.o calendar.o go.o file.o
.if defined(DIET)
OBJS+= random.o time.o
-#CC:= diet -Os $(CC)
+DIETCC= diet -Os
.endif
.if defined(MERGEBBS)
@@ -27,13 +27,13 @@ OBJS+= merge.o
.SUFFIXES: .c .o
.c.o: ../include/var.h
- $(CCACHE) $(CC) $(CFLAGS) -c $*.c
+ $(CCACHE) $(DIETCC) $(CC) $(CFLAGS) -c $*.c
all: $(PROG)
$(PROG): $(OBJS)
sh ../util/newvers.sh
- $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) $(EXT_LIBS) vers.c
+ $(DIETCC) $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) $(EXT_LIBS) vers.c
../include/var.h: var.c
perl ../util/parsevar.pl < var.c > ../include/var.h
diff --git a/mbbsd/random.c b/mbbsd/random.c
index 22f9ba59..2405ea92 100644
--- a/mbbsd/random.c
+++ b/mbbsd/random.c
@@ -67,6 +67,7 @@ struct random_data
int rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */
};
+int __random_r (struct random_data *buf, int32_t *result);
@@ -703,4 +704,8 @@ __random ()
return retval;
}
+long int glibc_random(void) { return __random(); }
+void glibc_srandom(unsigned int seed) { __srandom(seed); }
+char *glibc_initstate(unsigned int seed, char *state, size_t n) { return __initstate(seed,state,n); }
+char *glibc_setstate(char *state) { return __setstate(state); }
#endif