summaryrefslogtreecommitdiffstats
path: root/libasyncns
diff options
context:
space:
mode:
Diffstat (limited to 'libasyncns')
-rw-r--r--libasyncns/Makefile8
-rw-r--r--libasyncns/Makefile.am28
-rw-r--r--libasyncns/asyncns-test.c1
-rw-r--r--libasyncns/asyncns.c1
-rw-r--r--libasyncns/asyncns.h1
5 files changed, 29 insertions, 10 deletions
diff --git a/libasyncns/Makefile b/libasyncns/Makefile
deleted file mode 100644
index 93af173..0000000
--- a/libasyncns/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-CFLAGS=-Wall -W -O0 -g -pipe
-
-
-asyncns-test: asyncns.o asyncns-test.o
- $(CC) -o $@ $^ $(LIBS) $(CFLAGS)
-
-clean:
- rm -rf *.o asyncns-test
diff --git a/libasyncns/Makefile.am b/libasyncns/Makefile.am
new file mode 100644
index 0000000..8568caf
--- /dev/null
+++ b/libasyncns/Makefile.am
@@ -0,0 +1,28 @@
+# $Id$
+#
+# This file is part of libasyncns.
+#
+# libasyncns is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# libasyncns is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with libasyncns; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-D_GNU_SOURCE
+
+lib_LTLIBRARIES=libasyncns.la
+libasyncns_la_SOURCES=asyncns.c asyncns.h
+
+noinst_PROGRAMS=asyncns-test
+asyncns_test_SOURCES=asyncns-test.c
+asyncns_test_LDADD=libasyncns.la
+
diff --git a/libasyncns/asyncns-test.c b/libasyncns/asyncns-test.c
index 6de3337..58f337f 100644
--- a/libasyncns/asyncns-test.c
+++ b/libasyncns/asyncns-test.c
@@ -23,7 +23,6 @@ int main(int argc, char *argv[]) {
goto fail;
}
-
memset(&sa, 0, sizeof(sa));
sa.sin_family = AF_INET;
sa.sin_addr.s_addr = inet_addr("192.168.50.1");
diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c
index fa62003..7bc65d8 100644
--- a/libasyncns/asyncns.c
+++ b/libasyncns/asyncns.c
@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
#define HAVE_PR_SET_PDEATHSIG
#define HAVE_SETRESUID
diff --git a/libasyncns/asyncns.h b/libasyncns/asyncns.h
index 05873a6..861f15c 100644
--- a/libasyncns/asyncns.h
+++ b/libasyncns/asyncns.h
@@ -1,6 +1,7 @@
#ifndef fooasyncnshfoo
#define fooasyncnshfoo
+#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>