Skip to content

Commit

Permalink
core: workaround related to T_OPT for alpine linux musl C library (GH #…
Browse files Browse the repository at this point in the history
…2095)

(cherry picked from commit cec1043)
  • Loading branch information
henningw committed Oct 7, 2019
1 parent 0b6785d commit 31ee751
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/resolve.c
Expand Up @@ -32,8 +32,12 @@
#include <resolv.h>
#include <string.h>

/* older glibc < 2.25 does not include T_OPT in nameser_compat.h yet */
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 25
/*
* Older glibc < 2.25 does not include T_OPT in nameser_compat.h yet.
* On alpine linux musl library it is also not defined. There is no
* musl feature test macro, so we look for glibc instead.
*/
#if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25) || !defined __GLIBC__
#ifndef T_OPT
#define T_OPT ns_t_opt
#endif
Expand Down

0 comments on commit 31ee751

Please sign in to comment.