packages/net/djbdns/patches/100-crosscompile.patch
markus 272c366e05 added djbdns patch provided by Johnny Halfmoon
removed dnsmasq.patch as the options were included upstream already.


git-svn-id: svn://svn.openwrt.org/openwrt/packages@15612 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-05-05 09:27:07 +00:00

172 lines
5.2 KiB
Diff

diff -urN djbdns-1.05/Makefile djbdns-1.05.new/Makefile
--- djbdns-1.05/Makefile 2001-02-11 23:11:45.000000000 +0200
+++ djbdns-1.05.new/Makefile 2007-09-30 15:09:51.000000000 +0300
@@ -29,10 +29,6 @@
compile auto-str.c buffer.h exit.h
./compile auto-str.c
-auto_home.c: \
-auto-str conf-home
- ./auto-str auto_home `head -1 conf-home` > auto_home.c
-
auto_home.o: \
compile auto_home.c
./compile auto_home.c
@@ -221,10 +217,6 @@
uint64.h taia.h dd.h
./compile dd.c
-direntry.h: \
-choose compile trydrent.c direntry.h1 direntry.h2
- ./choose c trydrent direntry.h1 direntry.h2 > direntry.h
-
dns.a: \
makelib dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o dns_ipq.o dns_mx.o \
dns_name.o dns_nd.o dns_packet.o dns_random.o dns_rcip.o dns_rcrw.o \
@@ -508,12 +500,6 @@
*) cat hasdevtcp.h1 ;; \
esac ) > hasdevtcp.h
-hasshsgr.h: \
-choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \
-warn-shsgr
- ./chkshsgr || ( cat warn-shsgr; exit 1 )
- ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
-
hier.o: \
compile hier.c auto_home.h
./compile hier.c
@@ -534,10 +520,6 @@
compile instcheck.c strerr.h error.h exit.h
./compile instcheck.c
-iopause.h: \
-choose compile load trypoll.c iopause.h1 iopause.h2
- ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h
-
iopause.o: \
compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h
./compile iopause.c
@@ -766,10 +748,6 @@
compile seek_set.c seek.h
./compile seek_set.c
-select.h: \
-choose compile trysysel.c select.h1 select.h2
- ./choose c trysysel select.h1 select.h2 > select.h
-
server.o: \
compile server.c byte.h case.h env.h buffer.h strerr.h ip4.h uint16.h \
ndelay.h socket.h uint16.h droproot.h qlog.h uint16.h response.h \
@@ -1060,10 +1038,6 @@
compile uint32_unpack.c uint32.h
./compile uint32_unpack.c
-uint64.h: \
-choose compile load tryulong64.c uint64.h1 uint64.h2
- ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
-
unix.a: \
makelib buffer_read.o buffer_write.o error.o error_str.o ndelay_off.o \
ndelay_on.o open_read.o open_trunc.o openreadclose.o readclose.o \
diff -urN djbdns-1.05/auto_home.c djbdns-1.05.new/auto_home.c
--- djbdns-1.05/auto_home.c 1970-01-01 03:00:00.000000000 +0300
+++ djbdns-1.05.new/auto_home.c 2007-09-30 13:32:06.000000000 +0300
@@ -0,0 +1,3 @@
+const char auto_home[] = "\
+\057\165\163\162\
+";
diff -urN djbdns-1.05/conf-cc djbdns-1.05.new/conf-cc
--- djbdns-1.05/conf-cc 2007-09-30 14:11:35.000000000 +0300
+++ djbdns-1.05.new/conf-cc 2007-09-30 15:10:46.000000000 +0300
@@ -1,3 +1,3 @@
-gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
+$TARGET_CC $TARGET_CFLAGS -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h
This will be used to compile .c files.
diff -urN djbdns-1.05/conf-home djbdns-1.05.new/conf-home
--- djbdns-1.05/conf-home 2001-02-11 23:11:45.000000000 +0200
+++ djbdns-1.05.new/conf-home 2007-09-30 14:10:46.000000000 +0300
@@ -1,4 +1,4 @@
-/usr/local
+/usr
This is the dnscache home directory. Programs will be installed in
.../bin.
diff -urN djbdns-1.05/conf-ld djbdns-1.05.new/conf-ld
--- djbdns-1.05/conf-ld 2001-02-11 23:11:45.000000000 +0200
+++ djbdns-1.05.new/conf-ld 2007-09-30 15:11:00.000000000 +0300
@@ -1,3 +1,3 @@
-gcc -s
+$TARGET_CC -s $TARGET_LDFLAGS
This will be used to link .o files into an executable.
diff -urN djbdns-1.05/direntry.h djbdns-1.05.new/direntry.h
--- djbdns-1.05/direntry.h 1970-01-01 03:00:00.000000000 +0300
+++ djbdns-1.05.new/direntry.h 2007-09-30 13:14:14.000000000 +0300
@@ -0,0 +1,10 @@
+#ifndef DIRENTRY_H
+#define DIRENTRY_H
+
+/* sysdep: +dirent */
+
+#include <sys/types.h>
+#include <dirent.h>
+#define direntry struct dirent
+
+#endif
diff -urN djbdns-1.05/hasshsgr.h djbdns-1.05.new/hasshsgr.h
--- djbdns-1.05/hasshsgr.h 1970-01-01 03:00:00.000000000 +0300
+++ djbdns-1.05.new/hasshsgr.h 2007-09-30 13:14:14.000000000 +0300
@@ -0,0 +1 @@
+/* sysdep: -shortsetgroups */
diff -urN djbdns-1.05/iopause.h djbdns-1.05.new/iopause.h
--- djbdns-1.05/iopause.h 1970-01-01 03:00:00.000000000 +0300
+++ djbdns-1.05.new/iopause.h 2007-09-30 13:14:14.000000000 +0300
@@ -0,0 +1,18 @@
+#ifndef IOPAUSE_H
+#define IOPAUSE_H
+
+/* sysdep: +poll */
+#define IOPAUSE_POLL
+
+#include <sys/types.h>
+#include <poll.h>
+
+typedef struct pollfd iopause_fd;
+#define IOPAUSE_READ POLLIN
+#define IOPAUSE_WRITE POLLOUT
+
+#include "taia.h"
+
+extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);
+
+#endif
diff -urN djbdns-1.05/select.h djbdns-1.05.new/select.h
--- djbdns-1.05/select.h 1970-01-01 03:00:00.000000000 +0300
+++ djbdns-1.05.new/select.h 2007-09-30 13:14:14.000000000 +0300
@@ -0,0 +1,11 @@
+#ifndef SELECT_H
+#define SELECT_H
+
+/* sysdep: +sysselect */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/select.h>
+extern int select();
+
+#endif
diff -urN djbdns-1.05/uint64.h djbdns-1.05.new/uint64.h
--- djbdns-1.05/uint64.h 1970-01-01 03:00:00.000000000 +0300
+++ djbdns-1.05.new/uint64.h 2007-09-30 13:23:48.000000000 +0300
@@ -0,0 +1,8 @@
+#ifndef UINT64_H
+#define UINT64_H
+
+/* sysdep: -ulong64 */
+
+typedef unsigned long long uint64;
+
+#endif