Skip to content

Commit fe9612f

Browse files
committed
network: Fix redefinition of __USE_MISC
When building the library with _GNU_SOURCE=1, it caused __USE_MISC to be redefined. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 76e2668 commit fe9612f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

network.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@
2727
* Old OSes (CentOS 7, Ubuntu 16.04) require this for the
2828
* IN6_IS_ADDR_LINKLOCAL() macro to work.
2929
*/
30+
#ifndef _GNU_SOURCE
3031
#define __USE_MISC
3132
#include <netinet/in.h>
3233
#undef __USE_MISC
34+
#else
35+
#include <netinet/in.h>
36+
#endif
3337

3438
#include <arpa/inet.h>
3539
#include <netdb.h>

0 commit comments

Comments
 (0)