bahamut: fix compile with eglibc
authorFelix Fietkau <nbd@openwrt.org>
Tue, 5 May 2009 13:27:05 +0000 (13:27 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 5 May 2009 13:27:05 +0000 (13:27 +0000)
SVN-Revision: 15626

net/bahamut/Makefile
net/bahamut/patches/002-glibc_fix.patch [new file with mode: 0644]

index 3f5cf85a9e7e476ee51af145fb2b8ada797d004c..4cfee71e7c288e84020dc95195eb7c0f39b52710 100644 (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 \
diff --git a/net/bahamut/patches/002-glibc_fix.patch b/net/bahamut/patches/002-glibc_fix.patch
new file mode 100644 (file)
index 0000000..5bdcc1d
--- /dev/null
@@ -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))