Skip to content

Commit

Permalink
dtls-client.c: set NI_MAXSERV if not defined
Browse files Browse the repository at this point in the history
NI_MAXSERV is defined automatically when _GNU_SOURCE is provided.
This change sets the value to 32 (the default on Linux) when undefined.

Change-Id: I37bb5509383cb53b6e35cefa635f4647a3e2c721
  • Loading branch information
obgm committed Jul 27, 2023
1 parent ba830a3 commit f04c89c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
#define UNUSED_PARAM
#endif /* __GNUC__ */

#ifndef NI_MAXSERV
/* Set a default value for NI_MAXSERV in case it does not get defined
* by netdb.h */
#define NI_MAXSERV 32
#endif

typedef struct {
size_t length; /* length of string */
unsigned char *s; /* string data */
Expand Down

0 comments on commit f04c89c

Please sign in to comment.