diff options
| author | yangwei <[email protected]> | 2021-10-01 16:51:46 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2021-10-01 16:51:46 +0800 |
| commit | 910bb802d7ace10739e7a22622a379af58b384fc (patch) | |
| tree | 16823b7881783e89aa9bfff41ead75abad3ec6b2 /include | |
| parent | 6f72ae84ab6e2b8c4805e3f0c5ed0979062c2819 (diff) | |
🦄 refactor(dns.h): 更新define为typedef,避免编译器报重复定义
Diffstat (limited to 'include')
| -rw-r--r-- | include/dns.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/include/dns.h b/include/dns.h index ed46f81..9e048ff 100644 --- a/include/dns.h +++ b/include/dns.h @@ -3,17 +3,9 @@ #include <MESA/cJSON.h> -#ifndef u_char -#define u_char unsigned char -#endif - -#ifndef u_int16_t -#define u_int16_t unsigned short -#endif - -#ifndef u_int32_t -#define u_int32_t unsigned int //adjust by lqy 20070521 long to int -#endif +typedef unsigned char u_char; +typedef unsigned short u_int16_t; +typedef unsigned int u_int32_t; #define G_DNS_TTL (rand()%1800+1800)//0.5->1hour 2015.01.26by ljp |
