[rtems-libbsd commit] libkern.h: Deal with latest <stdlib.h> of Newlib
Sebastian Huber
sebh at rtems.org
Thu Apr 7 12:01:30 UTC 2016
Module: rtems-libbsd
Branch: master
Commit: 891a7568e5a875ba4b8e2ed38c5b4865b24ce896
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=891a7568e5a875ba4b8e2ed38c5b4865b24ce896
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Apr 7 14:00:13 2016 +0200
libkern.h: Deal with latest <stdlib.h> of Newlib
---
freebsd/sys/sys/libkern.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/freebsd/sys/sys/libkern.h b/freebsd/sys/sys/libkern.h
index dcdd802..4965ba3 100644
--- a/freebsd/sys/sys/libkern.h
+++ b/freebsd/sys/sys/libkern.h
@@ -113,12 +113,23 @@ void qsort(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
void qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
int (*compar)(void *, const void *, const void *));
+#ifndef __rtems__
u_long random(void);
+#else /* __rtems__ */
+#include <stdlib.h>
+u_long _bsd_random(void);
+#define random() _bsd_random()
+#endif /* __rtems__ */
char *index(const char *, int);
char *rindex(const char *, int);
int scanc(u_int, const u_char *, const u_char *, int);
int skpc(int, int, char *);
+#ifndef __rtems__
void srandom(u_long);
+#else /* __rtems__ */
+void _bsd_srandom(u_long);
+#define srandom(_x) _bsd_srandom(_x)
+#endif /* __rtems__ */
int strcasecmp(const char *, const char *);
char *strcat(char * __restrict, const char * __restrict);
int strcmp(const char *, const char *);
More information about the vc
mailing list