summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorlaforge <laforge>2002-12-09 15:03:51 +0000
committerlaforge <laforge>2002-12-09 15:03:51 +0000
commit8afcf4bcf11c91eafe016e1e85ef727776da7895 (patch)
tree24844b5f54042b95c7a4defdbdc0d005992d1ede /extensions
parent5e099e099f7190b31dcc56828674a328852a51a0 (diff)
General code cleanup by Roberto Nibali:
- linking for dlopen() needs to be after the object generation - fix small typo in Rules.make.in - #ifdef DEBUG all functions that are not used - add missing #include's - fix sloppy braceing - added return for 'int main()'
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ulogd_LOCAL.c1
-rw-r--r--extensions/ulogd_LOGEMU.c11
2 files changed, 8 insertions, 4 deletions
diff --git a/extensions/ulogd_LOCAL.c b/extensions/ulogd_LOCAL.c
index e396cf5..f6078c4 100644
--- a/extensions/ulogd_LOCAL.c
+++ b/extensions/ulogd_LOCAL.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/time.h>
#include <ulogd/ulogd.h>
#ifdef DEBUG_LOCAL
diff --git a/extensions/ulogd_LOGEMU.c b/extensions/ulogd_LOGEMU.c
index c31708f..24f61d9 100644
--- a/extensions/ulogd_LOGEMU.c
+++ b/extensions/ulogd_LOGEMU.c
@@ -1,4 +1,4 @@
-/* ulogd_LOGEMU.c, Version $Revision: 1.9 $
+/* ulogd_LOGEMU.c, Version $Revision: 1.10 $
*
* ulogd output target for syslog logging emulation
*
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_LOGEMU.c,v 1.9 2002/04/27 19:45:51 laforge Exp $
+ * $Id: ulogd_LOGEMU.c,v 1.10 2002/12/09 14:42:43 laforge Exp $
*
*/
@@ -30,6 +30,9 @@
#include <string.h>
#include <time.h>
#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <ulogd/ulogd.h>
@@ -119,11 +122,11 @@ int _output_logemu(ulog_iret_t *res)
timestr = ctime(&now) + 4;
/* truncate time */
- if (tmp = strchr(timestr, '\n'))
+ if ((tmp = strchr(timestr, '\n')))
*tmp = '\0';
/* truncate hostname */
- if (tmp = strchr(hostname, '.'))
+ if ((tmp = strchr(hostname, '.')))
*tmp = '\0';
/* print time and hostname */