make it compile with g++ 3.0 also
This commit is contained in:
3
Makefile
3
Makefile
@@ -7,7 +7,8 @@ man8 := $(DESTDIR)/usr/share/man/man8/
|
|||||||
|
|
||||||
all: nethogs
|
all: nethogs
|
||||||
|
|
||||||
CFLAGS=-g -Wall -pg
|
#CFLAGS=-g -Wall -pg
|
||||||
|
CFLAGS=-O2
|
||||||
OBJS=structs.o packet.o connection.o process.o refresh.o decpcap.o cui.o
|
OBJS=structs.o packet.o connection.o process.o refresh.o decpcap.o cui.o
|
||||||
GCC=g++
|
GCC=g++
|
||||||
.PHONY: tgz
|
.PHONY: tgz
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ bool sameinaddr(in_addr one, in_addr other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Packet::isOlderThan (timeval t) {
|
bool Packet::isOlderThan (timeval t) {
|
||||||
std::cout << "Comparing " << time.tv_sec << " <= " << t.tv_sec << endl;
|
std::cout << "Comparing " << time.tv_sec << " <= " << t.tv_sec << std::endl;
|
||||||
return (time.tv_sec <= t.tv_sec);
|
return (time.tv_sec <= t.tv_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
#include "hashtbl.h"
|
|
||||||
#include "nethogs.h"
|
#include "nethogs.h"
|
||||||
#include "inodeproc.cpp"
|
#include "inodeproc.cpp"
|
||||||
|
|
||||||
@@ -206,14 +205,14 @@ struct prg_node * findPID (unsigned long inode)
|
|||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
{
|
{
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
std::cout << "ITP: inode " << inode << " not in inode-to-pid-mapping - reloading." << endl;
|
std::cout << "ITP: inode " << inode << " not in inode-to-pid-mapping - reloading." << std::endl;
|
||||||
prg_cache_clear();
|
prg_cache_clear();
|
||||||
prg_cache_load();
|
prg_cache_load();
|
||||||
node = prg_cache_get(inode);
|
node = prg_cache_get(inode);
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
{
|
{
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
std::cout << "ITP: inode " << inode << " STILL not in inode-to-pid-mapping." << endl;
|
std::cout << "ITP: inode " << inode << " STILL not in inode-to-pid-mapping." << std::endl;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user