From nobody@FreeBSD.org  Wed Sep  5 10:32:40 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D59C31065673
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Sep 2012 10:32:40 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C0A058FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Sep 2012 10:32:40 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q85AWeED045861
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 5 Sep 2012 10:32:40 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q85AWeua045857;
	Wed, 5 Sep 2012 10:32:40 GMT
	(envelope-from nobody)
Message-Id: <201209051032.q85AWeua045857@red.freebsd.org>
Date: Wed, 5 Sep 2012 10:32:40 GMT
From: arrowdodger <6yearold@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: multimedia/vlc: Doesn't build with clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171341
>Category:       ports
>Synopsis:       multimedia/vlc: Doesn't build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 05 10:40:04 UTC 2012
>Closed-Date:    Wed Sep 05 20:40:29 UTC 2012
>Last-Modified:  Wed Sep 05 20:40:29 UTC 2012
>Originator:     arrowdodger
>Release:        9-STABLE
>Organization:
>Environment:
>Description:
I have WITH_CLANG_IS_CC=1 in /etc/src.conf, so /usr/bin/cc is clang and /usr/bin/c++ is clang++.

clang++ -v:

FreeBSD clang version 3.1 (branches/release_31 156863) 20120523

My /etc/make.conf:

CC=clang
CXX=clang++
CXXFLAGS=-stdlib=libc++ -std=c++11 -Wno-c++11-narrowing

When running portmaster vlc- i get:

  CXX    libspatializer_plugin_la-spatializer.lo
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:653:24: error: C++ requires a type specifier for all declarations
static inline uint16_t bswap16 (uint16_t x)
                       ^~~~~~~~~~~~~~~~~~~~
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:16: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
                      ^~~~~~~~~~~~~~~~~~~~
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:653:24: error: expected ')'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:41: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
                                               ^
./../include/vlc_common.h:653:24: note: to match this '('
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:15: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
                     ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:655:13: error: use of undeclared identifier 'x'
    return (x << 8) | (x >> 8);
            ^
./../include/vlc_common.h:655:24: error: use of undeclared identifier 'x'
    return (x << 8) | (x >> 8);
                       ^
./../include/vlc_common.h:660:24: error: expected ')'
static inline uint32_t bswap32 (uint32_t x)
                       ^
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
#define bswap32(x)      __bswap32(x)
                        ^
