Skip to content

Commit

Permalink
network: Fix IN6_IS_ADDR_LINKLOCAL() macro on old OSes
Browse files Browse the repository at this point in the history
Old OSes (CentOS 7, Ubuntu 16.04) require s6_addr32 to be defined for
the IN6_IS_ADDR_LINKLOCAL() macro to work.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed May 11, 2021
1 parent d0ca69e commit 945f08e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions network.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
#include <winsock2.h>
#include <ws2tcpip.h>
#else
/*
* Old OSes (CentOS 7, Ubuntu 16.04) require this for the
* IN6_IS_ADDR_LINKLOCAL() macro to work.
*/
#define __USE_MISC
#include <netinet/in.h>
#undef __USE_MISC

#include <arpa/inet.h>
#include <netdb.h>
#include <net/if.h>
Expand Down

0 comments on commit 945f08e

Please sign in to comment.