summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/aeswepd.c13
-rw-r--r--src/keyapi.c4
-rw-r--r--src/wireless.h1
4 files changed, 15 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e5c0928..d8e456e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ aeswepd_SOURCES = aeswepd.c aeswepd.h \
keyapi.c keyapi.h
aeswepd_LDADD = -lmcrypt $(LIBDAEMON_LIBS)
-aeswepd_CFLAGS = $(LIBDAEMON_CFLAGS)
+aeswepd_CFLAGS = $(LIBDAEMON_CFLAGS) $(AM_CFLAGS)
install-exec-hook:
cd $(DESTDIR)/$(sbindir) && ln -sf aeswepd aeswepls
diff --git a/src/aeswepd.c b/src/aeswepd.c
index 3c651e1..3cff079 100644
--- a/src/aeswepd.c
+++ b/src/aeswepd.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
@@ -54,7 +58,7 @@ int rekey_time = 24*60*60, /* prior to 0.4: 15*60*/
int key_map[MAX_WEP_KEYS];
char *interface_name = NULL;
-int daemonize = 1, use_syslog = 1, wait_on_fork = 0, use_status_file = 1, wait_on_kill = 0;
+int daemonize = 1, use_syslog = 1, wait_on_fork = 0, use_status_file = 1, wait_on_kill = 0;
char log_ident[32], pid_ident[32];
FILE *status_file = NULL;
@@ -364,7 +368,7 @@ void parse_args(int argc, char *argv[]) {
{0, 0, 0, 0}
};
int option_index = 0;
- int _help = 0, _kill = 0, _check = 0, _version = 0, r, _list_keys = 0, _key_set = 0;
+ int _help = 0, _kill = 0, _check = 0, _version = 0, _list_keys = 0, _key_set = 0, r;
char ln[64];
char *b;
@@ -414,6 +418,9 @@ void parse_args(int argc, char *argv[]) {
case 'w':
wait_on_fork = !wait_on_fork;
break;
+ case 'W':
+ wait_on_kill = !wait_on_kill;
+ break;
case 'h':
_help = 1;
break;
@@ -503,7 +510,7 @@ void parse_args(int argc, char *argv[]) {
if (_kill) {
int rv;
-
+
if (wait_on_kill)
rv = daemon_pid_file_kill_wait(SIGINT, 5);
else
diff --git a/src/keyapi.c b/src/keyapi.c
index a5b5351..4654b07 100644
--- a/src/keyapi.c
+++ b/src/keyapi.c
@@ -24,6 +24,10 @@
#include "iwkey.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
const struct key_api * key_api_get(const char *c) {
/* Match for any special driver here ... */
diff --git a/src/wireless.h b/src/wireless.h
index 73ff314..ce0f7c7 100644
--- a/src/wireless.h
+++ b/src/wireless.h
@@ -25,7 +25,6 @@
#include <sys/socket.h>
#include <linux/if.h>
#include <net/if_arp.h>
-
#include "wireless.16.h"
#endif