summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-04-23 17:22:57 -1000
committerKinseyMoore <48726349+KinseyMoore@users.noreply.github.com>2023-04-25 21:45:23 -0500
commit3c226ba471acd916f85a67258d8cd16c8bc17828 (patch)
tree2a257a0191323e6039368cabbd314528c808d090
parentbsd/ntp: Include rtems-bsd-program.h for calls to exti (diff)
downloadrtems-net-services-3c226ba471acd916f85a67258d8cd16c8bc17828.tar.bz2
bsd/ntp: Remove warning about errno_to_str
-rw-r--r--bsd/freebsd/contrib/ntp/include/ntp_stdlib.h4
-rw-r--r--bsd/freebsd/contrib/ntp/libntp/msyslog.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/bsd/freebsd/contrib/ntp/include/ntp_stdlib.h b/bsd/freebsd/contrib/ntp/include/ntp_stdlib.h
index fa0afb8..0b8c3c5 100644
--- a/bsd/freebsd/contrib/ntp/include/ntp_stdlib.h
+++ b/bsd/freebsd/contrib/ntp/include/ntp_stdlib.h
@@ -36,9 +36,13 @@ extern void mvsyslog(int, const char *, va_list) NTP_PRINTF(2, 0);
extern void init_logging (const char *, u_int32, int);
extern int change_logfile (const char *, int);
extern void setup_logfile (const char *);
+#ifndef __rtems__
#ifndef errno_to_str
extern void errno_to_str(int, char *, size_t);
#endif
+#else /* __rtems__ */
+extern void errno_to_str(int, char *, size_t);
+#endif /* __rtems__ */
extern int xvsbprintf(char**, char* const, char const*, va_list) NTP_PRINTF(3, 0);
extern int xsbprintf(char**, char* const, char const*, ...) NTP_PRINTF(3, 4);
diff --git a/bsd/freebsd/contrib/ntp/libntp/msyslog.c b/bsd/freebsd/contrib/ntp/libntp/msyslog.c
index da27c46..4a12672 100644
--- a/bsd/freebsd/contrib/ntp/libntp/msyslog.c
+++ b/bsd/freebsd/contrib/ntp/libntp/msyslog.c
@@ -96,7 +96,7 @@ format_errmsg(
* For Windows, we have:
* #define errno_to_str isc_strerror
*/
-#if !defined(errno_to_str) || DEBUG
+#if !defined(errno_to_str) || DEBUG || defined(__rtems__)
void
errno_to_str(
int err,