summaryrefslogtreecommitdiffstats
path: root/contrib/bind/port
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/port')
-rw-r--r--contrib/bind/port/freebsd/include/port_after.h4
-rw-r--r--contrib/bind/port/freebsd/include/port_before.h1
-rw-r--r--contrib/bind/port/freebsd/include/prand_conf.h10
-rw-r--r--contrib/bind/port/prand_conf/prand_conf.c13
4 files changed, 16 insertions, 12 deletions
diff --git a/contrib/bind/port/freebsd/include/port_after.h b/contrib/bind/port/freebsd/include/port_after.h
index a05bd0f..a06bf69 100644
--- a/contrib/bind/port/freebsd/include/port_after.h
+++ b/contrib/bind/port/freebsd/include/port_after.h
@@ -29,6 +29,7 @@
#if (!defined(BSD)) || (BSD < 199306)
#include <sys/bitypes.h>
#endif
+#include <sys/time.h>
/*
* We need to know the IPv6 address family number even on IPv4-only systems.
@@ -75,4 +76,7 @@ struct sockaddr_in6 {
#define ISC_FACILITY LOG_DAEMON
#endif
+int isc__gettimeofday(struct timeval *tp, struct timezone *tzp);
+#define gettimeofday isc__gettimeofday
+
#endif /* ! PORT_AFTER_H */
diff --git a/contrib/bind/port/freebsd/include/port_before.h b/contrib/bind/port/freebsd/include/port_before.h
index 2791652..d90ba14 100644
--- a/contrib/bind/port/freebsd/include/port_before.h
+++ b/contrib/bind/port/freebsd/include/port_before.h
@@ -100,4 +100,3 @@
#define SERV_R_BAD NULL
#define IRS_LCL_SV_DB
-
diff --git a/contrib/bind/port/freebsd/include/prand_conf.h b/contrib/bind/port/freebsd/include/prand_conf.h
index 7244282..cf33196 100644
--- a/contrib/bind/port/freebsd/include/prand_conf.h
+++ b/contrib/bind/port/freebsd/include/prand_conf.h
@@ -3,10 +3,10 @@
#ifndef HAVE_DEV_RANDOM
- # define HAVE_DEV_RANDOM 1
- #endif /* HAVE_DEV_RANDOM */
+# define HAVE_DEV_RANDOM 1
+#endif /* HAVE_DEV_RANDOM */
-const char *cmds[] = {
+static const char *cmds[] = {
"/bin/ps -axlw 2>&1",
"/usr/sbin/arp -an 2>&1",
"/usr/bin/netstat -an 2>&1",
@@ -20,7 +20,7 @@ const char *cmds[] = {
NULL
};
-const char *dirs[] = {
+static const char *dirs[] = {
"/tmp",
"/usr/tmp",
".",
@@ -33,7 +33,7 @@ const char *dirs[] = {
NULL
};
-const char *files[] = {
+static const char *files[] = {
"/var/log/messages",
"/var/log/wtmp",
"/var/log/lastlog",
diff --git a/contrib/bind/port/prand_conf/prand_conf.c b/contrib/bind/port/prand_conf/prand_conf.c
index 5f9bf29..1154e7b 100644
--- a/contrib/bind/port/prand_conf/prand_conf.c
+++ b/contrib/bind/port/prand_conf/prand_conf.c
@@ -1,4 +1,4 @@
-/* $Id: prand_conf.c,v 1.5 1999/07/31 16:44:13 cyarnell Exp $
+/* $Id: prand_conf.c,v 1.7 2001/03/07 06:46:33 marka Exp $
*
* Portions Copyright (c) 1995-1998 by TIS Labs at Network Assoociates Inc.
* Portions Copyright (c) 1998-1998 by TIS Labs @ Network Associates Inc.
@@ -130,7 +130,8 @@ main()
char *files[] = {"/proc/stat", "/proc/rtc", "/proc/meminfo",
"/proc/interrupts", "/proc/self/status",
- "/proc/self/maps",
+ "/proc/self/maps", "/proc/curproc/status",
+ "/proc/curproc/map",
"/var/log/messages", "/var/log/wtmp",
"/var/log/lastlog", "/var/adm/messages",
"/var/adm/wtmp", "/var/adm/lastlog", NULL};
@@ -146,7 +147,7 @@ main()
fprintf(fd, "#ifndef _PRAND_CMD_H_\n#define _PRAND_CMD_H_\n\n");
- fprintf(fd, "const char *cmds[] = {\n");
+ fprintf(fd, "static const char *cmds[] = {\n");
if ((ps = my_find("ps", ps_path)) >= 0)
res = ex(fd, ps_path[ps], "ps","-axlw", 460) ||
@@ -185,7 +186,7 @@ main()
res = ex(fd, w_path[cmd], "w", "", 100);
fprintf(fd,"\tNULL\n};\n\n");
- fprintf(fd, "const char *dirs[] = {\n");
+ fprintf(fd, "static const char *dirs[] = {\n");
for (i=0; dirs[i]; i++) {
if (lstat(dirs[i], &st) == 0)
@@ -195,12 +196,12 @@ main()
fprintf(fd,"\tNULL\n};\n\n");
- fprintf(fd, "const char *files[] = {\n");
+ fprintf(fd, "static const char *files[] = {\n");
tim = time(NULL);
for (i=0; files[i]; i++) {
if (lstat(files[i],&st) == 0)
if (S_ISREG(st.st_mode) &&
- (tim -st.st_mtime) < 84600)
+ (tim - st.st_mtime) < 84600)
fprintf(fd,"\t\"%s\",\n", files[i]);
}
fprintf (fd, "\tNULL\n};\n");
OpenPOWER on IntegriCloud