/usr/include/machine/endian.h:118:28: note: expanded from macro '__bswap32'
        (__builtin_constant_p(_x) ?                     \
                                  ^
./../include/vlc_common.h:660:24: note: to match this '('
static inline uint32_t bswap32 (uint32_t x)
                       ^
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
#define bswap32(x)      __bswap32(x)
                        ^
/usr/include/machine/endian.h:118:2: note: expanded from macro '__bswap32'
        (__builtin_constant_p(_x) ?                     \
        ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:660:24: error: static declaration of '__builtin_constant_p' follows non-static declaration
static inline uint32_t bswap32 (uint32_t x)
                       ^
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
#define bswap32(x)      __bswap32(x)
                        ^
/usr/include/machine/endian.h:118:3: note: expanded from macro '__bswap32'
        (__builtin_constant_p(_x) ?                     \
         ^
./../include/vlc_common.h:653:24: note: previous implicit declaration is here
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:16: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
                      ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:660:24: error: definition of builtin function '__builtin_constant_p'
static inline uint32_t bswap32 (uint32_t x)
                       ^
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
#define bswap32(x)      __bswap32(x)
                        ^
/usr/include/machine/endian.h:118:3: note: expanded from macro '__bswap32'
        (__builtin_constant_p(_x) ?                     \
         ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:674:24: error: expected ')'
static inline uint64_t bswap64 (uint64_t x)
                       ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/machine/endian.h:114:28: note: expanded from macro '__bswap64'
        (__builtin_constant_p(_x) ?                     \
                                  ^
./../include/vlc_common.h:674:24: note: to match this '('
static inline uint64_t bswap64 (uint64_t x)
                       ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/machine/endian.h:114:2: note: expanded from macro '__bswap64'
        (__builtin_constant_p(_x) ?                     \
        ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:674:24: error: static declaration of '__builtin_constant_p' follows non-static declaration
static inline uint64_t bswap64 (uint64_t x)
                       ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/machine/endian.h:114:3: note: expanded from macro '__bswap64'
        (__builtin_constant_p(_x) ?                     \
         ^
./../include/vlc_common.h:653:24: note: previous implicit declaration is here
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
  CC     libheadphone_channel_mixer_plugin_la-headphone.lo
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:16: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
                      ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:674:24: error: definition of builtin function '__builtin_constant_p'
static inline uint64_t bswap64 (uint64_t x)
                       ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/machine/endian.h:114:3: note: expanded from macro '__bswap64'
        (__builtin_constant_p(_x) ?                     \
         ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:732:12: error: reference to '__uint16_t' is ambiguous
    return ntoh16 (x);
           ^
./../include/vlc_common.h:721:19: note: expanded from macro 'ntoh16'
#define ntoh16(i) hton16(i)
                  ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:732:12: error: reference to '__uint16_t' is ambiguous
    return ntoh16 (x);
           ^
./../include/vlc_common.h:721:19: note: expanded from macro 'ntoh16'
#define ntoh16(i) hton16(i)
                  ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:123:6: note: expanded from macro '__bswap16'
            __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)))
            ^
/usr/include/machine/endian.h:88:30: note: expanded from macro '__bswap16_const'
#define __bswap16_const(_x)     (__uint16_t)((_x) << 8 | (_x) >> 8)
                                 ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:732:12: error: reference to '__uint16_t' is ambiguous
    return ntoh16 (x);
           ^
./../include/vlc_common.h:721:19: note: expanded from macro 'ntoh16'
#define ntoh16(i) hton16(i)
                  ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:123:23: note: expanded from macro '__bswap16'
            __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)))
                             ^
/usr/include/machine/endian.h:88:43: note: expanded from macro '__bswap16_const'
#define __bswap16_const(_x)     (__uint16_t)((_x) << 8 | (_x) >> 8)
                                              ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:732:12: error: reference to '__uint16_t' is ambiguous
    return ntoh16 (x);
           ^
./../include/vlc_common.h:721:19: note: expanded from macro 'ntoh16'
#define ntoh16(i) hton16(i)
                  ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:123:23: note: expanded from macro '__bswap16'
            __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)))
                             ^
/usr/include/machine/endian.h:88:55: note: expanded from macro '__bswap16_const'
#define __bswap16_const(_x)     (__uint16_t)((_x) << 8 | (_x) >> 8)
                                                          ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:801:9: error: reference to '__uint16_t' is ambiguous
    w = hton16 (w);
        ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:801:9: error: reference to '__uint16_t' is ambiguous
    w = hton16 (w);
        ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:123:6: note: expanded from macro '__bswap16'
            __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)))
            ^
/usr/include/machine/endian.h:88:30: note: expanded from macro '__bswap16_const'
#define __bswap16_const(_x)     (__uint16_t)((_x) << 8 | (_x) >> 8)
                                 ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:801:9: error: reference to '__uint16_t' is ambiguous
    w = hton16 (w);
        ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:123:23: note: expanded from macro '__bswap16'
            __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)))
                             ^
/usr/include/machine/endian.h:88:43: note: expanded from macro '__bswap16_const'
#define __bswap16_const(_x)     (__uint16_t)((_x) << 8 | (_x) >> 8)
                                              ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
In file included from spatializer/spatializer.cpp:40:
./../include/vlc_common.h:801:9: error: reference to '__uint16_t' is ambiguous
    w = hton16 (w);
        ^
./../include/vlc_common.h:717:20: note: expanded from macro 'hton16'
# define hton16(i) bswap16(i)
                   ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:123:23: note: expanded from macro '__bswap16'
            __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)))
                             ^
