Alpine linux musl libc bugfixes
This commit is contained in:
parent
52d699647d
commit
dd43556d0b
7 changed files with 23 additions and 7 deletions
|
|
@ -58,9 +58,13 @@ For Archlinux, Try this.
|
|||
|
||||
sudo pacman -S zlib gmp lib32-gmp openssl lib32-openssl libgee pth libgcrypt autoconf cmake autogen gawk scons git
|
||||
|
||||
For AlpineLinux Try this.
|
||||
For AlpineLinux, Try this.
|
||||
|
||||
apk add scons libssl1.0 openssl libgee gmp gmp-dev libgcrypt gawk zlib zlib-dev gcc pkgconf pkgconfig libc-dev libressl-dev libexecinfo-dev linux-headers
|
||||
apk add scons libssl1.0 openssl libgee gmp gmp-dev libgcrypt gawk zlib zlib-dev gcc pkgconf pkgconfig libc-dev libressl-dev libexecinfo-dev linux-headers python
|
||||
|
||||
For Debian, Try this.
|
||||
|
||||
apt-get install build-essential scons libgcrypt20-dev libssl1.0-dev libgmp-dev zlib1g-dev
|
||||
|
||||
To compile the code you can do this:
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ opts.AddVariables(('CONF_DIR', """Directory where the Netsukuku configuration fi
|
|||
opts.Add('CC', 'The C compiler.')
|
||||
opts.Add('CXX', 'The C++ compiler.')
|
||||
|
||||
env = Environment(options = opts, ENV = os.environ, CCFLAGS = ' -Wall')
|
||||
env = Environment(options = opts, ENV = os.environ, CCFLAGS = ['-Wall', '-ggdb'])
|
||||
|
||||
env['platform'] = _platform.system().lower();
|
||||
env["CC"] = os.getenv("CC") or env["CC"]
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ if not os.path.exists("config.log") and not env.GetOption('clean'):
|
|||
Execute(Delete('config.log'))
|
||||
Exit(1)
|
||||
|
||||
if conf.CheckCHeader(["net/if.h", "netinet/in.h"]):
|
||||
env.Append(CCFLAGS = ['-DHAVE_NET_IF_H'])
|
||||
|
||||
env = conf.Finish()
|
||||
|
||||
def conf_build(target, source, env):
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <limits.h>
|
||||
|
||||
#if defined(__GLIBC__) && __GLIBC__ == 2
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/udp.h>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ inet_mode (char *domain)
|
|||
|
||||
char *ret;
|
||||
char *ret1;
|
||||
char new_domain[MAXNAMLEN];
|
||||
char new_domain[NAME_MAX];
|
||||
int rt_value;
|
||||
|
||||
strcpy (new_domain, domain);
|
||||
|
|
@ -141,7 +141,7 @@ ntk_mode (char *domain)
|
|||
|
||||
char *ret;
|
||||
char *ret1;
|
||||
char new_domain[MAXNAMLEN];
|
||||
char new_domain[NAME_MAX];
|
||||
int rt_value;
|
||||
|
||||
strcpy (new_domain, domain);
|
||||
|
|
@ -197,7 +197,7 @@ ntk_mode (char *domain)
|
|||
domain_ip_processing (char *domain)
|
||||
{
|
||||
char *ret;
|
||||
char new_domain[MAXNAMLEN];
|
||||
char new_domain[NAME_MAX];
|
||||
int rt_value;
|
||||
int i;
|
||||
ret = strstr (domain, ".inet");
|
||||
|
|
|
|||
|
|
@ -340,7 +340,11 @@ opts_set_question(char *arg)
|
|||
ntkresolv_safe_exit(1);
|
||||
}
|
||||
G_ALIGN(16);
|
||||
#ifdef HAVE_NET_IF_H
|
||||
memcpy(GQT->qstdata, &i6a.__in6_union, 16);
|
||||
#else
|
||||
memcpy(GQT->qstdata, &i6a.__in6_u, 16);
|
||||
#endif
|
||||
GQT->ipv = ANDNS_IPV6;
|
||||
return;
|
||||
case QTYPE_G:
|
||||
|
|
@ -424,7 +428,11 @@ ip_bin_to_str(void *data, char *dst)
|
|||
via = (void *) (&ia);
|
||||
break;
|
||||
case AF_INET6:
|
||||
#ifdef HAVE_NET_IF_H
|
||||
memcpy(&(i6a.__in6_union), data, 16);
|
||||
#else
|
||||
memcpy(&(i6a.__in6_u), data, 16);
|
||||
#endif
|
||||
via = (void *) (&i6a);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
* xzalloc(size_t size) added.
|
||||
\*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue