aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/gtk-gnutella
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-11-29 08:31:46 +0800
committerpav <pav@FreeBSD.org>2005-11-29 08:31:46 +0800
commit8fb195bd954b7117b0762340d015aa6bfa6bda3f (patch)
tree91b41b2efec423d43fe1b0e1049cd30453002963 /net-p2p/gtk-gnutella
parent1bd8049075aa8871b244a5d3918bb075dd39a0a8 (diff)
downloadfreebsd-ports-graphics-8fb195bd954b7117b0762340d015aa6bfa6bda3f.tar.gz
freebsd-ports-graphics-8fb195bd954b7117b0762340d015aa6bfa6bda3f.tar.zst
freebsd-ports-graphics-8fb195bd954b7117b0762340d015aa6bfa6bda3f.zip
- Fix build on FreeBSD 4
PR: ports/89630 Submitted by: Jonas Sonntag <jonas@schiebtsich.net> (maintainer)
Diffstat (limited to 'net-p2p/gtk-gnutella')
-rw-r--r--net-p2p/gtk-gnutella/Makefile4
-rw-r--r--net-p2p/gtk-gnutella/files/patch-gcc2.diff52
2 files changed, 52 insertions, 4 deletions
diff --git a/net-p2p/gtk-gnutella/Makefile b/net-p2p/gtk-gnutella/Makefile
index 61d6940e3a0..a64ba12146e 100644
--- a/net-p2p/gtk-gnutella/Makefile
+++ b/net-p2p/gtk-gnutella/Makefile
@@ -60,10 +60,6 @@ OPTIONS= GTK2 "Build with gtk2 frontend" on \
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
-BROKEN= "Does not compile"
-.endif
-
.if !defined(INTERACTIVE_CONFIGURE)
CONFIGURE_ARGS+= -d -e
.endif
diff --git a/net-p2p/gtk-gnutella/files/patch-gcc2.diff b/net-p2p/gtk-gnutella/files/patch-gcc2.diff
new file mode 100644
index 00000000000..634145556cb
--- /dev/null
+++ b/net-p2p/gtk-gnutella/files/patch-gcc2.diff
@@ -0,0 +1,52 @@
+--- src/core/rx_inflate.h.orig Tue Nov 22 22:47:05 2005
++++ src/core/rx_inflate.h Sat Nov 26 18:15:09 2005
+@@ -46,7 +46,7 @@
+ struct rx_inflate_cb {
+ void (*add_rx_inflated)(gpointer owner, gint amount);
+ void (*inflate_error)(gpointer owner,
+- const gchar *reason, ...) G_GNUC_PRINTF(2, 3);
++ const gchar *reason, ...) PRINTF_FUNC_PTR(2, 3);
+ };
+
+ /**
+--- src/core/rx_chunk.h.orig Tue Nov 22 22:47:05 2005
++++ src/core/rx_chunk.h Sat Nov 26 18:15:09 2005
+@@ -45,7 +45,7 @@
+ */
+ struct rx_chunk_cb {
+ void (*chunk_error)(gpointer owner,
+- const gchar *reason, ...) G_GNUC_PRINTF(2, 3);
++ const gchar *reason, ...) PRINTF_FUNC_PTR(2, 3);
+ void (*chunk_end)(gpointer owner);
+ };
+
+--- src/core/rx_link.h.orig Tue Nov 22 22:47:05 2005
++++ src/core/rx_link.h Sat Nov 26 18:15:09 2005
+@@ -46,7 +46,7 @@
+ struct rx_link_cb {
+ void (*add_rx_given)(gpointer owner, gint amount);
+ void (*read_error)(gpointer owner,
+- const gchar *reason, ...) G_GNUC_PRINTF(2, 3);
++ const gchar *reason, ...) PRINTF_FUNC_PTR(2, 3);
+ void (*got_eof)(gpointer owner);
+ };
+
+--- src/common.h.orig Tue Nov 22 22:47:03 2005
++++ src/common.h Sat Nov 26 18:15:08 2005
+@@ -366,6 +366,16 @@
+ #define NON_NULL_PARAM(x) __attribute__((nonnull x))
+ #else /* GCC < 3.3 */
+ #define NON_NULL_PARAM(x)
++#endif
++
++/**
++ * This is the same G_GNUC_FORMAT() but for function pointers. Older versions
++ * of GCC do not allow function attributes for function pointers.
++ */
++#if HAVE_GCC(3, 0)
++#define PRINTF_FUNC_PTR(x, y) __attribute__((format(printf, (x), (y))))
++#else /* GCC < 3.0 */
++#define PRINTF_FUNC_PTR(x, y)
+ #endif
+
+ /* Functions using this attribute cause a warning if the returned