/usr/include/machine/endian.h:88:55: note: expanded from macro '__bswap16_const'
#define __bswap16_const(_x)     (__uint16_t)((_x) << 8 | (_x) >> 8)
                                                          ^
./../include/vlc_common.h:653:24: note: candidate found by name lookup is '__uint16_t'
static inline uint16_t bswap16 (uint16_t x)
                       ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/machine/endian.h:122:4: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(_x) ?        \
          ^
/usr/include/machine/_types.h:54:25: note: candidate found by name lookup is '__uint16_t'
typedef unsigned short          __uint16_t;
                                ^
18 errors generated.
gmake[4]: *** [libspatializer_plugin_la-spatializer.lo] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-2.0.3/modules/audio_filter'
gmake[3]: *** [all] Error 2

>How-To-Repeat:
Build port with CC=clang and CXX=clang++
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Sep 5 10:40:25 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171341 

From: Juergen Lock <nox@jelal.kn-bremen.de>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/171341: multimedia/vlc: Doesn't build with clang
Date: Wed, 5 Sep 2012 18:44:01 +0200

 Interesting that this didn't occur when I tested clang...  Anyway,
 can you try this patch:  (put it in files/patch-include-vlc_common.h )
 
 --- include/vlc_common.h.orig
 +++ include/vlc_common.h
 @@ -642,7 +642,7 @@ static inline unsigned popcount (unsigne
  #endif
  }
  
 -#ifdef __OS2__
 +#if defined(__OS2__) || defined(__FreeBSD__)
  #   undef bswap16
  #   undef bswap32
  #   undef bswap64
 
  Thanx!
 	Juergen

From: Juergen Lock <nox@jelal.kn-bremen.de>
To: bug-followup@freebsd.org
Cc: arrowdodger <6yearold@gmail.com>, multimedia@freebsd.org
Subject: Re: ports/171341: multimedia/vlc: Doesn't build with clang
Date: Wed, 5 Sep 2012 19:36:50 +0200

 [Now with the right PR, sorry]
 
 Hm query-pr.cgi doesn't pick up the patch properly, here is it again,
 this time against the port dir:
 
 Index: files/patch-include-vlc_common.h
 ===================================================================
 --- files/patch-include-vlc_common.h.orig
 +++ files/patch-include-vlc_common.h
 @@ -0,0 +1,11 @@
 +--- include/vlc_common.h.orig
 ++++ include/vlc_common.h
 +@@ -642,7 +642,7 @@ static inline unsigned popcount (unsigne
 + #endif
 + }
 + 
 +-#ifdef __OS2__
 ++#if defined(__OS2__) || defined(__FreeBSD__)
 + #   undef bswap16
 + #   undef bswap32
 + #   undef bswap64
 

