aboutsummaryrefslogtreecommitdiff
path: root/tools/build/cross-build
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2021-09-13 09:11:47 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2021-10-11 10:57:54 +0000
commita89410ef91798859f3fd7a5f675184b4d711ade4 (patch)
treec74bd5f624e5970cdf9c63eabaccb80fdd383c5e /tools/build/cross-build
parent6c4f95161d6e38ba3fd50ca1cceee3110cbfa02e (diff)
downloadsrc-a89410ef91798859f3fd7a5f675184b4d711ade4.tar.gz
src-a89410ef91798859f3fd7a5f675184b4d711ade4.zip
cross-build: fix some redeclaration warnings during bootstrap
MFC after: 3 days
Diffstat (limited to 'tools/build/cross-build')
-rw-r--r--tools/build/cross-build/include/linux/stdio.h8
-rw-r--r--tools/build/cross-build/include/linux/stdlib.h2
-rw-r--r--tools/build/cross-build/include/linux/sys/param.h3
-rw-r--r--tools/build/cross-build/include/linux/unistd.h4
-rw-r--r--tools/build/cross-build/include/mac/stdlib.h2
5 files changed, 6 insertions, 13 deletions
diff --git a/tools/build/cross-build/include/linux/stdio.h b/tools/build/cross-build/include/linux/stdio.h
index 340977c15d93..c5aa893b320c 100644
--- a/tools/build/cross-build/include/linux/stdio.h
+++ b/tools/build/cross-build/include/linux/stdio.h
@@ -37,13 +37,17 @@
*/
/* No #pragam once since glibc can include this multiple times */
-#include <sys/cdefs.h>
-
#include_next <stdio.h>
+#ifndef _BOOTSTRAP_LINUX_STDIO_H
+#define _BOOTSTRAP_LINUX_STDIO_H
+#include <sys/cdefs.h>
+
__BEGIN_DECLS
char *fgetln(FILE *, __SIZE_TYPE__ *);
#if defined(_WCHAR_H)
__WCHAR_TYPE__ *fgetwln(FILE *__restrict, __SIZE_TYPE__ *__restrict);
#endif
__END_DECLS
+
+#endif
diff --git a/tools/build/cross-build/include/linux/stdlib.h b/tools/build/cross-build/include/linux/stdlib.h
index 9e0c1de02ccb..1e559ce1158c 100644
--- a/tools/build/cross-build/include/linux/stdlib.h
+++ b/tools/build/cross-build/include/linux/stdlib.h
@@ -60,8 +60,6 @@ int cgetustr(char *, const char *, char **);
const char *getprogname(void);
void setprogname(const char *progname);
-void *reallocarray(void *, size_t, size_t) __result_use_check
- __alloc_size2(2, 3);
void *reallocf(void *, size_t) __result_use_check __alloc_size(2);
unsigned arc4random(void);
diff --git a/tools/build/cross-build/include/linux/sys/param.h b/tools/build/cross-build/include/linux/sys/param.h
index c918998e06a3..305d2767ae7e 100644
--- a/tools/build/cross-build/include/linux/sys/param.h
+++ b/tools/build/cross-build/include/linux/sys/param.h
@@ -47,6 +47,3 @@
* let's use 32 since that will work across all systems
*/
#define MAXLOGNAME 33 /* max login name length (incl. NUL) */
-
-/* For elftoolchain (seems like on ubuntu it's in errno.h) */
-extern char *program_invocation_short_name;
diff --git a/tools/build/cross-build/include/linux/unistd.h b/tools/build/cross-build/include/linux/unistd.h
index ea131f1ab732..f518df2ac9ae 100644
--- a/tools/build/cross-build/include/linux/unistd.h
+++ b/tools/build/cross-build/include/linux/unistd.h
@@ -85,10 +85,6 @@ getentropy(void *buf, size_t buflen)
}
#endif
-/* Used by elftoolchain: */
-extern char *program_invocation_name;
-extern char *program_invocation_short_name;
-
void *setmode(const char *);
mode_t getmode(const void *, mode_t);
diff --git a/tools/build/cross-build/include/mac/stdlib.h b/tools/build/cross-build/include/mac/stdlib.h
index fd9ba7fe6660..314ae0d1dca6 100644
--- a/tools/build/cross-build/include/mac/stdlib.h
+++ b/tools/build/cross-build/include/mac/stdlib.h
@@ -45,6 +45,4 @@ int rpmatch(const char *response);
long long strtonum(const char *numstr, long long minval, long long maxval,
const char **errstrp);
-void *reallocarray(void *optr, size_t nmemb, size_t size);
-
__END_DECLS