Marcus Meissner
01c68ad280
- remove debug statement in the spec file, leftover from previous change. - Build with large file support in 32 bit archs, autoconf stuff is fine, but C files included config.h after C library headers, therefore no prototypes for *64 functions found. OBS-URL: https://build.opensuse.org/request/show/178594 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/adns?expand=0&rev=19
167 lines
3.9 KiB
Diff
167 lines
3.9 KiB
Diff
--- src/setup.c.orig
|
|
+++ src/setup.c
|
|
@@ -25,6 +25,7 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <limits.h>
|
|
@@ -37,8 +38,6 @@
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
|
|
-#include "internal.h"
|
|
-
|
|
static void readconfig(adns_state ads, const char *filename, int warnmissing);
|
|
|
|
static void addserver(adns_state ads, struct in_addr addr) {
|
|
@@ -464,7 +463,7 @@ static const char *instrum_getenv(adns_s
|
|
static void readconfig(adns_state ads, const char *filename, int warnmissing) {
|
|
getline_ctx gl_ctx;
|
|
|
|
- gl_ctx.file= fopen(filename,"r");
|
|
+ gl_ctx.file= fopen(filename,"re");
|
|
if (!gl_ctx.file) {
|
|
if (errno == ENOENT) {
|
|
if (warnmissing)
|
|
@@ -572,7 +571,7 @@ static int init_finish(adns_state ads) {
|
|
}
|
|
|
|
proto= getprotobyname("udp"); if (!proto) { r= ENOPROTOOPT; goto x_free; }
|
|
- ads->udpsocket= socket(AF_INET,SOCK_DGRAM,proto->p_proto);
|
|
+ ads->udpsocket= socket(AF_INET,SOCK_DGRAM|SOCK_CLOEXEC,proto->p_proto);
|
|
if (ads->udpsocket<0) { r= errno; goto x_free; }
|
|
|
|
r= adns__setnonblock(ads,ads->udpsocket);
|
|
--- src/event.c.orig
|
|
+++ src/event.c
|
|
@@ -26,6 +26,7 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
@@ -37,7 +38,6 @@
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
|
|
-#include "internal.h"
|
|
#include "tvarith.h"
|
|
|
|
/* TCP connection management. */
|
|
@@ -123,7 +123,7 @@ void adns__tcp_tryconnect(adns_state ads
|
|
adns__diag(ads,-1,0,"unable to find protocol no. for TCP !");
|
|
return;
|
|
}
|
|
- fd= socket(AF_INET,SOCK_STREAM,proto->p_proto);
|
|
+ fd= socket(AF_INET,SOCK_STREAM|SOCK_CLOEXEC,proto->p_proto);
|
|
if (fd<0) {
|
|
adns__diag(ads,-1,0,"cannot create TCP socket: %s",strerror(errno));
|
|
return;
|
|
--- src/check.c.orig
|
|
+++ src/check.c
|
|
@@ -24,9 +24,8 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
-#include <stdlib.h>
|
|
-
|
|
#include "internal.h"
|
|
+#include <stdlib.h>
|
|
|
|
void adns_checkconsistency(adns_state ads, adns_query qu) {
|
|
adns__consistency(ads,qu,cc_user);
|
|
--- src/general.c.orig
|
|
+++ src/general.c
|
|
@@ -25,6 +25,7 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
@@ -33,7 +34,6 @@
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
|
|
-#include "internal.h"
|
|
|
|
/* Core diagnostic functions */
|
|
|
|
--- src/poll.c.orig
|
|
+++ src/poll.c
|
|
@@ -24,10 +24,10 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <limits.h>
|
|
#include <string.h>
|
|
|
|
-#include "internal.h"
|
|
|
|
#ifdef HAVE_POLL
|
|
|
|
--- src/query.c.orig
|
|
+++ src/query.c
|
|
@@ -34,7 +34,6 @@
|
|
|
|
#include <sys/time.h>
|
|
|
|
-#include "internal.h"
|
|
|
|
#if DMALLOC
|
|
# include <dmalloc.h>
|
|
--- src/reply.c.orig
|
|
+++ src/reply.c
|
|
@@ -24,9 +24,9 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <stdlib.h>
|
|
|
|
-#include "internal.h"
|
|
|
|
void adns__procdgram(adns_state ads, const byte *dgram, int dglen,
|
|
int serv, int viatcp, struct timeval now) {
|
|
--- src/transmit.c.orig
|
|
+++ src/transmit.c
|
|
@@ -25,12 +25,12 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <errno.h>
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/uio.h>
|
|
|
|
-#include "internal.h"
|
|
#include "tvarith.h"
|
|
|
|
#define MKQUERY_START(vb) (rqp= (vb)->buf+(vb)->used)
|
|
--- src/types.c.orig
|
|
+++ src/types.c
|
|
@@ -24,6 +24,7 @@
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
+#include "internal.h"
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
|
@@ -31,7 +32,6 @@
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
|
|
-#include "internal.h"
|
|
|
|
#define R_NOMEM return adns_s_nomemory
|
|
#define CSP_ADDSTR(s) do { \
|