From: arrowdodger <6yearold@gmail.com>
To: Juergen Lock <nox@jelal.kn-bremen.de>
Cc: bug-followup@freebsd.org, multimedia@freebsd.org
Subject: Re: ports/171341: multimedia/vlc: Doesn't build with clang
Date: Wed, 5 Sep 2012 22:09:21 +0400

 --f46d042c6b8dfdacb004c8f84723
 Content-Type: text/plain; charset=UTF-8
 
 Now it goes farther, but dies with:
 
   CXX    dialogs/libqt4_plugin_la-help.lo
 dialogs/help.cpp:115:27: error: differing user-defined suffixes ('__DATE__'
 and '__TIME__') in string literal concatenation
             + " ("__DATE__" "__TIME__").\n"
               ~~~~~~~~~~~~^~~~~~~~~~~
 1 error generated.
 gmake[6]: *** [dialogs/libqt4_plugin_la-help.lo] Error 1
 gmake[6]: Leaving directory
 `/usr/ports/multimedia/vlc/work/vlc-2.0.3/modules/gui/qt4'
 
 On Wed, Sep 5, 2012 at 9:36 PM, Juergen Lock <nox@jelal.kn-bremen.de> wrote:
 
 > [Now with the right PR, sorry]
 >
 > Hm query-pr.cgi doesn't pick up the patch properly, here is it again,
 > this time against the port dir:
 >
 > Index: files/patch-include-vlc_common.h
 > ===================================================================
 > --- files/patch-include-vlc_common.h.orig
 > +++ files/patch-include-vlc_common.h
 > @@ -0,0 +1,11 @@
 > +--- include/vlc_common.h.orig
 > ++++ include/vlc_common.h
 > +@@ -642,7 +642,7 @@ static inline unsigned popcount (unsigne
 > + #endif
 > + }
 > +
 > +-#ifdef __OS2__
 > ++#if defined(__OS2__) || defined(__FreeBSD__)
 > + #   undef bswap16
 > + #   undef bswap32
 > + #   undef bswap64
 >
 >
 
 --f46d042c6b8dfdacb004c8f84723
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 Now it goes farther, but dies with:<br><br>=C2=A0 CXX=C2=A0=C2=A0=C2=A0 dia=
 logs/libqt4_plugin_la-help.lo<br>dialogs/help.cpp:115:27: error: differing =
 user-defined suffixes (&#39;__DATE__&#39; and &#39;__TIME__&#39;) in string=
  literal concatenation<br>
 
 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 + &quot;=
  (&quot;__DATE__&quot; &quot;__TIME__&quot;).\n&quot;<br>=C2=A0=C2=A0=C2=A0=
 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~~~~~~~~~~~~^~=
 ~~~~~~~~~<br>1 error generated.<br>gmake[6]: *** [dialogs/libqt4_plugin_la-=
 help.lo] Error 1<br>gmake[6]: Leaving directory `/usr/ports/multimedia/vlc/=
 work/vlc-2.0.3/modules/gui/qt4&#39;<br>
 
 <br><div class=3D"gmail_quote">On Wed, Sep 5, 2012 at 9:36 PM, Juergen Lock=
  <span dir=3D"ltr">&lt;<a href=3D"mailto:nox@jelal.kn-bremen.de" target=3D"=
 _blank">nox@jelal.kn-bremen.de</a>&gt;</span> wrote:<br><blockquote class=
 =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
 ing-left:1ex">
 
 [Now with the right PR, sorry]<br>
 <br>
 Hm query-pr.cgi doesn&#39;t pick up the patch properly, here is it again,<b=
 r>
 this time against the port dir:<br>
 <br>
 Index: files/patch-include-vlc_common.h<br>
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
 --- files/patch-include-vlc_common.h.orig<br>
 +++ files/patch-include-vlc_common.h<br>
 @@ -0,0 +1,11 @@<br>
 +--- include/vlc_common.h.orig<br>
 ++++ include/vlc_common.h<br>
 +@@ -642,7 +642,7 @@ static inline unsigned popcount (unsigne<br>
 + #endif<br>
 + }<br>
 +<br>
 +-#ifdef __OS2__<br>
 ++#if defined(__OS2__) || defined(__FreeBSD__)<br>
 + # =C2=A0 undef bswap16<br>
 + # =C2=A0 undef bswap32<br>
 + # =C2=A0 undef bswap64<br>
 <br>
 </blockquote></div><br>
 
 --f46d042c6b8dfdacb004c8f84723--

From: Juergen Lock <nox@jelal.kn-bremen.de>
To: Juergen Lock <nox@jelal.kn-bremen.de>
Cc: bug-followup@freebsd.org, arrowdodger <6yearold@gmail.com>,
        multimedia@freebsd.org
Subject: Re: ports/171341: multimedia/vlc: Doesn't build with clang
Date: Wed, 5 Sep 2012 20:11:28 +0200

 I've now put the patch here:
 
 	http://people.freebsd.org/~nox/tmp/vlc-2.0.3-clang.patch

