aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-04-29 19:19:48 +0800
committerpav <pav@FreeBSD.org>2006-04-29 19:19:48 +0800
commit918f605fdc00643d43ba8313f7bcfa908ee52a59 (patch)
treec8754f5e562a0bc419ea677640ccd473456d179d /misc
parenta08605b6844cb9a759d8579a95b8cab7b6b5b745 (diff)
downloadfreebsd-ports-gnome-918f605fdc00643d43ba8313f7bcfa908ee52a59.tar.gz
freebsd-ports-gnome-918f605fdc00643d43ba8313f7bcfa908ee52a59.tar.zst
freebsd-ports-gnome-918f605fdc00643d43ba8313f7bcfa908ee52a59.zip
- Fix build on 4.X
PR: ports/96369 Submitted by: Martin Wilke <freebsd@unixfreunde.de> (maintainer)
Diffstat (limited to 'misc')
-rw-r--r--misc/gkrellmbgchg2/Makefile4
-rw-r--r--misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c39
2 files changed, 39 insertions, 4 deletions
diff --git a/misc/gkrellmbgchg2/Makefile b/misc/gkrellmbgchg2/Makefile
index 66ce2ecd787e..793856535d3c 100644
--- a/misc/gkrellmbgchg2/Makefile
+++ b/misc/gkrellmbgchg2/Makefile
@@ -23,10 +23,6 @@ PLIST_FILES= libexec/gkrellm2/plugins/gkrellmbgchg.so
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
-BROKEN= Does not compile
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's|-O3||g' ${WRKSRC}/Makefile
diff --git a/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c b/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c
new file mode 100644
index 000000000000..58aa9797c1a3
--- /dev/null
+++ b/misc/gkrellmbgchg2/files/patch-gkrellmbgchg.c
@@ -0,0 +1,39 @@
+--- gkrellmbgchg.c.orig Wed Apr 26 17:41:54 2006
++++ gkrellmbgchg.c Wed Apr 26 17:54:17 2006
+@@ -114,7 +114,9 @@
+ {
+ FILE *file;
+ gchar *tmp;
+-
++#if !defined(WIN32)
++ struct stat buf;
++#endif
+ if( filename ) {
+ if( !strncmp( filename, "~/", MIN(2, strlen(filename)) ) )
+ tmp = g_strdup_printf( "%s/%s", g_get_home_dir(), filename+2 );
+@@ -125,7 +127,6 @@
+
+ #if !defined(WIN32)
+ /* don't load if no force and not modified */
+- struct stat buf;
+ if( stat( tmp, &buf ) == -1 ) {
+ /* something went wrong, we just don't care what for now */
+ GKBG_debug("stat: error on `%s'", tmp);
+@@ -223,6 +224,9 @@
+ gint num=1;
+ FILE *idb_file;
+ struct idb_entry *idb_e;
++#if !defined(WIN32)
++ struct stat buf;
++#endif
+
+ if((idb_file = open_imagelist( bgmon.idb, force )) == NULL) return 1;
+
+@@ -261,7 +265,6 @@
+ #if !defined(WIN32)
+ /* ignore the file if we stat returns -1 (error) and the user wants
+ * us to */
+- struct stat buf;
+ if( bgmon.ignore && (stat( tmp, &buf ) == -1) ) {
+ GKBG_debug( "ignoring `%s'", tmp );
+ } else {