diff --git a/lib/Makefile b/lib/Makefile index 28be17ec..7731975c 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -21,7 +21,7 @@ LIBPROP_CFLAGS += -fvisibility=hidden # libfetch LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o LIBFETCH_OBJS += fetch/ftp.o fetch/http.o -LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DNETBSD -DINET6 -DWITH_SSL +LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DINET6 -DWITH_SSL LIBFETCH_CFLAGS = -Wno-error -Wno-unused-macros -Wno-conversion ifdef HAVE_VISIBILITY LIBFETCH_CFLAGS+= -fvisibility=hidden diff --git a/lib/fetch/common.c b/lib/fetch/common.c index edd8e89e..ea50bd62 100644 --- a/lib/fetch/common.c +++ b/lib/fetch/common.c @@ -32,10 +32,6 @@ #include "compat.h" -#ifndef NETBSD -#include -#endif - #include #include #include @@ -49,11 +45,7 @@ #if defined(HAVE_INTTYPES_H) || defined(NETBSD) #include #endif -#ifndef NETBSD -#include -#else #include -#endif #include #include #include diff --git a/lib/fetch/fetch.c b/lib/fetch/fetch.c index 37061547..a8190b62 100644 --- a/lib/fetch/fetch.c +++ b/lib/fetch/fetch.c @@ -32,10 +32,6 @@ #include "compat.h" -#ifndef NETBSD -#include -#endif - #include #include #include diff --git a/lib/fetch/file.c b/lib/fetch/file.c index 9def4ee3..2089b86a 100644 --- a/lib/fetch/file.c +++ b/lib/fetch/file.c @@ -32,10 +32,6 @@ #include "compat.h" -#ifndef NETBSD -#include -#endif - #include #include diff --git a/lib/fetch/ftp.c b/lib/fetch/ftp.c index 712b7b5e..51fe92a7 100644 --- a/lib/fetch/ftp.c +++ b/lib/fetch/ftp.c @@ -71,17 +71,10 @@ #include #include #include -#if defined(HAVE_INTTYPES_H) || defined(NETBSD) #include -#endif #include -#ifndef NETBSD -#include -#include -#else #include #include -#endif #include #include #include @@ -154,7 +147,7 @@ unmappedaddr(struct sockaddr_in6 *sin6, socklen_t *len) sin4->sin_port = port; sin4->sin_family = AF_INET; *len = sizeof(struct sockaddr_in); -#ifdef HAVE_SA_LEN +#ifndef __linux__ sin4->sin_len = sizeof(struct sockaddr_in); #endif } diff --git a/lib/fetch/http.c b/lib/fetch/http.c index 4be31c46..98f69105 100644 --- a/lib/fetch/http.c +++ b/lib/fetch/http.c @@ -79,11 +79,7 @@ #include #include #include -#ifndef NETBSD -#include -#else #include -#endif #include #include #include @@ -92,11 +88,7 @@ #include #include -#ifndef NETBSD -#include -#else #include -#endif #include