Make it compile on OpenBSD without warnings (clang 6)

On OpenBSD use CXX=c++ gmake to build
This commit is contained in:
Otto Moerbeek 2019-01-22 09:32:36 +01:00
parent a02fe6e03e
commit 1c516120df
3 changed files with 8 additions and 6 deletions

View File

@ -17,17 +17,17 @@ check: testrunner tauth tdig
SIMPLESOCKET = ext/simplesocket/comboaddress.o ext/simplesocket/sclasses.o ext/simplesocket/swrappers.o ext/simplesocket/ext/fmt-5.2.1/src/format.o
tauth: tauth.o record-types.o dns-storage.o dnsmessages.o contents.o tdnssec.o $(SIMPLESOCKET)
g++ -std=gnu++14 $^ -o $@ -pthread
$(CXX) -std=gnu++14 $^ -o $@ -pthread
tdig: tdig.o record-types.o dns-storage.o dnsmessages.o $(SIMPLESOCKET)
g++ -std=gnu++14 $^ -o $@ -pthread
$(CXX) -std=gnu++14 $^ -o $@ -pthread
tres: tres.o record-types.o dns-storage.o dnsmessages.o $(SIMPLESOCKET)
g++ -std=gnu++14 $^ -o $@ -pthread
$(CXX) -std=gnu++14 $^ -o $@ -pthread
tdns-c-test: tdns-c-test.o tdns-c.o record-types.o dns-storage.o dnsmessages.o $(SIMPLESOCKET)
g++ -std=gnu++14 $^ -o $@
$(CXX) -std=gnu++14 $^ -o $@
testrunner: tests.o record-types.o dns-storage.o dnsmessages.o
g++ -std=gnu++14 $^ -o $@
$(CXX) -std=gnu++14 $^ -o $@

View File

@ -9,8 +9,9 @@
//! Used by an RRGen to output record content to 'zone text' format
/*! this exploits the similarity in writing/reading DNS messages
and outputting master file format text */
struct DNSStringWriter
class DNSStringWriter
{
public:
void xfrName(const DNSName& name)
{
if(!d_string.empty()) d_string.append(1, ' ');

View File

@ -3,6 +3,7 @@
#include <unistd.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main(int argc, char **argv)