summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorWouter Wijngaards <wouter@NLnetLabs.nl>2006-07-05 11:48:02 +0200
committerWouter Wijngaards <wouter@NLnetLabs.nl>2006-07-05 11:48:02 +0200
commit8c98d3a7b00f8dd51441d4976fdf9f4c6154e59c (patch)
tree7bacb021dec4b3465d55cc7f0cda17fd9c941183 /examples
parentddcfe29aae5f3a118b6b53bd4e04fbd6bbb6bf53 (diff)
downloadldns-8c98d3a7b00f8dd51441d4976fdf9f4c6154e59c.tar.gz
got examples to compile on Solaris. No stdint include file. store symbol is globally defined by a library. Need to link with network libs for daemon example.
Diffstat (limited to 'examples')
-rw-r--r--examples/configure.ac4
-rw-r--r--examples/ldns-keyfetcher.c6
-rw-r--r--examples/ldns-mx.c1
-rw-r--r--examples/ldns-read-zone.c1
-rw-r--r--examples/ldns-signzone.c1
5 files changed, 7 insertions, 6 deletions
diff --git a/examples/configure.ac b/examples/configure.ac
index d85532af..27515038 100644
--- a/examples/configure.ac
+++ b/examples/configure.ac
@@ -36,6 +36,10 @@ AC_CHECK_HEADERS([sys/param.h sys/mount.h],,,
]
])
+# check to see if libraries are needed for these functions.
+AC_CHECK_LIB(socket, socket)
+AC_CHECK_LIB(nsl, inet_pton)
+
# check for ldns
AC_ARG_WITH(ldns,
AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
diff --git a/examples/ldns-keyfetcher.c b/examples/ldns-keyfetcher.c
index b72acb80..d1cbb282 100644
--- a/examples/ldns-keyfetcher.c
+++ b/examples/ldns-keyfetcher.c
@@ -14,7 +14,7 @@
int verbosity = 0;
/* 0=use both ip4 and ip6 (default). 1=ip4only. 2=ip6only. */
uint8_t address_family = 0;
-bool store = false;
+bool store_in_file = false;
void
usage(FILE *fp, char *prog) {
@@ -599,7 +599,7 @@ main(int argc, char *argv[])
i++;
}
} else if (strncmp("-s", argv[i], 3) == 0) {
- store = true;
+ store_in_file = true;
} else if (strncmp("-v", argv[i], 2) == 0) {
if (strlen(argv[i]) > 2) {
verbosity = atoi(argv[i]+2);
@@ -660,7 +660,7 @@ main(int argc, char *argv[])
fprintf(stdout, "; Got the following keys:\n");
}
if (l) {
- if (store) {
+ if (store_in_file) {
/* create filename:
* K<domain>.+<alg>.+<id>.key
*/
diff --git a/examples/ldns-mx.c b/examples/ldns-mx.c
index 6f63a2fb..9aa3c3d3 100644
--- a/examples/ldns-mx.c
+++ b/examples/ldns-mx.c
@@ -5,7 +5,6 @@
* See the file LICENSE for the license
*/
-#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/examples/ldns-read-zone.c b/examples/ldns-read-zone.c
index 00f009e0..8620ef74 100644
--- a/examples/ldns-read-zone.c
+++ b/examples/ldns-read-zone.c
@@ -4,7 +4,6 @@
* See the file LICENSE for the license
*/
-#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/examples/ldns-signzone.c b/examples/ldns-signzone.c
index 9b4b1e40..f5f2a20c 100644
--- a/examples/ldns-signzone.c
+++ b/examples/ldns-signzone.c
@@ -5,7 +5,6 @@
* See the file LICENSE for the license
*/
-#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>