From: Juergen Lock <nox@jelal.kn-bremen.de>
To: arrowdodger <6yearold@gmail.com>
Cc: Juergen Lock <nox@jelal.kn-bremen.de>, bug-followup@freebsd.org,
        multimedia@freebsd.org
Subject: Re: ports/171341: multimedia/vlc: Doesn't build with clang
Date: Wed, 5 Sep 2012 20:55:42 +0200

 On Wed, Sep 05, 2012 at 10:09:21PM +0400, arrowdodger wrote:
 > Now it goes farther, but dies with:
 > 
 >   CXX    dialogs/libqt4_plugin_la-help.lo
 > dialogs/help.cpp:115:27: error: differing user-defined suffixes ('__DATE__'
 > and '__TIME__') in string literal concatenation
 >             + " ("__DATE__" "__TIME__").\n"
 >               ~~~~~~~~~~~~^~~~~~~~~~~
 > 1 error generated.
 > gmake[6]: *** [dialogs/libqt4_plugin_la-help.lo] Error 1
 > gmake[6]: Leaving directory
 > `/usr/ports/multimedia/vlc/work/vlc-2.0.3/modules/gui/qt4'
 > 
 Hm what if you try w/o your
 
 	CXXFLAGS=-stdlib=libc++ -std=c++11 -Wno-c++11-narrowing
 
 ?
 
  Or else try this updated patch; also at:
 
 	http://people.freebsd.org/~nox/tmp/vlc-2.0.3-clang.patch
 
 Index: files/patch-include-vlc_common.h
 ===================================================================
 --- files/patch-include-vlc_common.h.orig
 +++ files/patch-include-vlc_common.h
 @@ -0,0 +1,11 @@
 +--- include/vlc_common.h.orig
 ++++ include/vlc_common.h
 +@@ -642,7 +642,7 @@ static inline unsigned popcount (unsigne
 + #endif
 + }
 + 
 +-#ifdef __OS2__
 ++#if defined(__OS2__) || defined(__FreeBSD__)
 + #   undef bswap16
 + #   undef bswap32
 + #   undef bswap64
 Index: files/patch-modules-gui-qt4-dialogs-help.cpp
 ===================================================================
 --- files/patch-modules-gui-qt4-dialogs-help.cpp.orig
 +++ files/patch-modules-gui-qt4-dialogs-help.cpp
 @@ -0,0 +1,11 @@
 +--- modules/gui/qt4/dialogs/help.cpp.orig
 ++++ modules/gui/qt4/dialogs/help.cpp
 +@@ -112,7 +112,7 @@ AboutDialog::AboutDialog( intf_thread_t 
 +                 "popular platform.\n\n" )
 +             + qtr( "This version of VLC was compiled by:\n " )
 +             + qfu( VLC_CompileBy() )+ " on " + qfu( VLC_CompileHost() ) +
 +-            + " ("__DATE__" "__TIME__").\n"
 ++            + " (" + __DATE__ + " " + __TIME__ + ").\n"
 +             + qtr( "Compiler: " ) + qfu( VLC_Compiler() ) + ".\n"
 +             + qtr( "You are using the Qt4 Interface.\n\n" )
 +             + qtr( "Copyright (C) " ) + COPYRIGHT_YEARS
 
  Thanx!
 	Juergen

From: Juergen Lock <nox@jelal.kn-bremen.de>
To: Juergen Lock <nox@jelal.kn-bremen.de>
Cc: arrowdodger <6yearold@gmail.com>, bug-followup@freebsd.org,
        multimedia@freebsd.org
Subject: Re: ports/171341: multimedia/vlc: Doesn't build with clang
Date: Wed, 5 Sep 2012 21:56:03 +0200

 On Wed, Sep 05, 2012 at 08:55:42PM +0200, Juergen Lock wrote:
 > On Wed, Sep 05, 2012 at 10:09:21PM +0400, arrowdodger wrote:
 > > [...]
 
 > Hm what if you try w/o your
 > 
 > 	CXXFLAGS=-stdlib=libc++ -std=c++11 -Wno-c++11-narrowing
 > 
 > ?
 > 
 >  Or else try this updated patch; also at:
 > 
 > 	http://people.freebsd.org/~nox/tmp/vlc-2.0.3-clang.patch
 > 
 > [...]
 
 Hm I now tried your CXXFLAGS and get further failures in
 work/vlc-2.0.3/modules/audio_filter/spatializer/spatializer.cpp -
 I guess the vlc code is simply not c++11 ready.
 
  Sorry...
 	Juergen
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/171341: commit references a PR
Date: Wed,  5 Sep 2012 20:37:19 +0000 (UTC)

 Author: nox
 Date: Wed Sep  5 20:37:05 2012
 New Revision: 303722
 URL: http://svn.freebsd.org/changeset/ports/303722
 
 Log:
   - Add patch for (possible) compilation failure - even though the
     CXXFLAGS used in the PR are not supported. [1]
   - Fix runtime issue receiving UDP multicast streams. [2]
   - Bump PORTREVISION.
   
   PR:		ports/171341 [1]
   Submitted by:	arrowdodger <6yearold@gmail.com> [1]
   Reported by:	Sulev-Madis Silber <madis555@hot.ee> (via private
   		email) [2]
 
 Added:
   head/multimedia/vlc/files/patch-include-vlc_common.h   (contents, props changed)
   head/multimedia/vlc/files/patch-src-network-udp.c   (contents, props changed)
 Modified:
   head/multimedia/vlc/Makefile
 
 Modified: head/multimedia/vlc/Makefile
 ==============================================================================
 --- head/multimedia/vlc/Makefile	Wed Sep  5 19:21:31 2012	(r303721)
 +++ head/multimedia/vlc/Makefile	Wed Sep  5 20:37:05 2012	(r303722)
 @@ -7,7 +7,7 @@
  
  PORTNAME=	vlc
  DISTVERSION=	2.0.3
 -PORTREVISION=	1
 +PORTREVISION=	2
  PORTEPOCH=	3
  CATEGORIES=	multimedia audio ipv6 net www
  MASTER_SITES=	http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/p/-pre/}/ \
 
 Added: head/multimedia/vlc/files/patch-include-vlc_common.h
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/multimedia/vlc/files/patch-include-vlc_common.h	Wed Sep  5 20:37:05 2012	(r303722)
 @@ -0,0 +1,11 @@
 +--- include/vlc_common.h.orig
 ++++ include/vlc_common.h
 +@@ -642,7 +642,7 @@ static inline unsigned popcount (unsigne
 + #endif
 + }
 + 
 +-#ifdef __OS2__
 ++#if defined(__OS2__) || defined(__FreeBSD__)
 + #   undef bswap16
 + #   undef bswap32
 + #   undef bswap64
 
 Added: head/multimedia/vlc/files/patch-src-network-udp.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/multimedia/vlc/files/patch-src-network-udp.c	Wed Sep  5 20:37:05 2012	(r303722)
 @@ -0,0 +1,11 @@
 +--- src/network/udp.c.orig
 ++++ src/network/udp.c
 +@@ -383,7 +383,7 @@ int net_Subscribe (vlc_object_t *obj, in
 + {
 + /* MCAST_JOIN_GROUP was introduced to OS X in v10.7, but it doesn't work,
 +  * so ignore it to use the same code as on 10.5 or 10.6 */
 +-#if defined (MCAST_JOIN_GROUP) && !defined (__APPLE__)
 ++#if defined (MCAST_JOIN_GROUP) && !defined (__APPLE__) && !defined (__FreeBSD__)
 +     /* Agnostic SSM multicast join */
 +     int level;
 +     struct group_req gr;
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: nox 
State-Changed-When: Wed Sep 5 20:40:26 UTC 2012 
State-Changed-Why:  
(Partly) fix commited - the CXXFLAGS used in the PR are not actually 
supported. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171341 
>Unformatted:
