summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2015-03-20 10:44:42 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-03-24 08:16:28 -0500
commit0a9345ed684bc74b27731fb2aeda2ebab13773c9 (patch)
treed4baab67c6578f7afdf7d98a9777bcc5810ff567 /cpukit
parentdummy/default-configuration.c: Tune configuration down for small targets (diff)
downloadrtems-0a9345ed684bc74b27731fb2aeda2ebab13773c9.tar.bz2
shell/utils-cp.c: Avoid redefinition of TIMESPEC_TO_TIMEVAL
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libmisc/shell/utils-cp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/utils-cp.c b/cpukit/libmisc/shell/utils-cp.c
index 7b7c7fc771..4eab78e262 100644
--- a/cpukit/libmisc/shell/utils-cp.c
+++ b/cpukit/libmisc/shell/utils-cp.c
@@ -328,6 +328,15 @@ copy_special(rtems_shell_cp_globals* cp_globals, struct stat *from_stat, int exi
return (pflag ? setfile(cp_globals, from_stat, -1) : 0);
}
+#if defined(__rtems__)
+ /*
+ * Newlib's <sys/timespec.h> has the real BSD definition of this macro
+ * and it does not behave the same as this one. Thus we need to undefine
+ * the BSD standard one and use the one expected by this file.
+ */
+ #undef TIMESPEC_TO_TIMEVAL
+#endif
+
#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
(tv)->tv_sec = *(ts); \
(tv)->tv_usec = 0; \