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
This commit is contained in:
93
net/djbdns/patches/120-compiler-temporary-filename.patch
Normal file
93
net/djbdns/patches/120-compiler-temporary-filename.patch
Normal file
@ -0,0 +1,93 @@
|
||||
--- djbdns-1.05.original/pickdns-data.c 2001-02-11 21:11:45.000000000 +0000
|
||||
+++ djbdns-1.05/pickdns-data.c 2003-10-19 10:47:17.000000000 +0100
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
void die_datatmp(void)
|
||||
{
|
||||
- strerr_die2sys(111,FATAL,"unable to create data.tmp: ");
|
||||
+ strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -142,7 +142,7 @@
|
||||
if (fd == -1) strerr_die2sys(111,FATAL,"unable to open data: ");
|
||||
buffer_init(&b,buffer_unixread,fd,bspace,sizeof bspace);
|
||||
|
||||
- fdcdb = open_trunc("data.tmp");
|
||||
+ fdcdb = open_trunc("data.cdb.tmp");
|
||||
if (fdcdb == -1) die_datatmp();
|
||||
if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp();
|
||||
|
||||
@@ -223,8 +223,8 @@
|
||||
if (cdb_make_finish(&cdb) == -1) die_datatmp();
|
||||
if (fsync(fdcdb) == -1) die_datatmp();
|
||||
if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */
|
||||
- if (rename("data.tmp","data.cdb") == -1)
|
||||
- strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: ");
|
||||
+ if (rename("data.cdb.tmp","data.cdb") == -1)
|
||||
+ strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: ");
|
||||
|
||||
_exit(0);
|
||||
}
|
||||
--- djbdns-1.05.original/rbldns-data.c 2001-02-11 21:11:45.000000000 +0000
|
||||
+++ djbdns-1.05/rbldns-data.c 2003-10-19 10:47:30.000000000 +0100
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
void die_datatmp(void)
|
||||
{
|
||||
- strerr_die2sys(111,FATAL,"unable to create data.tmp: ");
|
||||
+ strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -59,7 +59,7 @@
|
||||
if (fd == -1) strerr_die2sys(111,FATAL,"unable to open data: ");
|
||||
buffer_init(&b,buffer_unixread,fd,bspace,sizeof bspace);
|
||||
|
||||
- fdcdb = open_trunc("data.tmp");
|
||||
+ fdcdb = open_trunc("data.cdb.tmp");
|
||||
if (fdcdb == -1) die_datatmp();
|
||||
if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp();
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
if (cdb_make_finish(&cdb) == -1) die_datatmp();
|
||||
if (fsync(fdcdb) == -1) die_datatmp();
|
||||
if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */
|
||||
- if (rename("data.tmp","data.cdb") == -1)
|
||||
- strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: ");
|
||||
+ if (rename("data.cdb.tmp","data.cdb") == -1)
|
||||
+ strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: ");
|
||||
|
||||
_exit(0);
|
||||
}
|
||||
--- djbdns-1.05.original/tinydns-data.c 2001-02-11 21:11:45.000000000 +0000
|
||||
+++ djbdns-1.05/tinydns-data.c 2003-10-19 11:59:16.000000000 +0100
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
void die_datatmp(void)
|
||||
{
|
||||
- strerr_die2sys(111,FATAL,"unable to create data.tmp: ");
|
||||
+ strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
|
||||
}
|
||||
void nomem(void)
|
||||
{
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
buffer_init(&b,buffer_unixread,fddata,bspace,sizeof bspace);
|
||||
|
||||
- fdcdb = open_trunc("data.tmp");
|
||||
+ fdcdb = open_trunc("data.cdb.tmp");
|
||||
if (fdcdb == -1) die_datatmp();
|
||||
if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp();
|
||||
|
||||
@@ -449,8 +449,8 @@
|
||||
if (cdb_make_finish(&cdb) == -1) die_datatmp();
|
||||
if (fsync(fdcdb) == -1) die_datatmp();
|
||||
if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */
|
||||
- if (rename("data.tmp","data.cdb") == -1)
|
||||
- strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: ");
|
||||
+ if (rename("data.cdb.tmp","data.cdb") == -1)
|
||||
+ strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: ");
|
||||
|
||||
_exit(0);
|
||||
}
|
Reference in New Issue
Block a user