summaryrefslogtreecommitdiffstats
path: root/userspace/ebtables2
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2011-07-10 09:21:08 +0000
committerBart De Schuymer <bdschuym@pandora.be>2011-07-10 09:21:08 +0000
commitfff858a626c09c6a57da2ed9ecec8a259819f01b (patch)
tree66a0e9d26666920f3897b7ff133ab5d7763ed983 /userspace/ebtables2
parent158ef1150eba854dc746c33a0d6229d2f922d147 (diff)
remove compile warning, conditionally define LOCKFILE
Diffstat (limited to 'userspace/ebtables2')
-rw-r--r--userspace/ebtables2/libebtc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/userspace/ebtables2/libebtc.c b/userspace/ebtables2/libebtc.c
index f66ebef..17ba8f2 100644
--- a/userspace/ebtables2/libebtc.c
+++ b/userspace/ebtables2/libebtc.c
@@ -32,6 +32,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <errno.h>
static void decrease_chain_jumps(struct ebt_u_replace *replace);
@@ -131,8 +133,10 @@ void ebt_list_extensions()
}
}
+#ifndef LOCKFILE
#define LOCKDIR "/var/lib/ebtables"
#define LOCKFILE LOCKDIR"/lock"
+#endif
static int lockfd = -1, locked;
int use_lockfd;
/* Returns 0 on success, -1 when the file is locked by another process