sflow / host-sflow

host-sflow agent
http://sflow.net
Other
146 stars 55 forks source link

Linux port does not compile 2.0.2/2.0.3 #12

Closed doctaweeks closed 7 years ago

doctaweeks commented 7 years ago

e612d67ffc9950a6ada3c4fefed2b3fc0253813c seems to have introduced some bugs that break the build:

readInterfaces.c: In function ‘ethtool_getGLINKSETTINGS’: readInterfaces.c:276:25: warning: passing argument 1 of ‘setAdaptorSpeed’ from incompatible pointer type setAdaptorSpeed(adaptor, 0); ^ In file included from readInterfaces.c:9:0: hsflowd.h:534:8: note: expected ‘struct HSP ’ but argument is of type ‘struct SFLAdaptor ’ void setAdaptorSpeed(HSP sp, SFLAdaptor adaptor, uint64_t speed); ^ readInterfaces.c:276:9: error: too few arguments to function ‘setAdaptorSpeed’ setAdaptorSpeed(adaptor, 0); ^ In file included from readInterfaces.c:9:0: hsflowd.h:534:8: note: declared here void setAdaptorSpeed(HSP sp, SFLAdaptor adaptor, uint64_t speed); ^ readInterfaces.c:283:25: warning: passing argument 1 of ‘setAdaptorSpeed’ from incompatible pointer type setAdaptorSpeed(adaptor, ifSpeed_bps); ^ In file included from readInterfaces.c:9:0: hsflowd.h:534:8: note: expected ‘struct HSP ’ but argument is of type ‘struct SFLAdaptor ’ void setAdaptorSpeed(HSP sp, SFLAdaptor adaptor, uint64_t speed); ^ readInterfaces.c:283:34: warning: passing argument 2 of ‘setAdaptorSpeed’ makes pointer from integer without a cast setAdaptorSpeed(adaptor, ifSpeed_bps); ^ In file included from readInterfaces.c:9:0: hsflowd.h:534:8: note: expected ‘struct SFLAdaptor ’ but argument is of type ‘uint64_t’ void setAdaptorSpeed(HSP sp, SFLAdaptor adaptor, uint64_t speed); ^ readInterfaces.c:283:9: error: too few arguments to function ‘setAdaptorSpeed’ setAdaptorSpeed(adaptor, ifSpeed_bps); ^ In file included from readInterfaces.c:9:0: hsflowd.h:534:8: note: declared here void setAdaptorSpeed(HSP sp, SFLAdaptor adaptor, uint64_t speed); ^ readInterfaces.c: At top level: readInterfaces.c:296:15: warning: ‘ethtool_get_GSET’ defined but not used [-Wunused-function] static bool ethtool_getGSET(HSP sp, struct ifreq ifr, int fd, SFLAdaptor adaptor) ^ make[1]: * [Makefile:363: readInterfaces.o] Error 1

sflow commented 7 years ago

Please try pulling from the latest master and let me know if it is fixed.

doctaweeks commented 7 years ago

Latest master builds fine. Thanks for the quick fix.