Hi ports, Alexander,

> http://build-failures.rhaalovely.net/sparc64/last/net/osrtspproxy.log
(impacts also macppc with ports-gcc-8)

There is a macro vs function clash here i guess.

I've naively limited the use of these macros in upstream code
to clang.

It then builds fine on amd64 and macppc. 

Comments and feedback are welcome!

Charlène.


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/osrtspproxy/Makefile,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 Makefile
--- Makefile    24 Oct 2018 14:28:09 -0000      1.9
+++ Makefile    15 May 2019 12:39:36 -0000
@@ -4,7 +4,7 @@ COMMENT=                RTSP proxy reference implement
 
 DISTNAME=              osrtspproxy_2_0
 PKGNAME=               osrtspproxy-2.0
-REVISION=              3
+REVISION=              4
 CATEGORIES=            net
 HOMEPAGE=              http://www.rtsp.org/
 
Index: patches/patch-libapp_types_h
===================================================================
RCS file: patches/patch-libapp_types_h
diff -N patches/patch-libapp_types_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libapp_types_h        15 May 2019 12:39:36 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Fix the build with ports-gcc:
+error: macro "min" passed 3 arguments, but takes just 2
+
+Index: libapp/types.h
+--- libapp/types.h.orig
++++ libapp/types.h
+@@ -41,11 +41,13 @@
+ #ifndef NULL
+ #define NULL 0
+ #endif
+-#ifndef min
++#if defined(__OpenBSD__) && defined(__clang__)
++#ifndef min 
+ #define min(a,b) ( ((a)<(b)) ? (a) : (b) )
+ #endif
+ #ifndef max
+ #define max(a,b) ( ((a)>(b)) ? (a) : (b) )
++#endif
+ #endif
+ 
+ typedef unsigned int UINT;



Reply via email to