add MAXHOSTNAMELEN in headfile

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2021-11-24 16:57:16 +08:00 committed by Xiang Xiao
parent 1b3005accf
commit 624b8d0776
3 changed files with 7 additions and 2 deletions

View File

@ -303,4 +303,6 @@
#define IOV_MAX INT_MAX
#define HOST_NAME_MAX 32
#endif /* __INCLUDE_LIMITS_H */

View File

@ -25,10 +25,14 @@
* Included Files
****************************************************************************/
#include <limits.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define MAXHOSTNAMELEN HOST_NAME_MAX
/****************************************************************************
* Public Type Definitions
****************************************************************************/

View File

@ -27,6 +27,7 @@
#include <sys/types.h>
#include <nuttx/compiler.h>
#include <limits.h>
/****************************************************************************
* Pre-processor Definitions
@ -256,8 +257,6 @@
#define STDIN_FILENO 0 /* File number of stdin */
#define STDOUT_FILENO 1 /* File number of stdout */
#define HOST_NAME_MAX 32
/* Helpers and legacy compatibility definitions */
#define link(p1, p2) symlink((p1), (p2))