svn commit: r549572 - in head/net/rtg: . files
Stefan Eßer
se at FreeBSD.org
Tue Sep 22 11:15:30 UTC 2020
Author: se
Date: Tue Sep 22 11:15:28 2020
New Revision: 549572
URL: https://svnweb.freebsd.org/changeset/ports/549572
Log:
Fix build with -fno-common
Added:
head/net/rtg/files/patch-src_rtgsnmp.c (contents, props changed)
Modified:
head/net/rtg/Makefile
head/net/rtg/files/patch-src_rtg.h
head/net/rtg/files/patch-src_rtgplot.c
head/net/rtg/files/patch-src_rtgpoll.c
Modified: head/net/rtg/Makefile
==============================================================================
--- head/net/rtg/Makefile Tue Sep 22 10:57:34 2020 (r549571)
+++ head/net/rtg/Makefile Tue Sep 22 11:15:28 2020 (r549572)
@@ -3,7 +3,7 @@
PORTNAME= rtg
PORTVERSION= 0.7.4
-PORTREVISION= 20
+PORTREVISION= 21
CATEGORIES= net
MASTER_SITES= SF \
ftp://ftpmirror.uk/freebsd-ports/rtg/
Modified: head/net/rtg/files/patch-src_rtg.h
==============================================================================
--- head/net/rtg/files/patch-src_rtg.h Tue Sep 22 10:57:34 2020 (r549571)
+++ head/net/rtg/files/patch-src_rtg.h Tue Sep 22 11:15:28 2020 (r549572)
@@ -1,16 +1,33 @@
--- src/rtg.h.orig 2003-09-25 15:56:04 UTC
+++ src/rtg.h
-@@ -40,11 +40,9 @@
+@@ -40,12 +40,10 @@
#define DEFAULT_DB_DB "rtg"
#define DEFAULT_DB_USER "snmp"
#define DEFAULT_DB_PASS "rtgdefault"
-#define DEFAULT_SNMP_VER 1
+#define DEFAULT_SNMP_VER 2
#define DEFAULT_SNMP_PORT 161
--
--/* PID File */
--#define PIDFILE "/tmp/rtgpoll.pid"
+#define DEFAULT_PIDFILE "/tmp/rtgpoll.pid"
+-/* PID File */
+-#define PIDFILE "/tmp/rtgpoll.pid"
+-
#define STAT_DESCRIP_ERROR 99
#define HASHSIZE 5000
+
+@@ -175,10 +173,10 @@ int add_hash_entry(target_t *);
+ int hash_target_file(char *);
+
+ /* Globals */
+-config_t set;
+-int lock;
+-int waiting;
+-char config_paths[CONFIG_PATHS][BUFSIZE];
+-hash_t hash;
++extern config_t set;
++extern int lock;
++extern int waiting;
++extern char config_paths[CONFIG_PATHS][BUFSIZE];
++extern hash_t hash;
+
+ #endif /* not _RTG_H_ */
Modified: head/net/rtg/files/patch-src_rtgplot.c
==============================================================================
--- head/net/rtg/files/patch-src_rtgplot.c Tue Sep 22 10:57:34 2020 (r549571)
+++ head/net/rtg/files/patch-src_rtgplot.c Tue Sep 22 11:15:28 2020 (r549572)
@@ -1,6 +1,16 @@
--- src/rtgplot.c.orig 2003-10-02 15:27:52 UTC
+++ src/rtgplot.c
-@@ -221,7 +221,10 @@ int main(int argc, char **argv) {
+@@ -54,6 +54,9 @@
+ #include "rtgplot.h"
+ #include "cgi.h"
+
++config_t set;
++char config_paths[CONFIG_PATHS][BUFSIZE];
++
+ /* dfp is a debug file pointer. Points to stderr unless debug=level is set */
+ FILE *dfp = NULL;
+
+@@ -221,7 +224,10 @@ int main(int argc, char **argv) {
plot_line(data[i][j], &img, &graph, colors->shade, TRUE);
else
plot_line(data[i][j], &img, &graph, colors->shade, FALSE);
@@ -12,7 +22,7 @@
plot_legend(&img, rate[i][j], &graph, colors->shade, intname, offset);
offset++;
}
-@@ -629,15 +632,15 @@ void plot_legend(gdImagePtr * img, rate_
+@@ -629,15 +635,15 @@ void plot_legend(gdImagePtr * img, rate_t rate, graph_
if (set.verbose >= HIGH)
fprintf(dfp, "Plotting legend (%s).\n", __FUNCTION__);
@@ -34,7 +44,7 @@
}
snprintf(string, sizeof(string), "%s", interface);
for (i = 0; i < (17 - strlen(interface)); i++) {
-@@ -662,7 +665,7 @@ void plot_legend(gdImagePtr * img, rate_
+@@ -662,7 +668,7 @@ void plot_legend(gdImagePtr * img, rate_t rate, graph_
units(rate.cur, cur), graph->units,
units((float)rate.total, total));
}
@@ -43,7 +53,7 @@
BORDER_T + graph->image.yplot_area + 33 + (10 * offset), string, std_colors[black]);
}
-@@ -866,6 +869,13 @@ void plot_labels(gdImagePtr * img, graph
+@@ -866,6 +872,13 @@ void plot_labels(gdImagePtr * img, graph_t * graph) {
title_offset = 1 - (0.01 * (strlen(VERSION) + strlen(COPYRIGHT) + 2));
snprintf(string, sizeof(string), "%s %s", COPYRIGHT, VERSION);
gdImageString(*img, gdFontSmall, BORDER_L + (graph->image.xplot_area * title_offset), BORDER_T - 15, string, std_colors[black]);
@@ -57,7 +67,7 @@
}
-@@ -1342,10 +1352,14 @@ void parseWeb(arguments_t *arguments, gr
+@@ -1342,10 +1355,14 @@ void parseWeb(arguments_t *arguments, graph_t *graph)
}
}
/* XXX REB - Warning: Deprecated, tN argument will go away in RTG 0.8 XXX */
Modified: head/net/rtg/files/patch-src_rtgpoll.c
==============================================================================
--- head/net/rtg/files/patch-src_rtgpoll.c Tue Sep 22 10:57:34 2020 (r549571)
+++ head/net/rtg/files/patch-src_rtgpoll.c Tue Sep 22 11:15:28 2020 (r549572)
@@ -1,6 +1,12 @@
--- src/rtgpoll.c.orig 2003-09-25 15:56:04 UTC
+++ src/rtgpoll.c
-@@ -13,6 +13,7 @@
+@@ -9,10 +9,13 @@
+ #include "common.h"
+ #include "rtg.h"
+
++char config_paths[CONFIG_PATHS][BUFSIZE];
++
+ /* Yes. Globals. */
stats_t stats =
{PTHREAD_MUTEX_INITIALIZER, 0, 0, 0, 0, 0, 0, 0, 0, 0.0};
char *target_file = NULL;
@@ -8,7 +14,7 @@
target_t *current = NULL;
MYSQL mysql;
int entries = 0;
-@@ -41,7 +42,7 @@ int main(int argc, char *argv[]) {
+@@ -41,7 +44,7 @@ int main(int argc, char *argv[]) {
config_defaults(&set);
/* Parse the command-line. */
@@ -17,7 +23,7 @@
switch ((char) ch) {
case 'c':
conf_file = optarg;
-@@ -55,6 +56,9 @@ int main(int argc, char *argv[]) {
+@@ -55,6 +58,9 @@ int main(int argc, char *argv[]) {
case 'm':
set.multiple++;
break;
@@ -27,7 +33,7 @@
case 't':
target_file = optarg;
break;
-@@ -66,6 +70,9 @@ int main(int argc, char *argv[]) {
+@@ -66,6 +72,9 @@ int main(int argc, char *argv[]) {
break;
}
@@ -37,7 +43,7 @@
if (set.verbose >= LOW)
printf("RTG version %s starting.\n", VERSION);
-@@ -78,7 +85,7 @@ int main(int argc, char *argv[]) {
+@@ -78,7 +87,7 @@ int main(int argc, char *argv[]) {
sigaddset(&signal_set, SIGINT);
sigaddset(&signal_set, SIGQUIT);
if (!set.multiple)
@@ -46,7 +52,7 @@
if (pthread_sigmask(SIG_BLOCK, &signal_set, NULL) != 0)
printf("pthread_sigmask error\n");
-@@ -244,7 +251,7 @@ void *sig_handler(void *arg)
+@@ -244,7 +253,7 @@ void *sig_handler(void *arg)
if (set.verbose >= LOW)
printf("Quiting: received signal %d.\n", sig_number);
rtg_dbdisconnect(&mysql);
@@ -55,7 +61,7 @@
exit(1);
break;
}
-@@ -259,6 +266,7 @@ void usage(char *prog)
+@@ -259,6 +268,7 @@ void usage(char *prog)
printf("\nOptions:\n");
printf(" -c <file> Specify configuration file\n");
printf(" -d Disable database inserts\n");
Added: head/net/rtg/files/patch-src_rtgsnmp.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/rtg/files/patch-src_rtgsnmp.c Tue Sep 22 11:15:28 2020 (r549572)
@@ -0,0 +1,14 @@
+--- src/rtgsnmp.c.orig 2003-09-25 18:23:35 UTC
++++ src/rtgsnmp.c
+@@ -8,6 +8,11 @@
+ #include "common.h"
+ #include "rtg.h"
+
++config_t set;
++int lock;
++int waiting;
++hash_t hash;
++
+ #ifdef OLD_UCD_SNMP
+ #include "asn1.h"
+ #include "snmp_api.h"
More information about the svn-ports-head
mailing list