summaryrefslogtreecommitdiff
path: root/net/sntp.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@jdl.com>2007-06-11 19:02:49 -0500
committerWolfgang Denk <wd@denx.de>2007-07-04 00:23:14 +0200
commit6e2115acb6a892d53a6881bf253ae41d3df39156 (patch)
tree0e172685b76a40bf48460793dec4f67c55768115 /net/sntp.c
parent45cdb9b72c94655c7308b464a2666057c0b286e0 (diff)
net/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
Diffstat (limited to 'net/sntp.c')
-rw-r--r--net/sntp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sntp.c b/net/sntp.c
index db8c2c27998..4e38d4153bd 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -12,7 +12,8 @@
#include "sntp.h"
-#if ((CONFIG_COMMANDS & CFG_CMD_NET) && (CONFIG_COMMANDS & CFG_CMD_SNTP))
+#if (((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \
+ && ((CONFIG_COMMANDS & CFG_CMD_SNTP)) || defined(CONFIG_CMD_SNTP))
#define SNTP_TIMEOUT 10
@@ -67,7 +68,7 @@ SntpHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
memcpy (&seconds, &rpktp->transmit_timestamp, sizeof(ulong));
to_tm(ntohl(seconds) - 2208988800UL + NetTimeOffset, &tm);
-#if (CONFIG_COMMANDS & CFG_CMD_DATE)
+#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)
rtc_set (&tm);
#endif
printf ("Date: %4d-%02d-%02d Time: %2d:%02d:%02d\n",