summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/legacy/rtlegacy.h8
-rw-r--r--components/net/sal/src/sal_socket.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/components/legacy/rtlegacy.h b/components/legacy/rtlegacy.h
index df8463cdd2..19b7f38209 100644
--- a/components/legacy/rtlegacy.h
+++ b/components/legacy/rtlegacy.h
@@ -12,10 +12,12 @@
#define __RT_LEGACY_H__
#include <rtconfig.h>
+#include <rtdef.h>
-/* rtlibc */
-#include <stdint.h>
-#include <stddef.h>
+/* legacy version macros */
+#define RT_VERSION RT_VERSION_MAJOR /**< major version number */
+#define RT_SUBVERSION RT_VERSION_MINOR /**< minor version number */
+#define RT_REVISION RT_VERSION_PATCH /**< revise version number */
/* IPC */
#ifdef RT_USING_DEVICE_IPC
diff --git a/components/net/sal/src/sal_socket.c b/components/net/sal/src/sal_socket.c
index 3256b9f4d6..e3dafd0cc8 100644
--- a/components/net/sal/src/sal_socket.c
+++ b/components/net/sal/src/sal_socket.c
@@ -238,9 +238,9 @@ static void check_netdev_internet_up_work(struct rt_work *work, void *work_data)
{
send_data[index + 1] = netdev->hwaddr[index] + moth_num;
}
- send_data[9] = RT_VERSION;
- send_data[10] = RT_SUBVERSION;
- send_data[11] = RT_REVISION;
+ send_data[9] = RT_VERSION_MAJOR;
+ send_data[10] = RT_VERSION_MINOR;
+ send_data[11] = RT_VERSION_PATCH;
skt_ops->sendto(sockfd, send_data, SAL_INTERNET_BUFF_LEN, 0,
(struct sockaddr *)&server_addr, sizeof(struct sockaddr));