bahamut: fix compile with eglibc

git-svn-id: svn://svn.openwrt.org/openwrt/packages@15626 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-05-05 13:27:05 +00:00
parent 7828a79b6e
commit 2029a2f0a4
2 changed files with 40 additions and 0 deletions

View File

@ -25,6 +25,9 @@ define Package/bahamut
URL:=http://bahamut.dal.net
endef
TARGET_CFLAGS += \
-DSYS_ERRLIST_DECLARED
define Build/Configure
$(call Build/Configure/Default,\
--with-maxconnections=64 \

View File

@ -0,0 +1,37 @@
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -62,7 +62,7 @@
#if ((__GNU_LIBRARY__ == 6) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 3))
# define MAXRESOLVSORT 10 /* number of net to sort on */
-struct __res_state {
+struct state {
int retrans; /* retransmition time interval */
int retry; /* number of times to retransmit */
u_long options; /* option flags - see below. */
@@ -81,12 +81,9 @@
struct in_addr addr;
u_int32_t mask;
} sort_list[MAXRESOLVSORT];
+ unsigned short order[MAXSERVICES + 1]; /* search service order */
};
-typedef struct __res_state *res_state;
-
-extern struct __res_state *__res_state(void) __attribute__ ((__const__));
-#define _res (*__res_state())
#else
@@ -103,9 +100,10 @@
unsigned short order[MAXSERVICES + 1]; /* search service order */
};
-extern struct state _res;
#endif
+extern struct state _res;
+
extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
#if ((__GNU_LIBRARY__ == 6) && (__GLIBC__ >=2) && (__GLIBC_MINOR__ >= 2))