From 4197eaf7b57056454cec3112683d84a3d0d7b194 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 15 Jan 2008 12:44:21 +0000 Subject: Max Kellermann : the global variable "alarm" conflicts with the alarm() function from unistd.h. resolve that conflict by giving those two global variables a better name. --- ChangeLog | 8 +++++++- include/sync.h | 4 ++-- src/sync-alarm.c | 2 +- src/sync-ftfw.c | 2 +- src/sync-mode.c | 6 +++--- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c090831..27f48b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ version 0.9.6 (yet unreleased) ------------------------------ +Pablo Neira Ayuso : + o fix compilation problem due to missing headers (Krisztian Kovacs) o include kernel options and Fedora comments in the INSTALL file o remove -lpthread during compilation @@ -38,7 +40,11 @@ o rename class `buffer' to `queue' which is what it really implements o fix logfiles permissions, do not default to umask o wake up the daemon iff there are real events to handle instead of polling o add support for tagged vlan interfaces in the config file, e.g. eth0.1 -o improve alarm framework based on suggestions from Max Duempel +o improve alarm framework based on suggestions from Max Kellerman + +Max Kellermann : += conntrackd = +o resolve global variable "alarm" conflict with alarm() function in unistd.h. version 0.9.5 (2007/07/29) ------------------------------ diff --git a/include/sync.h b/include/sync.h index e6ce327..39e0f46 100644 --- a/include/sync.h +++ b/include/sync.h @@ -18,7 +18,7 @@ struct sync_mode { void (*run)(void); }; -extern struct sync_mode alarm; -extern struct sync_mode ftfw; +extern struct sync_mode sync_alarm; +extern struct sync_mode sync_ftfw; #endif diff --git a/src/sync-alarm.c b/src/sync-alarm.c index 3d20867..1dcfacd 100644 --- a/src/sync-alarm.c +++ b/src/sync-alarm.c @@ -106,7 +106,7 @@ static int alarm_recv(const struct nethdr *net) return 0; } -struct sync_mode alarm = { +struct sync_mode sync_alarm = { .internal_cache_flags = LIFETIME, .external_cache_flags = TIMER | LIFETIME, .internal_cache_extra = &cache_alarm_extra, diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c index 125e82e..23095c4 100644 --- a/src/sync-ftfw.c +++ b/src/sync-ftfw.c @@ -355,7 +355,7 @@ static void ftfw_run() mod_alarm(&alive_alarm, 1, 0); } -struct sync_mode ftfw = { +struct sync_mode sync_ftfw = { .internal_cache_flags = LIFETIME, .external_cache_flags = LIFETIME, .internal_cache_extra = &cache_ftfw_extra, diff --git a/src/sync-mode.c b/src/sync-mode.c index 16642c2..d38d91f 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -126,14 +126,14 @@ static int init_sync(void) memset(state.sync, 0, sizeof(struct ct_sync_state)); if (CONFIG(flags) & CTD_SYNC_FTFW) - STATE_SYNC(sync) = &ftfw; + STATE_SYNC(sync) = &sync_ftfw; else if (CONFIG(flags) & CTD_SYNC_ALARM) - STATE_SYNC(sync) = &alarm; + STATE_SYNC(sync) = &sync_alarm; else { fprintf(stderr, "WARNING: No synchronization mode specified. " "Defaulting to FT-FW mode.\n"); CONFIG(flags) |= CTD_SYNC_FTFW; - STATE_SYNC(sync) = &ftfw; + STATE_SYNC(sync) = &sync_ftfw; } if (STATE_SYNC(sync)->init) -- cgit v1.2.3