summaryrefslogtreecommitdiffstats
path: root/ulogd/extensions/ulogd_LOGEMU.c
diff options
context:
space:
mode:
authorlaforge <laforge>2002-12-09 15:03:51 +0000
committerlaforge <laforge>2002-12-09 15:03:51 +0000
commit54534ac671f15bbfa4a7b39a8c62b8a3578d78a0 (patch)
tree199e3f83bb8f3ab0dad7da212a5b352dd5b2ebb1 /ulogd/extensions/ulogd_LOGEMU.c
parent2da10b8ec0f0ced46a9fdbf304d5a5b790de4db2 (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 'ulogd/extensions/ulogd_LOGEMU.c')
-rw-r--r--ulogd/extensions/ulogd_LOGEMU.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ulogd/extensions/ulogd_LOGEMU.c b/ulogd/extensions/ulogd_LOGEMU.c
index c31708f..24f61d9 100644
--- a/ulogd/extensions/ulogd_LOGEMU.c
+++ b/ulogd/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 */