48 lines
1.2 KiB
Diff
48 lines
1.2 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -21,7 +21,7 @@ qosmon: qosmon.o
|
|
$(CC) $(LDFLAGS) $^ $(TCOBJS) -o $@ $(LDLIBS)
|
|
|
|
qosmon.o: qosmon.c
|
|
- $(CC) -D ONLYBG $(CFLAGS) -I $(TCDIR)/include -I $(TCDIR)/tc -c $^ -o $@
|
|
+ $(CC) -D ONLYBG -D_GNU_SOURCE $(CFLAGS) -I $(TCDIR)/include -I $(TCDIR)/tc -c $^ -o $@
|
|
|
|
install: all uninstall
|
|
-mkdir -p $(BINDIR)
|
|
--- a/qosmon.c
|
|
+++ b/qosmon.c
|
|
@@ -34,6 +34,8 @@
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <time.h>
|
|
+#include <limits.h>
|
|
+#include <sys/param.h>
|
|
|
|
#include "utils.h"
|
|
#include "tc_util.h"
|
|
@@ -62,12 +64,13 @@
|
|
//after then and define dump_filter and talk accordingly.
|
|
#ifdef RTNL_FAMILY_MAX
|
|
#define dump_filter(a,b,c) rtnl_dump_filter(a,b,c)
|
|
-#define talk(a,b,c,d,e) rtnl_talk(a,b,c,d,e)
|
|
+#define talk(a,b,c) rtnl_talk(a,b,c)
|
|
#else
|
|
#define dump_filter(a,b,c) rtnl_dump_filter(a,b,c,NULL,NULL)
|
|
-#define talk(a,b,c,d,e) rtnl_talk(a,b,c,d,e,NULL,NULL)
|
|
+#define talk(a,b,c) rtnl_talk(a,b,c,NULL,NULL)
|
|
#endif
|
|
|
|
+#define __sighandler_t sighandler_t
|
|
|
|
/* use_names is required when linking to tc_util.o */
|
|
bool use_names = false;
|
|
@@ -630,7 +633,7 @@ int tc_class_modify(__u32 rate)
|
|
}
|
|
|
|
|
|
- if (talk(&rth, &req.n, 0, 0, NULL) < 0)
|
|
+ if (talk(&rth, &req.n, NULL) < 0)
|
|
return 2;
|
|
|
|
return 0;
|