From ecf89e635de8778ebbf901279f7672e2c15e4ecb Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 1 Aug 2008 09:20:46 +0200 Subject: fixed dietlibc compatibility stuff removed lot of compatibility stuff which was needed for ancient dietlibc version. --- src/compat.h | 31 ++----------------------------- src/util.h | 2 +- src/wrappers.h | 1 + 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/compat.h b/src/compat.h index c180185..c6fb409 100644 --- a/src/compat.h +++ b/src/compat.h @@ -19,22 +19,8 @@ #ifndef H_ENSC_IPSENTINEL_SRC_COMPAT_H #define H_ENSC_IPSENTINEL_SRC_COMPAT_H -#if defined(__dietlibc__) && !defined(ENSC_DIETLIBC_C99) && defined(__STRICT_ANSI__) && defined(__STDC_VERSION__) - // fixed in 0.25+ -# include -# undef inline - -# undef __STRICT_ANSI__ -# include -# define __STRICT_ANSI__ -#endif - #ifdef __dietlibc__ - // fixed in 0.27+ -# define ethhdr ethhdrX -# include -# undef ethhdr - +struct ether_addr; # ifndef HAVE_DIET_ETHER_NTOA char * ether_ntoa(struct ether_addr const *addr); # endif @@ -44,22 +30,9 @@ struct ether_addr * ether_aton_r(const char *asc, struct ether_addr *addr); # endif #endif - -#ifndef __dietlibc__ -# include -#else -# include -#endif - -#ifdef __dietlibc__ -# define sin XsinX -#endif -#include -#undef sin - - #ifdef __dietlibc__ #include +#include #include struct ether_arp { diff --git a/src/util.h b/src/util.h index 20381e3..adfe3a6 100644 --- a/src/util.h +++ b/src/util.h @@ -25,7 +25,6 @@ #include #include - /*@-namechecks@*/ #ifndef __cplusplus # define cAsT_(X) (X)) @@ -77,6 +76,7 @@ xstrcat(char **dst, size_t *cnt, char const *src) xstrcatn(dst, cnt, src, strlen(src)); } +struct in_addr; void writeUInt(int fd, unsigned int nr); void writeMsgTimestamp(int fd); void writeIP(int fd, struct in_addr); diff --git a/src/wrappers.h b/src/wrappers.h index e1be0ad..5548702 100644 --- a/src/wrappers.h +++ b/src/wrappers.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.1