diff options
Diffstat (limited to 'www/firefox/files')
-rw-r--r-- | www/firefox/files/patch-bug722975 | 61 | ||||
-rw-r--r-- | www/firefox/files/patch-bug783463 | 28 | ||||
-rw-r--r-- | www/firefox/files/patch-bug803480 | 19 | ||||
-rw-r--r-- | www/firefox/files/patch-bug807492 | 1314 | ||||
-rw-r--r-- | www/firefox/files/patch-bug844818 | 126 | ||||
-rw-r--r-- | www/firefox/files/patch-bug862759 | 10 | ||||
-rw-r--r-- | www/firefox/files/patch-bug876156 | 13 | ||||
-rw-r--r-- | www/firefox/files/patch-bug886181 | 11 | ||||
-rw-r--r-- | www/firefox/files/patch-bug889699 | 175 | ||||
-rw-r--r-- | www/firefox/files/patch-bug893397 | 39 | ||||
-rw-r--r-- | www/firefox/files/patch-bug910875 | 102 | ||||
-rw-r--r-- | www/firefox/files/patch-bug916216 | 39 | ||||
-rw-r--r-- | www/firefox/files/patch-bug916589 | 40 | ||||
-rw-r--r-- | www/firefox/files/patch-build-pgo-profileserver.py | 23 | ||||
-rw-r--r-- | www/firefox/files/patch-duckduckgo | 11 | ||||
-rw-r--r-- | www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp | 20 | ||||
-rw-r--r-- | www/firefox/files/patch-media-webrtc-trunk-testing-gtest-include-gtest-internal-gtest-port.h | 17 | ||||
-rw-r--r-- | www/firefox/files/patch-no-videoio.h | 22 |
18 files changed, 462 insertions, 1608 deletions
diff --git a/www/firefox/files/patch-bug722975 b/www/firefox/files/patch-bug722975 deleted file mode 100644 index 21c28b19540b..000000000000 --- a/www/firefox/files/patch-bug722975 +++ /dev/null @@ -1,61 +0,0 @@ -# HG changeset patch -# Parent 9d3c9b863c697634e434b687d456bb82fa794ecf -# User Uli Schlachter <psychon@znc.in> -Bug 722975 - --enable-system-cairo build is broken after Bug 715658 fixed - - -diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp ---- gfx/thebes/gfxPlatform.cpp -+++ gfx/thebes/gfxPlatform.cpp -@@ -502,21 +502,19 @@ struct SourceSurfaceUserData - BackendType mBackendType; - }; - - void SourceBufferDestroy(void *srcSurfUD) - { - delete static_cast<SourceSurfaceUserData*>(srcSurfUD); - } - --void SourceSnapshotDetached(cairo_surface_t *nullSurf) -+void SourceSnapshotDetached(void *nullSurf) - { -- gfxImageSurface* origSurf = -- static_cast<gfxImageSurface*>(cairo_surface_get_user_data(nullSurf, &kSourceSurface)); -- -+ gfxImageSurface *origSurf = static_cast<gfxImageSurface*>(nullSurf); - origSurf->SetData(&kSourceSurface, NULL, NULL); - } - - RefPtr<SourceSurface> - gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface) - { - void *userData = aSurface->GetData(&kSourceSurface); - -@@ -621,24 +619,19 @@ gfxPlatform::GetSourceSurfaceForSurface( - } - - srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(), - imgSurface->Stride(), - size, format); - - } - -- cairo_surface_t *nullSurf = -- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA); -- cairo_surface_set_user_data(nullSurf, -- &kSourceSurface, -- imgSurface, -- NULL); -- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached); -- cairo_surface_destroy(nullSurf); -+ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic", -+ (const unsigned char *) "data", 4, -+ SourceSnapshotDetached, imgSurface.get()); - } - - SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData; - srcSurfUD->mBackendType = aTarget->GetType(); - srcSurfUD->mSrcSurface = srcBuffer; - aSurface->SetData(&kSourceSurface, srcSurfUD, SourceBufferDestroy); - - return srcBuffer; diff --git a/www/firefox/files/patch-bug783463 b/www/firefox/files/patch-bug783463 index b27a1997c534..dedbb7003927 100644 --- a/www/firefox/files/patch-bug783463 +++ b/www/firefox/files/patch-bug783463 @@ -1,14 +1,14 @@ ---- gfx/skia/Makefile.in~ -+++ gfx/skia/Makefile.in -@@ -339,10 +339,9 @@ CPPSRCS += \ - SkMMapStream.cpp \ - SkOSFile.cpp \ - $(NULL) --ifeq (Linux,$(OS_TARGET)) -+ifneq (,$(or $(MOZ_X11),$(filter Linux,$(OS_TARGET)))) - CPPSRCS += \ - SkFontHost_linux.cpp \ -- SkFontHost_tables.cpp \ - SkTime_Unix.cpp \ - $(NULL) - endif +--- gfx/skia/moz.build~ ++++ gfx/skia/moz.build +@@ -188,10 +188,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt + 'SkMMapStream.cpp', + 'SkOSFile.cpp', + ] +- if CONFIG['OS_TARGET'] == 'Linux': ++ if CONFIG['MOZ_X11'] == 1 or CONFIG['OS_TARGET'] == 'Linux': + CPP_SOURCES += [ + 'SkFontHost_linux.cpp', +- 'SkFontHost_tables.cpp', + 'SkThread_pthread.cpp', + 'SkTime_Unix.cpp', + ] diff --git a/www/firefox/files/patch-bug803480 b/www/firefox/files/patch-bug803480 index 1d99d93d7215..5f5b4fe7f392 100644 --- a/www/firefox/files/patch-bug803480 +++ b/www/firefox/files/patch-bug803480 @@ -75,15 +75,28 @@ index a0575dc..be327fd 100644 dnl dnl option to disable cookies diff --git netwerk/wifi/Makefile.in netwerk/wifi/Makefile.in -index 39d7364..e8d276b 100644 +index 26dbd79..4cbf912 100644 --- netwerk/wifi/Makefile.in +++ netwerk/wifi/Makefile.in -@@ -41,7 +41,7 @@ CPPSRCS += nsWifiScannerSolaris.cpp +@@ -20,7 +20,7 @@ ifeq ($(OS_ARCH),SunOS) OS_INCLUDES += $(GLIB_CFLAGS) endif -ifdef MOZ_ENABLE_DBUS +ifdef NECKO_WIFI_DBUS - CPPSRCS += nsWifiScannerDBus.cpp OS_INCLUDES += $(MOZ_DBUS_GLIB_CFLAGS) endif + +diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build +index 5e70211..07b01de 100644 +--- netwerk/wifi/moz.build ++++ netwerk/wifi/moz.build +@@ -43,7 +43,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS': + 'nsWifiScannerSolaris.cpp', + ] + +-if CONFIG['MOZ_ENABLE_DBUS']: ++if CONFIG['NECKO_WIFI_DBUS']: + CPP_SOURCES += [ + 'nsWifiScannerDBus.cpp', + ] diff --git a/www/firefox/files/patch-bug807492 b/www/firefox/files/patch-bug807492 index 4b4e90f52ba1..3b39766e0492 100644 --- a/www/firefox/files/patch-bug807492 +++ b/www/firefox/files/patch-bug807492 @@ -1,19 +1,4 @@ -diff --git config/system-headers config/system-headers -index 9bd1efa..1095a01 100644 ---- config/system-headers -+++ config/system-headers -@@ -1121,8 +1121,10 @@ gst/app/gstappsink.h - gst/app/gstappsrc.h - gst/video/video.h - sys/msg.h - sys/ipc.h - sys/thr.h - sys/user.h - kvm.h - spawn.h -+err.h -+xlocale.h -diff --git configure.in configure.in +JJdiff --git configure.in configure.in index c167461..8346c11 100644 --- configure.in +++ configure.in @@ -36,21 +21,6 @@ index c167461..8346c11 100644 ;; esac fi -diff --git js/src/config/system-headers js/src/config/system-headers -index 9bd1efa..1095a01 100644 ---- js/src/config/system-headers -+++ js/src/config/system-headers -@@ -1121,8 +1121,10 @@ gst/app/gstappsink.h - gst/app/gstappsrc.h - gst/video/video.h - sys/msg.h - sys/ipc.h - sys/thr.h - sys/user.h - kvm.h - spawn.h -+err.h -+xlocale.h diff --git media/mtransport/objs.mk media/mtransport/objs.mk index f1fc85f..141e8ca 100644 --- media/mtransport/objs.mk @@ -581,1288 +551,6 @@ index a30e330..cfbd8a3 100644 ifeq ($(OS_TARGET),Darwin) LIBS += \ -framework AudioToolbox \ -diff --git media/webrtc/trunk/webrtc/build/common.gypi media/webrtc/trunk/webrtc/build/common.gypi -index 9ca9f7c..d5c4ab9 100644 ---- media/webrtc/trunk/webrtc/build/common.gypi -+++ media/webrtc/trunk/webrtc/build/common.gypi -@@ -119,16 +119,21 @@ - # flood of chromium-style warnings. Investigate enabling them: - # http://code.google.com/p/webrtc/issues/detail?id=163 - 'clang_use_chrome_plugins%': 0, - - # Switch between Android audio device OpenSL ES implementation - # and Java Implementation - 'enable_android_opensl%': 0, - }], -+ ['OS=="linux" or OS=="solaris" or os_bsd==1', { -+ 'include_v4l2_video_capture%': 1, -+ }, { -+ 'include_v4l2_video_capture%': 0, -+ }], - ['OS=="ios"', { - 'enable_video%': 0, - 'enable_protobuf%': 0, - 'build_libjpeg%': 0, - 'build_libyuv%': 0, - 'build_libvpx%': 0, - 'include_tests%': 0, - }], -@@ -205,16 +210,28 @@ - 'defines': ['WEBRTC_ARCH_ARM_NEON', - 'WEBRTC_BUILD_NEON_LIBS', - 'WEBRTC_DETECT_ARM_NEON'], - }], - ], - }], - ], - }], -+ ['os_bsd==1', { -+ 'defines': [ -+ 'WEBRTC_BSD', -+ 'WEBRTC_THREAD_RR', -+ ], -+ }], -+ ['OS=="dragonfly" or OS=="netbsd"', { -+ 'defines': [ -+ # doesn't support pthread_condattr_setclock -+ 'WEBRTC_CLOCK_TYPE_REALTIME', -+ ], -+ }], - ['OS=="ios"', { - 'defines': [ - 'WEBRTC_MAC', - 'WEBRTC_IOS', - 'WEBRTC_THREAD_RR', - 'WEBRTC_CLOCK_TYPE_REALTIME', - ], - }], -diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc -index 203f09a..0b0b70e 100644 ---- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc -+++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc -@@ -41,17 +41,17 @@ bool AudioDeviceUtility::StringCompare( - const char* str1 , const char* str2, - const WebRtc_UWord32 length) - { - return ((_strnicmp(str1, str2, length) == 0) ? true : false); - } - - } // namespace webrtc - --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - // ============================================================================ - // Linux & Mac - // ============================================================================ - - #include <sys/time.h> // gettimeofday - #include <time.h> // gettimeofday - #include <string.h> // strncasecmp -@@ -104,11 +104,11 @@ WebRtc_UWord32 AudioDeviceUtility::GetTimeInMS() - bool AudioDeviceUtility::StringCompare( - const char* str1 , const char* str2, const WebRtc_UWord32 length) - { - return (strncasecmp(str1, str2, length) == 0)?true: false; - } - - } // namespace webrtc - --#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - -diff --git media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc -index bdad224..39e1132 100644 ---- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc -+++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc -@@ -7,16 +7,17 @@ - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - #include "modules/rtp_rtcp/source/forward_error_correction.h" - - #include <algorithm> - #include <cassert> -+#include <cstdlib> // for abs() - #include <cstring> - #include <iterator> - - #include "modules/rtp_rtcp/source/forward_error_correction_internal.h" - #include "modules/rtp_rtcp/source/rtp_utility.h" - #include "system_wrappers/interface/trace.h" - - namespace webrtc { -diff --git media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc -index 298d479..37b70c9 100644 ---- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc -+++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc -@@ -13,17 +13,17 @@ - #include <cassert> - #include <cmath> // ceil - #include <cstring> // memcpy - - #if defined(_WIN32) - #include <Windows.h> // FILETIME - #include <WinSock.h> // timeval - #include <MMSystem.h> // timeGetTime --#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC)) -+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC)) - #include <sys/time.h> // gettimeofday - #include <time.h> - #endif - #if (defined(_DEBUG) && defined(_WIN32) && (_MSC_VER >= 1400)) - #include <stdio.h> - #endif - - #include "system_wrappers/interface/tick_util.h" -@@ -151,17 +151,17 @@ void get_time(WindowsHelpTimer* help_timer, FILETIME& current_time) { - virtual WebRtc_Word64 GetTimeInMS(); - - virtual void CurrentNTP(WebRtc_UWord32& secs, WebRtc_UWord32& frac); - - private: - WindowsHelpTimer* _helpTimer; - }; - --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - // A clock reading times from the POSIX API. - class UnixSystemClock : public RtpRtcpClock { - public: - UnixSystemClock() {} - virtual ~UnixSystemClock() {} - - virtual WebRtc_Word64 GetTimeInMS(); -@@ -209,17 +209,17 @@ void WindowsSystemClock::CurrentNTP(WebRtc_UWord32& secs, - } else if (dtemp < -1) { - dtemp += 1; - secs--; - } - dtemp *= NTP_FRAC; - frac = (WebRtc_UWord32)dtemp; - } - --#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC)) -+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC)) - - WebRtc_Word64 UnixSystemClock::GetTimeInMS() { - return TickTime::MillisecondTimestamp(); - } - - // Use the system time. - void UnixSystemClock::CurrentNTP(WebRtc_UWord32& secs, WebRtc_UWord32& frac) { - double dtemp; -@@ -248,17 +248,17 @@ void UnixSystemClock::CurrentNTP(WebRtc_UWord32& secs, WebRtc_UWord32& frac) { - // Note that this is a POD. Only PODs are allowed to have static storage - // duration according to the Google Style guide. - static WindowsHelpTimer global_help_timer = {0, 0, {{ 0, 0}, 0}, 0}; - #endif - - RtpRtcpClock* GetSystemClock() { - #if defined(_WIN32) - return new WindowsSystemClock(&global_help_timer); --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return new UnixSystemClock(); - #else - return NULL; - #endif - } - - WebRtc_UWord32 GetCurrentRTP(RtpRtcpClock* clock, WebRtc_UWord32 freq) { - const bool use_global_clock = (clock == NULL); -@@ -325,17 +325,17 @@ WebRtc_UWord16 GetPayloadDataLength(const WebRtcRTPHeader* rtp_header, - return static_cast<WebRtc_UWord16>(length); - } - - #if defined(_WIN32) - bool StringCompare(const char* str1, const char* str2, - const WebRtc_UWord32 length) { - return (_strnicmp(str1, str2, length) == 0) ? true : false; - } --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - bool StringCompare(const char* str1, const char* str2, - const WebRtc_UWord32 length) { - return (strncasecmp(str1, str2, length) == 0) ? true : false; - } - #endif - - #if !defined(WEBRTC_LITTLE_ENDIAN) && !defined(WEBRTC_BIG_ENDIAN) - #error Either WEBRTC_LITTLE_ENDIAN or WEBRTC_BIG_ENDIAN must be defined -diff --git media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc -index e50db5d..70ad8a8 100644 ---- media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc -+++ media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc -@@ -13,60 +13,62 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> - #include <time.h> - - #if defined(_WIN32) - #include <winsock2.h> - #include <ws2tcpip.h> --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <arpa/inet.h> - #include <ctype.h> - #include <fcntl.h> - #include <netdb.h> -+#include <sys/socket.h> - #include <net/if.h> - #include <netinet/in.h> - #include <stdlib.h> - #include <sys/ioctl.h> --#include <sys/socket.h> - #include <sys/time.h> - #include <unistd.h> - #ifndef WEBRTC_IOS - #include <net/if_arp.h> - #endif - #endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) - - #if defined(WEBRTC_MAC) --#include <ifaddrs.h> - #include <machine/types.h> - #endif -+#if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) -+#include <ifaddrs.h> -+#endif - #if defined(WEBRTC_LINUX) - #include <linux/netlink.h> - #include <linux/rtnetlink.h> - #endif - - #include "common_types.h" - #include "critical_section_wrapper.h" - #include "rw_lock_wrapper.h" - #include "trace.h" - #include "typedefs.h" - #include "udp_socket_manager_wrapper.h" - --#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #define GetLastError() errno - - #define IFRSIZE ((int)(size * sizeof (struct ifreq))) - - #define NLMSG_OK_NO_WARNING(nlh,len) \ - ((len) >= (int)sizeof(struct nlmsghdr) && \ - (int)(nlh)->nlmsg_len >= (int)sizeof(struct nlmsghdr) && \ - (int)(nlh)->nlmsg_len <= (len)) - --#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - namespace webrtc { - - class SocketFactory : public UdpTransportImpl::SocketFactoryInterface { - public: - UdpSocketWrapper* CreateSocket(const WebRtc_Word32 id, - UdpSocketManager* mgr, - CallbackObj obj, -@@ -2366,17 +2368,17 @@ WebRtc_UWord32 UdpTransport::InetAddrIPV4(const char* ip) - { - return ::inet_addr(ip); - } - - WebRtc_Word32 UdpTransport::InetPresentationToNumeric(WebRtc_Word32 af, - const char* src, - void* dst) - { --#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - const WebRtc_Word32 result = inet_pton(af, src, dst); - return result > 0 ? 0 : -1; - - #elif defined(_WIN32) - SocketAddress temp; - int length=sizeof(SocketAddress); - - if(af == AF_INET) -@@ -2488,17 +2490,17 @@ WebRtc_Word32 UdpTransport::LocalHostAddressIPV6(char n_localIP[16]) - break; - }; - } - freeaddrinfo(result); - WEBRTC_TRACE(kTraceWarning, kTraceTransport, -1, - "getaddrinfo failed to find address"); - return -1; - --#elif defined(WEBRTC_MAC) -+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - struct ifaddrs* ptrIfAddrs = NULL; - struct ifaddrs* ptrIfAddrsStart = NULL; - - getifaddrs(&ptrIfAddrsStart); - ptrIfAddrs = ptrIfAddrsStart; - while(ptrIfAddrs) - { - if(ptrIfAddrs->ifa_addr->sa_family == AF_INET6) -@@ -2680,17 +2682,17 @@ WebRtc_Word32 UdpTransport::LocalHostAddress(WebRtc_UWord32& localIP) - } - else - { - WebRtc_Word32 error = WSAGetLastError(); - WEBRTC_TRACE(kTraceWarning, kTraceTransport, -1, - "gethostbyname failed, error:%d", error); - return -1; - } --#elif (defined(WEBRTC_MAC)) -+#elif (defined(WEBRTC_BSD) || defined(WEBRTC_MAC)) - char localname[255]; - if (gethostname(localname, 255) != -1) - { - hostent* localHost; - localHost = gethostbyname(localname); - if(localHost) - { - if(localHost->h_addrtype != AF_INET) -@@ -2819,17 +2821,17 @@ WebRtc_Word32 UdpTransport::IPAddress(const SocketAddress& address, - } - - source_port = address._sockaddr_in6.sin6_port; - } - // Convert port number to network byte order. - sourcePort = htons(source_port); - return 0; - -- #elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+ #elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - WebRtc_Word32 ipFamily = address._sockaddr_storage.sin_family; - const void* ptrNumericIP = NULL; - - if(ipFamily == AF_INET) - { - ptrNumericIP = &(address._sockaddr_in.sin_addr); - } - else if(ipFamily == AF_INET6) -diff --git media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc -index 69a52ec..7ac226c 100644 ---- media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc -+++ media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc -@@ -14,17 +14,17 @@ - #include <stdio.h> - - #include "critical_section_wrapper.h" - #include "trace.h" - - #if defined(_WIN32) - #include <Windows.h> - #include <mmsystem.h> --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <string.h> - #include <sys/time.h> - #include <time.h> - #endif - - #if (defined(_DEBUG) && defined(_WIN32)) - #define DEBUG_PRINT(expr) OutputDebugString(##expr) - #define DEBUG_PRINTP(expr, p) \ -@@ -233,17 +233,17 @@ bool RtpDumpImpl::RTCP(const WebRtc_UWord8* packet) const - return is_rtcp; - } - - // TODO (hellner): why is TickUtil not used here? - inline WebRtc_UWord32 RtpDumpImpl::GetTimeInMS() const - { - #if defined(_WIN32) - return timeGetTime(); --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - struct timeval tv; - struct timezone tz; - unsigned long val; - - gettimeofday(&tv, &tz); - val = tv.tv_sec * 1000 + tv.tv_usec / 1000; - return val; - #else -diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc -index 653ee16..8d6fd68 100644 ---- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc -+++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc -@@ -14,17 +14,23 @@ - #include <unistd.h> - #include <sys/ioctl.h> - #include <sys/stat.h> - #include <fcntl.h> - #include <stdio.h> - #include <stdlib.h> - - //v4l includes -+#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#include <sys/videoio.h> -+#elif defined(__sun) -+#include <sys/videodev2.h> -+#else - #include <linux/videodev2.h> -+#endif - - #include "ref_count.h" - #include "trace.h" - - - namespace webrtc - { - namespace videocapturemodule -diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc -index 12df1b3..424ea0a 100644 ---- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc -+++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc -@@ -7,22 +7,30 @@ - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - #include <sys/ioctl.h> - #include <unistd.h> - #include <sys/stat.h> - #include <fcntl.h> --#include <linux/videodev2.h> - #include <errno.h> - #include <stdio.h> - #include <sys/mman.h> - #include <string.h> - -+//v4l includes -+#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#include <sys/videoio.h> -+#elif defined(__sun) -+#include <sys/videodev2.h> -+#else -+#include <linux/videodev2.h> -+#endif -+ - #include <new> - - #include "ref_count.h" - #include "trace.h" - #include "thread_wrapper.h" - #include "critical_section_wrapper.h" - #include "video_capture_linux.h" - -diff --git media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc -index e3f7bb5..882cede 100644 ---- media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc -+++ media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc -@@ -49,17 +49,17 @@ WebRtc_Word32 DeviceInfoImpl::NumberOfCapabilities( - if (!deviceUniqueIdUTF8) - return -1; - - _apiLock.AcquireLockShared(); - - if (_lastUsedDeviceNameLength == strlen((char*) deviceUniqueIdUTF8)) - { - // Is it the same device that is asked for again. --#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - if(strncasecmp((char*)_lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength)==0) - #else - if (_strnicmp((char*) _lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength) == 0) - #endif -@@ -86,17 +86,17 @@ WebRtc_Word32 DeviceInfoImpl::GetCapability(const char* deviceUniqueIdUTF8, - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, - "deviceUniqueIdUTF8 parameter not set in call to GetCapability"); - return -1; - } - ReadLockScoped cs(_apiLock); - - if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8)) --#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - || (strncasecmp((char*)_lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength)!=0)) - #else - || (_strnicmp((char*) _lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength) != 0)) - #endif -@@ -150,17 +150,17 @@ WebRtc_Word32 DeviceInfoImpl::GetBestMatchedCapability( - { - - - if (!deviceUniqueIdUTF8) - return -1; - - ReadLockScoped cs(_apiLock); - if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8)) --#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - || (strncasecmp((char*)_lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength)!=0)) - #else - || (_strnicmp((char*) _lastUsedDeviceName, - (char*) deviceUniqueIdUTF8, - _lastUsedDeviceNameLength) != 0)) - #endif -diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi -index 0a9765e..8d4bbf4 100644 ---- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi -+++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi -@@ -43,17 +43,17 @@ - 'conditions': [ - ['include_internal_video_capture==0', { - 'sources': [ - 'external/device_info_external.cc', - 'external/video_capture_external.cc', - ], - }, { # include_internal_video_capture == 1 - 'conditions': [ -- ['OS=="linux"', { -+ ['include_v4l2_video_capture==1', { - 'include_dirs': [ - 'linux', - ], - 'sources': [ - 'linux/device_info_linux.cc', - 'linux/device_info_linux.h', - 'linux/video_capture_linux.cc', - 'linux/video_capture_linux.h', -@@ -152,31 +152,35 @@ - 'include_dirs': [ - 'include', - ], - 'sources': [ - 'test/video_capture_unittest.cc', - 'test/video_capture_main_mac.mm', - ], - 'conditions': [ -- ['OS=="mac" or OS=="linux"', { -+ ['OS!="win" and OS!="android"', { - 'cflags': [ - '-Wno-write-strings', - ], - 'ldflags': [ - '-lpthread -lm', - ], - }], -- ['OS=="linux"', { -+ ['include_v4l2_video_capture==1', { - 'libraries': [ -- '-lrt', - '-lXext', - '-lX11', - ], - }], -+ ['OS=="linux"', { -+ 'libraries': [ -+ '-lrt', -+ ], -+ }], - ['OS=="mac"', { - 'dependencies': [ - # Link with a special main for mac so we can use the webcam. - '<(webrtc_root)/test/test.gyp:test_support_main_threaded_mac', - ], - 'xcode_settings': { - # TODO(andrew): CoreAudio and AudioToolbox shouldn't be needed. - 'OTHER_LDFLAGS': [ -diff --git media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h -index 0cd85d0..45591be 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h -+++ media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h -@@ -6,17 +6,17 @@ - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - #ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_ - #define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_ - --#if defined(__linux__) && defined(__ELF__) -+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) - .section .note.GNU-stack,"",%progbits - #endif - - // Define the macros used in ARM assembly code, so that for Mac or iOS builds - // we add leading underscores for the function names. - #ifdef __APPLE__ - .macro GLOBAL_FUNCTION name - .global _\name -diff --git media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h -index 0cd85d0..45591be 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h -+++ media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h -@@ -189,17 +189,17 @@ inline WebRtc_Word64 TickTime::QueryOsForTicks() { - // 0x0fffffff ~3.1 days, the code will not take that long to execute - // so it must have been a wrap around. - if (old > 0xf0000000 && now < 0x0fffffff) { - num_wrap_time_get_time++; - } - } - result.ticks_ = now + (num_wrap_time_get_time << 32); - #endif --#elif defined(WEBRTC_LINUX) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - struct timespec ts; - // TODO(wu): Remove CLOCK_REALTIME implementation. - #ifdef WEBRTC_CLOCK_TYPE_REALTIME - clock_gettime(CLOCK_REALTIME, &ts); - #else - clock_gettime(CLOCK_MONOTONIC, &ts); - #endif - result.ticks_ = 1000000000LL * static_cast<WebRtc_Word64>(ts.tv_sec) + -@@ -236,34 +236,34 @@ inline WebRtc_Word64 TickTime::MillisecondTimestamp() { - #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (ticks * 1000) / qpfreq.QuadPart; - #else - return ticks; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000000LL; - #else - return ticks / 1000LL; - #endif - } - - inline WebRtc_Word64 TickTime::MicrosecondTimestamp() { - WebRtc_Word64 ticks = TickTime::Now().Ticks(); - #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (ticks * 1000) / (qpfreq.QuadPart / 1000); - #else - return ticks * 1000LL; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000LL; - #else - return ticks; - #endif - } - - inline WebRtc_Word64 TickTime::Ticks() const { - return ticks_; -@@ -273,33 +273,33 @@ inline WebRtc_Word64 TickTime::MillisecondsToTicks(const WebRtc_Word64 ms) { - #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (qpfreq.QuadPart * ms) / 1000; - #else - return ms; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ms * 1000000LL; - #else - return ms * 1000LL; - #endif - } - - inline WebRtc_Word64 TickTime::TicksToMilliseconds(const WebRtc_Word64 ticks) { - #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (ticks * 1000) / qpfreq.QuadPart; - #else - return ticks; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000000LL; - #else - return ticks / 1000LL; - #endif - } - - inline TickTime& TickTime::operator+=(const WebRtc_Word64& ticks) { - ticks_ += ticks; -@@ -318,17 +318,17 @@ inline WebRtc_Word64 TickInterval::Milliseconds() const { - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (interval_ * 1000) / qpfreq.QuadPart; - #else - // interval_ is in ms - return interval_; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - // interval_ is in ns - return interval_ / 1000000; - #else - // interval_ is usecs - return interval_ / 1000; - #endif - } - -@@ -337,17 +337,17 @@ inline WebRtc_Word64 TickInterval::Microseconds() const { - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (interval_ * 1000000) / qpfreq.QuadPart; - #else - // interval_ is in ms - return interval_ * 1000LL; - #endif --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - // interval_ is in ns - return interval_ / 1000; - #else - // interval_ is usecs - return interval_; - #endif - } - -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc -index 05b0e57..993456c 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc -@@ -7,17 +7,16 @@ - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - #include "atomic32.h" - - #include <assert.h> - #include <inttypes.h> --#include <malloc.h> - - #include "common_types.h" - - namespace webrtc { - - Atomic32::Atomic32(WebRtc_Word32 initial_value) - : value_(initial_value) { - assert(Is32bitAligned()); -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc -index b37d037..fcea221 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc -@@ -3,31 +3,33 @@ - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -+#include "condition_variable_wrapper.h" -+ - #if defined(_WIN32) - #include <windows.h> - #include "condition_variable_win.h" --#include "condition_variable_wrapper.h" --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <pthread.h> - #include "condition_variable_posix.h" --#include "condition_variable_wrapper.h" -+#else -+#include <stddef.h> // for NULL - #endif - - namespace webrtc { - - ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() { - #if defined(_WIN32) - return new ConditionVariableWindows; --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ConditionVariablePosix::Create(); - #else - return NULL; - #endif - } - - } // namespace webrtc -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc -index 48835ab..16c6033 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc -@@ -74,17 +74,17 @@ void ConditionVariablePosix::SleepCS(CriticalSectionWrapper& crit_sect) { - &crit_sect); - pthread_cond_wait(&cond_, &cs->mutex_); - } - - bool ConditionVariablePosix::SleepCS(CriticalSectionWrapper& crit_sect, - unsigned long max_time_inMS) { - const unsigned long INFINITE = 0xFFFFFFFF; - const int MILLISECONDS_PER_SECOND = 1000; --#ifndef WEBRTC_LINUX -+#if !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) - const int MICROSECONDS_PER_MILLISECOND = 1000; - #endif - const int NANOSECONDS_PER_SECOND = 1000000000; - const int NANOSECONDS_PER_MILLISECOND = 1000000; - - CriticalSectionPosix* cs = reinterpret_cast<CriticalSectionPosix*>( - &crit_sect); - -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc -index 3df5d18..4cd3ddf 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc -@@ -9,28 +9,28 @@ - */ - - #include "system_wrappers/interface/cpu_wrapper.h" - - #if defined(_WIN32) - #include "cpu_win.h" - #elif defined(WEBRTC_MAC) - #include "cpu_mac.h" --#elif defined(WEBRTC_ANDROID) -+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - // Not implemented yet, might be possible to use Linux implementation - #else // defined(WEBRTC_LINUX) - #include "cpu_linux.h" - #endif - - namespace webrtc { - CpuWrapper* CpuWrapper::CreateCpu() { - #if defined(_WIN32) - return new CpuWindows(); - #elif defined(WEBRTC_MAC) - return new CpuWrapperMac(); --#elif defined(WEBRTC_ANDROID) -+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - return 0; - #else - return new CpuLinux(); - #endif - } - - } // namespace webrtc -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc -index e367abf..e14d7af 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc -@@ -7,23 +7,25 @@ - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - #include "system_wrappers/interface/cpu_info.h" - - #if defined(_WIN32) - #include <Windows.h> --#elif defined(WEBRTC_MAC) --#include <sys/sysctl.h> -+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - #include <sys/types.h> -+#include <sys/sysctl.h> - #elif defined(WEBRTC_ANDROID) - // Not implemented yet, might be possible to use Linux implementation --#else // defined(WEBRTC_LINUX) -+#elif defined(WEBRTC_LINUX) - #include <sys/sysinfo.h> -+#else // defined(_SC_NPROCESSORS_ONLN) -+#include <unistd.h> - #endif - - #include "trace.h" - - namespace webrtc { - - WebRtc_UWord32 CpuInfo::number_of_cores_ = 0; - -@@ -36,29 +38,38 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCores() { - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", number_of_cores_); - - #elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) - number_of_cores_ = get_nprocs(); - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", number_of_cores_); - --#elif defined(WEBRTC_MAC) -- int name[] = {CTL_HW, HW_AVAILCPU}; -+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) -+ int name[] = { -+ CTL_HW, -+#ifdef HW_AVAILCPU -+ HW_AVAILCPU, -+#else -+ HW_NCPU, -+#endif -+ }; - int ncpu; - size_t size = sizeof(ncpu); - if (0 == sysctl(name, 2, &ncpu, &size, NULL, 0)) { - number_of_cores_ = static_cast<WebRtc_UWord32>(ncpu); - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", number_of_cores_); - } else { - WEBRTC_TRACE(kTraceError, kTraceUtility, -1, - "Failed to get number of cores"); - number_of_cores_ = 1; - } -+#elif defined(_SC_NPROCESSORS_ONLN) -+ _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN); - #else - WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1, - "No function to get number of cores"); - number_of_cores_ = 1; - #endif - } - return number_of_cores_; - } -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc -index 6334490..852ebaa 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc -@@ -54,16 +54,27 @@ - #ifdef WEBRTC_LINUX - #include <sys/types.h> - #include <sched.h> - #include <sys/syscall.h> - #include <linux/unistd.h> - #include <sys/prctl.h> - #endif - -+#if defined(__NetBSD__) -+#include <lwp.h> -+#elif defined(__FreeBSD__) -+#include <sys/param.h> -+#include <sys/thr.h> -+#endif -+ -+#if defined(WEBRTC_BSD) && !defined(__NetBSD__) -+#include <pthread_np.h> -+#endif -+ - #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" - #include "webrtc/system_wrappers/interface/event_wrapper.h" - #include "webrtc/system_wrappers/interface/trace.h" - - namespace webrtc { - - int ConvertToSystemPriority(ThreadPriority priority, int min_prio, - int max_prio) { -@@ -136,16 +147,30 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj, - } - } - - uint32_t ThreadWrapper::GetThreadId() { - #if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX) || defined(WEBRTC_GONK) - return static_cast<uint32_t>(syscall(__NR_gettid)); - #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) - return pthread_mach_thread_np(pthread_self()); -+#elif defined(__NetBSD__) -+ return _lwp_self(); -+#elif defined(__DragonFly__) -+ return lwp_gettid(); -+#elif defined(__OpenBSD__) -+ return reinterpret_cast<uintptr_t> (pthread_self()); -+#elif defined(__FreeBSD__) -+# if __FreeBSD_version > 900030 -+ return pthread_getthreadid_np(); -+# else -+ long lwpid; -+ thr_self(&lwpid); -+ return lwpid; -+# endif - #else - return reinterpret_cast<uint32_t>(pthread_self()); - #endif - } - - int ThreadPosix::Construct() { - int result = 0; - #if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) -@@ -167,17 +192,17 @@ int ThreadPosix::Construct() { - } - - ThreadPosix::~ThreadPosix() { - pthread_attr_destroy(&attr_); - delete event_; - delete crit_state_; - } - --#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) -+#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) - - bool ThreadPosix::Start(unsigned int& thread_id) - { - if (!run_function_) { - return false; - } - int result = pthread_attr_setdetachstate(&attr_, PTHREAD_CREATE_DETACHED); - // Set the stack stack size to 1M. -@@ -232,31 +257,40 @@ bool ThreadPosix::Start(unsigned int& thread_id) - WEBRTC_TRACE(kTraceError, kTraceUtility, -1, - "unable to set thread priority"); - } - return true; - } - - // CPU_ZERO and CPU_SET are not available in NDK r7, so disable - // SetAffinity on Android for now. --#if (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK))) -+#if defined(__FreeBSD__) || (defined(WEBRTC_LINUX) && \ -+ (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK))) - bool ThreadPosix::SetAffinity(const int* processor_numbers, - const unsigned int amount_of_processors) { - if (!processor_numbers || (amount_of_processors == 0)) { - return false; - } -+#if defined(__FreeBSD__) -+ cpuset_t mask; -+#else - cpu_set_t mask; -+#endif - CPU_ZERO(&mask); - - for (unsigned int processor = 0; - processor < amount_of_processors; - ++processor) { - CPU_SET(processor_numbers[processor], &mask); - } --#if defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK) -+#if defined(__FreeBSD__) -+ const int result = pthread_setaffinity_np(thread_, -+ sizeof(mask), -+ &mask); -+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_GONK) - // Android. - const int result = syscall(__NR_sched_setaffinity, - pid_, - sizeof(mask), - &mask); - #else - // "Normal" Linux. - const int result = sched_setaffinity(pid_, -@@ -320,16 +353,20 @@ void ThreadPosix::Run() { - pid_ = GetThreadId(); - #endif - // The event the Start() is waiting for. - event_->Set(); - - if (set_thread_name_) { - #ifdef WEBRTC_LINUX - prctl(PR_SET_NAME, (unsigned long)name_, 0, 0, 0); -+#elif defined(__NetBSD__) -+ pthread_setname_np(pthread_self(), "%s", (void *)name_); -+#elif defined(WEBRTC_BSD) -+ pthread_set_name_np(pthread_self(), name_); - #endif - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Thread with name:%s started ", name_); - } else { - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Thread without name started"); - } - bool alive = true; -diff --git media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc -index 2c7e59a..6f23fcb 100644 ---- media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc -+++ media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc -@@ -49,17 +49,17 @@ TracePosix::~TracePosix() { - WebRtc_Word32 TracePosix::AddTime(char* trace_message, - const TraceLevel level) const { - struct timeval system_time_high_res; - if (gettimeofday(&system_time_high_res, 0) == -1) { - return -1; - } - struct tm buffer; - const struct tm* system_time = -- localtime_r(&system_time_high_res.tv_sec, &buffer); -+ localtime_r((const time_t *)(&system_time_high_res.tv_sec), &buffer); - - const WebRtc_UWord32 ms_time = system_time_high_res.tv_usec / 1000; - WebRtc_UWord32 prev_tickCount = 0; - if (level == kTraceApiCall) { - prev_tickCount = prev_tick_count_; - prev_tick_count_ = ms_time; - } else { - prev_tickCount = prev_api_tick_count_; -diff --git media/webrtc/trunk/webrtc/typedefs.h media/webrtc/trunk/webrtc/typedefs.h -index 6334490..852ebaa 100644 ---- media/webrtc/trunk/webrtc/typedefs.h -+++ media/webrtc/trunk/webrtc/typedefs.h -@@ -16,17 +16,17 @@ - - // Reserved words definitions - // TODO(andrew): Remove this. - #define G_CONST const - - // For access to standard POSIXish features, use WEBRTC_POSIX instead of a - // more specific macro. - #if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || \ -- defined(WEBRTC_ANDROID) -+ defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - #define WEBRTC_POSIX - #endif - - // Processor architecture detection. For more info on what's defined, see: - // http://msdn.microsoft.com/en-us/library/b0084kay.aspx - // http://www.agner.org/optimize/calling_conventions.pdf - // or with gcc, run: "echo | gcc -E -dM -" - // TODO(andrew): replace WEBRTC_LITTLE_ENDIAN with WEBRTC_ARCH_LITTLE_ENDIAN. -diff --git media/webrtc/trunk/webrtc/video_engine/vie_defines.h media/webrtc/trunk/webrtc/video_engine/vie_defines.h -index 2cc18cc7..2c042a0 100644 ---- media/webrtc/trunk/webrtc/video_engine/vie_defines.h -+++ media/webrtc/trunk/webrtc/video_engine/vie_defines.h -@@ -168,17 +168,17 @@ inline int ChannelId(const int moduleId) { - - // Example: "Oct 10 2002 12:05:30 r". - #define BUILDINFO BUILDDATE TEXT(" ") BUILDTIME TEXT(" ") BUILDMODE - #define RENDER_MODULE_TYPE kRenderWindows - #endif - - // Linux specific. - #ifndef WEBRTC_ANDROID --#ifdef WEBRTC_LINUX -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - // Build information macros. - #if defined(_DEBUG) - #define BUILDMODE "d" - #elif defined(DEBUG) - #define BUILDMODE "d" - #elif defined(NDEBUG) - #define BUILDMODE "r" - #else -diff --git media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc -index 174abca..f8a2b2d 100644 ---- media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc -+++ media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc -@@ -467,17 +467,17 @@ int VoENetworkImpl::SetSendTOS(int channel, - int DSCP, - int priority, - bool useSetSockopt) - { - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "SetSendTOS(channel=%d, DSCP=%d, useSetSockopt=%d)", - channel, DSCP, useSetSockopt); - --#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_MAC) -+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) && !defined(WEBRTC_MAC) - _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceWarning, - "SetSendTOS() is not supported on this platform"); - return -1; - #endif - - #ifndef WEBRTC_EXTERNAL_TRANSPORT - if (!_shared->statistics().Initialized()) - { -@@ -523,17 +523,17 @@ int VoENetworkImpl::SetSendTOS(int channel, - return -1; - } - if (channelPtr->ExternalTransport()) - { - _shared->SetLastError(VE_EXTERNAL_TRANSPORT_ENABLED, kTraceError, - "SetSendTOS() external transport is enabled"); - return -1; - } --#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - useSetSockopt = true; - WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_shared->instance_id(), -1), - " force useSetSockopt=true since there is no alternative" - " implementation"); - #endif - - return channelPtr->SetSendTOS(DSCP, priority, useSetSockopt); - #else -@@ -546,17 +546,17 @@ int VoENetworkImpl::SetSendTOS(int channel, - int VoENetworkImpl::GetSendTOS(int channel, - int& DSCP, - int& priority, - bool& useSetSockopt) - { - WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), - "GetSendTOS(channel=%d)", channel); - --#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_MAC) -+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) && !defined(WEBRTC_MAC) - _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceWarning, - "GetSendTOS() is not supported on this platform"); - return -1; - #endif - #ifndef WEBRTC_EXTERNAL_TRANSPORT - if (!_shared->statistics().Initialized()) - { - _shared->SetLastError(VE_NOT_INITED, kTraceError); -diff --git media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h -index 7d4c729..4104719 100644 ---- media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h -+++ media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h -@@ -409,41 +409,43 @@ namespace webrtc - - #else - #define ANDROID_NOT_SUPPORTED(stat) - #endif // #ifdef WEBRTC_LINUX - - // *** WEBRTC_MAC *** - // including iPhone - --#ifdef WEBRTC_MAC -+#if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - #include <pthread.h> - #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <arpa/inet.h> - #include <stdio.h> - #include <string.h> - #include <stdlib.h> - #include <errno.h> - #include <sys/stat.h> - #include <unistd.h> - #include <fcntl.h> - #include <sched.h> - #include <sys/time.h> - #include <time.h> -+#if !defined(WEBRTC_BSD) - #include <AudioUnit/AudioUnit.h> - #if !defined(WEBRTC_IOS) - #include <CoreServices/CoreServices.h> - #include <CoreAudio/CoreAudio.h> - #include <AudioToolbox/DefaultAudioOutput.h> - #include <AudioToolbox/AudioConverter.h> - #include <CoreAudio/HostTime.h> - #endif -+#endif - - #define DWORD unsigned long int - #define WINAPI - #define LPVOID void * - #define FALSE 0 - #define TRUE 1 - #define SOCKADDR_IN struct sockaddr_in - #define UINT unsigned int -@@ -526,13 +528,13 @@ namespace webrtc - // Defines - // ---------------------------------------------------------------------------- - - #define IPHONE_NOT_SUPPORTED(stat) - #endif - - #else - #define IPHONE_NOT_SUPPORTED(stat) --#endif // #ifdef WEBRTC_MAC -+#endif // #if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - - - - #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H diff --git media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py index 338d0b7..2241d41 100644 --- media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py diff --git a/www/firefox/files/patch-bug844818 b/www/firefox/files/patch-bug844818 deleted file mode 100644 index 87151264c032..000000000000 --- a/www/firefox/files/patch-bug844818 +++ /dev/null @@ -1,126 +0,0 @@ -diff --git configure.in configure.in -index 7cd6e17..a1dbdf7 100644 ---- configure.in -+++ configure.in -@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th - fi - fi - -+# Keep libcubeb and audio_device backends in sync -+if test -n "$MOZ_ALSA"; then -+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1" -+else -+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0" -+fi -+if test -n "$MOZ_PULSEAUDIO"; then -+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1" -+else -+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0" -+fi -+ - # Don't try to compile sse4.1 code if toolchain doesn't support - if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then - EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" -diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi -index 8457737..dfc83ff 100644 ---- media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi -+++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi -@@ -45,11 +45,15 @@ - 'dummy/audio_device_utility_dummy.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['include_alsa_audio==1 or include_pulse_audio==1', { - 'include_dirs': [ - 'linux', - ], -- }], # OS==linux -+ 'defines': [ -+ # avoid pointless rename -+ 'WEBRTC_LINUX', -+ ], -+ }], # include_alsa_audio==1 or include_pulse_audio==1 - ['OS=="ios"', { - 'include_dirs': [ - 'ios', -@@ -74,14 +78,8 @@ - }], - ['include_internal_audio_device==1', { - 'sources': [ -- 'linux/alsasymboltable_linux.cc', -- 'linux/alsasymboltable_linux.h', -- 'linux/audio_device_alsa_linux.cc', -- 'linux/audio_device_alsa_linux.h', - 'linux/audio_device_utility_linux.cc', - 'linux/audio_device_utility_linux.h', -- 'linux/audio_mixer_manager_alsa_linux.cc', -- 'linux/audio_mixer_manager_alsa_linux.h', - 'linux/latebindingsymboltable_linux.cc', - 'linux/latebindingsymboltable_linux.h', - 'mac/audio_device_mac.cc', -@@ -116,28 +114,36 @@ - }, - }], - ['OS=="linux"', { -- 'defines': [ -- 'LINUX_ALSA', -- ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, -- 'conditions': [ -- ['include_pulse_audio==1', { -- 'defines': [ -- 'LINUX_PULSE', -- ], -- 'sources': [ -- 'linux/audio_device_pulse_linux.cc', -- 'linux/audio_device_pulse_linux.h', -- 'linux/audio_mixer_manager_pulse_linux.cc', -- 'linux/audio_mixer_manager_pulse_linux.h', -- 'linux/pulseaudiosymboltable_linux.cc', -- 'linux/pulseaudiosymboltable_linux.h', -- ], -- }], -+ }], -+ ['include_alsa_audio==1', { -+ 'defines': [ -+ 'LINUX_ALSA', -+ ], -+ 'sources': [ -+ 'linux/alsasymboltable_linux.cc', -+ 'linux/alsasymboltable_linux.h', -+ 'linux/audio_device_alsa_linux.cc', -+ 'linux/audio_device_alsa_linux.h', -+ 'linux/audio_mixer_manager_alsa_linux.cc', -+ 'linux/audio_mixer_manager_alsa_linux.h', -+ ], -+ }], -+ ['include_pulse_audio==1', { -+ 'defines': [ -+ 'LINUX_PULSE', -+ ], -+ 'sources': [ -+ 'linux/audio_device_pulse_linux.cc', -+ 'linux/audio_device_pulse_linux.h', -+ 'linux/audio_mixer_manager_pulse_linux.cc', -+ 'linux/audio_mixer_manager_pulse_linux.h', -+ 'linux/pulseaudiosymboltable_linux.cc', -+ 'linux/pulseaudiosymboltable_linux.h', - ], - }], - ['OS=="mac"', { -diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi -index b504d3d..e2eb127 100644 ---- media/webrtc/webrtc_config.gypi -+++ media/webrtc/webrtc_config.gypi -@@ -9,7 +9,6 @@ - 'include_internal_video_render': 0, - 'clang_use_chrome_plugins': 0, - 'enable_protobuf': 0, -- 'include_pulse_audio': 0, - 'include_tests': 0, - 'use_system_libjpeg': 1, - 'use_system_libvpx': 1, diff --git a/www/firefox/files/patch-bug862759 b/www/firefox/files/patch-bug862759 deleted file mode 100644 index c6ff6607f75c..000000000000 --- a/www/firefox/files/patch-bug862759 +++ /dev/null @@ -1,10 +0,0 @@ ---- js/src/frontend/ParseMaps.cpp~ -+++ js/src/frontend/ParseMaps.cpp -@@ -134,5 +134,5 @@ frontend::InitAtomMap(JSContext *cx, frontend::AtomIndexMap *indices, HeapPtrAto - } - } - --template class AtomDecls<FullParseHandler>; --template class AtomDecls<SyntaxParseHandler>; -+template class frontend::AtomDecls<FullParseHandler>; -+template class frontend::AtomDecls<SyntaxParseHandler>; diff --git a/www/firefox/files/patch-bug876156 b/www/firefox/files/patch-bug876156 new file mode 100644 index 000000000000..84ecf6170671 --- /dev/null +++ b/www/firefox/files/patch-bug876156 @@ -0,0 +1,13 @@ +diff --git mfbt/Atomics.h mfbt/Atomics.h +index d79af6c..40b9336 100644 +--- mfbt/Atomics.h ++++ mfbt/Atomics.h +@@ -35,7 +35,7 @@ + */ + # if !defined(__linux__) && !defined(__OpenBSD__) && \ + (__cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && \ +- __has_include(<atomic>) ++ __has_include_next(<atomic>) + # define MOZ_HAVE_CXX11_ATOMICS + # endif + /* diff --git a/www/firefox/files/patch-bug886181 b/www/firefox/files/patch-bug886181 new file mode 100644 index 000000000000..ed1c4df8348b --- /dev/null +++ b/www/firefox/files/patch-bug886181 @@ -0,0 +1,11 @@ +--- modules/libpref/src/init/all.js~ ++++ modules/libpref/src/init/all.js +@@ -193,7 +193,7 @@ pref("media.webm.enabled", true); + pref("media.dash.enabled", false); + #endif + #ifdef MOZ_GSTREAMER +-pref("media.gstreamer.enabled", false); ++pref("media.gstreamer.enabled", true); + #endif + #ifdef MOZ_WEBRTC + pref("media.navigator.enabled", true); diff --git a/www/firefox/files/patch-bug889699 b/www/firefox/files/patch-bug889699 new file mode 100644 index 000000000000..fef97da4ac50 --- /dev/null +++ b/www/firefox/files/patch-bug889699 @@ -0,0 +1,175 @@ +commit 7eb5827 +Author: Edwin Flores <eflores@mozilla.com> +Date: Sat Jul 20 12:03:08 2013 +1200 + + Bug 889699 - Make gstreamer backend return more accurate results for canPlayType() r=alessandro.d +--- + content/media/gstreamer/GStreamerFormatHelper.cpp | 90 +++++++++++++++++------ + 1 file changed, 66 insertions(+), 24 deletions(-) + +diff --git content/media/gstreamer/GStreamerFormatHelper.cpp content/media/gstreamer/GStreamerFormatHelper.cpp +index f05ff8f..39f1fdf 100644 +--- content/media/gstreamer/GStreamerFormatHelper.cpp ++++ content/media/gstreamer/GStreamerFormatHelper.cpp +@@ -6,7 +6,7 @@ + + #include "GStreamerFormatHelper.h" + #include "nsCharSeparatedTokenizer.h" +-#include "nsXPCOMStrings.h" ++#include "nsString.h" + #include "GStreamerLoader.h" + + #define ENTRY_FORMAT(entry) entry[0] +@@ -36,7 +36,7 @@ void GStreamerFormatHelper::Shutdown() { + } + } + +-char const *const GStreamerFormatHelper::mContainers[6][2] = { ++static char const *const sContainers[6][2] = { + {"video/mp4", "video/quicktime"}, + {"video/quicktime", "video/quicktime"}, + {"audio/mp4", "audio/x-m4a"}, +@@ -45,7 +45,7 @@ char const *const GStreamerFormatHelper::mContainers[6][2] = { + {"audio/mp3", "audio/mpeg, mpegversion=(int)1"}, + }; + +-char const *const GStreamerFormatHelper::mCodecs[9][2] = { ++static char const *const sCodecs[9][2] = { + {"avc1.42E01E", "video/x-h264"}, + {"avc1.42001E", "video/x-h264"}, + {"avc1.58A01E", "video/x-h264"}, +@@ -57,6 +57,15 @@ char const *const GStreamerFormatHelper::mCodecs[9][2] = { + {"mp3", "audio/mpeg, mpegversion=(int)1"}, + }; + ++static char const * const sDefaultCodecCaps[][2] = { ++ {"video/mp4", "video/x-h264"}, ++ {"video/quicktime", "video/x-h264"}, ++ {"audio/mp4", "audio/mpeg, mpegversion=(int)4"}, ++ {"audio/x-m4a", "audio/mpeg, mpegversion=(int)4"}, ++ {"audio/mp3", "audio/mpeg, layer=(int)3"}, ++ {"audio/mpeg", "audio/mpeg, layer=(int)3"} ++}; ++ + GStreamerFormatHelper::GStreamerFormatHelper() + : mFactories(nullptr), + mCookie(static_cast<uint32_t>(-1)) +@@ -66,15 +75,15 @@ GStreamerFormatHelper::GStreamerFormatHelper() + } + + mSupportedContainerCaps = gst_caps_new_empty(); +- for (unsigned int i = 0; i < G_N_ELEMENTS(mContainers); i++) { +- const char* capsString = mContainers[i][1]; ++ for (unsigned int i = 0; i < G_N_ELEMENTS(sContainers); i++) { ++ const char* capsString = sContainers[i][1]; + GstCaps* caps = gst_caps_from_string(capsString); + gst_caps_append(mSupportedContainerCaps, caps); + } + + mSupportedCodecCaps = gst_caps_new_empty(); +- for (unsigned int i = 0; i < G_N_ELEMENTS(mCodecs); i++) { +- const char* capsString = mCodecs[i][1]; ++ for (unsigned int i = 0; i < G_N_ELEMENTS(sCodecs); i++) { ++ const char* capsString = sCodecs[i][1]; + GstCaps* caps = gst_caps_from_string(capsString); + gst_caps_append(mSupportedCodecCaps, caps); + } +@@ -92,6 +101,41 @@ GStreamerFormatHelper::~GStreamerFormatHelper() { + g_list_free(mFactories); + } + ++static GstCaps * ++GetContainerCapsFromMIMEType(const char *aType) { ++ /* convert aMIMEType to gst container caps */ ++ const char* capsString = nullptr; ++ for (uint32_t i = 0; i < G_N_ELEMENTS(sContainers); i++) { ++ if (!strcmp(ENTRY_FORMAT(sContainers[i]), aType)) { ++ capsString = ENTRY_CAPS(sContainers[i]); ++ break; ++ } ++ } ++ ++ if (!capsString) { ++ /* we couldn't find any matching caps */ ++ return nullptr; ++ } ++ ++ return gst_caps_from_string(capsString); ++} ++ ++static GstCaps * ++GetDefaultCapsFromMIMEType(const char *aType) { ++ GstCaps *caps = GetContainerCapsFromMIMEType(aType); ++ ++ for (uint32_t i = 0; i < G_N_ELEMENTS(sDefaultCodecCaps); i++) { ++ if (!strcmp(sDefaultCodecCaps[i][0], aType)) { ++ GstCaps *tmp = gst_caps_from_string(sDefaultCodecCaps[i][1]); ++ ++ gst_caps_append(caps, tmp); ++ return caps; ++ } ++ } ++ ++ return nullptr; ++} ++ + bool GStreamerFormatHelper::CanHandleMediaType(const nsACString& aMIMEType, + const nsAString* aCodecs) { + if (!sLoadOK) { +@@ -101,7 +145,15 @@ bool GStreamerFormatHelper::CanHandleMediaType(const nsACString& aMIMEType, + const char *type; + NS_CStringGetData(aMIMEType, &type, NULL); + +- GstCaps* caps = ConvertFormatsToCaps(type, aCodecs); ++ GstCaps *caps; ++ if (aCodecs && !aCodecs->IsEmpty()) { ++ caps = ConvertFormatsToCaps(type, aCodecs); ++ } else { ++ // Get a minimal set of codec caps for this MIME type we should support so ++ // that we don't overreport MIME types we are able to play. ++ caps = GetDefaultCapsFromMIMEType(type); ++ } ++ + if (!caps) { + return false; + } +@@ -118,21 +170,11 @@ GstCaps* GStreamerFormatHelper::ConvertFormatsToCaps(const char* aMIMEType, + + unsigned int i; + +- /* convert aMIMEType to gst container caps */ +- const char* capsString = nullptr; +- for (i = 0; i < G_N_ELEMENTS(mContainers); i++) { +- if (!strcmp(ENTRY_FORMAT(mContainers[i]), aMIMEType)) { +- capsString = ENTRY_CAPS(mContainers[i]); +- break; +- } +- } +- +- if (!capsString) { +- /* we couldn't find any matching caps */ ++ GstCaps *caps = GetContainerCapsFromMIMEType(aMIMEType); ++ if (!caps) { + return nullptr; + } + +- GstCaps* caps = gst_caps_from_string(capsString); + /* container only */ + if (!aCodecs) { + return caps; +@@ -141,11 +183,11 @@ GstCaps* GStreamerFormatHelper::ConvertFormatsToCaps(const char* aMIMEType, + nsCharSeparatedTokenizer tokenizer(*aCodecs, ','); + while (tokenizer.hasMoreTokens()) { + const nsSubstring& codec = tokenizer.nextToken(); +- capsString = nullptr; ++ const char *capsString = nullptr; + +- for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) { +- if (codec.EqualsASCII(ENTRY_FORMAT(mCodecs[i]))) { +- capsString = ENTRY_CAPS(mCodecs[i]); ++ for (i = 0; i < G_N_ELEMENTS(sCodecs); i++) { ++ if (codec.EqualsASCII(ENTRY_FORMAT(sCodecs[i]))) { ++ capsString = ENTRY_CAPS(sCodecs[i]); + break; + } + } diff --git a/www/firefox/files/patch-bug893397 b/www/firefox/files/patch-bug893397 index b9bd05aaa7f3..4d755c2ebb17 100644 --- a/www/firefox/files/patch-bug893397 +++ b/www/firefox/files/patch-bug893397 @@ -11,27 +11,27 @@ index 549ad06..2878d9f 100644 NECKO_WIFI=1 ;; Linux) -diff --git netwerk/wifi/Makefile.in netwerk/wifi/Makefile.in +diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build index 07b01de..11706af 100644 ---- netwerk/wifi/Makefile.in -+++ netwerk/wifi/Makefile.in -@@ -32,6 +32,10 @@ CPPSRCS += nsWifiScannerMac.cpp - CMMSRCS = osx_corewlan.mm - endif - -+ifeq ($(OS_ARCH),FreeBSD) -+CPPSRCS += nsWifiScannerFreeBSD.cpp -+endif -+ - ifneq (,$(filter WINNT,$(OS_ARCH))) - CPPSRCS += nsWifiScannerWin.cpp - endif +--- netwerk/wifi/moz.build ++++ netwerk/wifi/moz.build +@@ -34,6 +34,10 @@ if CONFIG['OS_ARCH'] == 'Darwin': + CMMSRCS += [ + 'osx_corewlan.mm', + ] ++elif CONFIG['OS_ARCH'] == 'FreeBSD': ++ CPP_SOURCES += [ ++ 'nsWifiScannerFreeBSD.cpp', ++ ] + elif CONFIG['OS_ARCH'] == 'WINNT': + CPP_SOURCES += [ + 'nsWifiScannerWin.cpp', diff --git netwerk/wifi/nsWifiScannerFreeBSD.cpp netwerk/wifi/nsWifiScannerFreeBSD.cpp new file mode 100644 index 0000000..80d4cb6 --- /dev/null +++ netwerk/wifi/nsWifiScannerFreeBSD.cpp -@@ -0,0 +1,171 @@ +@@ -0,0 +1,172 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -158,10 +158,11 @@ index 0000000..80d4cb6 + + // log the data + LOG(( "FreeBSD access point: " -+ << "SSID: " << ssid << ", " -+ << "MAC: " << isr->isr_bssid << ", " -+ << "Strength: " << isr->isr_rssi ", " -+ << "Channel: " << isr->isr_freq << "MHz" )); ++ "SSID: %s, MAC: %02x-%02x-%02x-%02x-%02x-%02x, " ++ "Strength: %d, Channel: %dMHz\n", ++ ssid, isr->isr_bssid[0], isr->isr_bssid[1], isr->isr_bssid[2], ++ isr->isr_bssid[3], isr->isr_bssid[4], isr->isr_bssid[5], ++ isr->isr_rssi, isr->isr_freq)); + + // increment pointers + len -= isr->isr_len; diff --git a/www/firefox/files/patch-bug910875 b/www/firefox/files/patch-bug910875 new file mode 100644 index 000000000000..4f1d5a521e84 --- /dev/null +++ b/www/firefox/files/patch-bug910875 @@ -0,0 +1,102 @@ +diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc +index f231b1e..6087696 100644 +--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc ++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc +@@ -16,7 +16,9 @@ + #include <assert.h> + #include <string.h> + +-#if defined(_WIN32) ++#if defined(WEBRTC_DUMMY_AUDIO_BUILD) ++// do not include platform specific headers ++#elif defined(_WIN32) + #include "audio_device_utility_win.h" + #include "audio_device_wave_win.h" + #if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD) +@@ -32,14 +34,8 @@ + #include <stdlib.h> + #include "audio_device_utility_android.h" + #include "audio_device_jni_android.h" +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + #include "audio_device_utility_linux.h" +- #if defined(LINUX_ALSA) +- #include "audio_device_alsa_linux.h" +- #endif +- #if defined(LINUX_PULSE) +- #include "audio_device_pulse_linux.h" +- #endif + #elif defined(WEBRTC_IOS) + #include "audio_device_utility_ios.h" + #include "audio_device_ios.h" +@@ -47,6 +43,12 @@ + #include "audio_device_utility_mac.h" + #include "audio_device_mac.h" + #endif ++#if defined(LINUX_ALSA) ++ #include "audio_device_alsa_linux.h" ++#endif ++#if defined(LINUX_PULSE) ++ #include "audio_device_pulse_linux.h" ++#endif + #include "audio_device_dummy.h" + #include "audio_device_utility_dummy.h" + #include "critical_section_wrapper.h" +@@ -161,7 +163,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::Che + #elif defined(WEBRTC_ANDROID) + platform = kPlatformAndroid; + WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is ANDROID"); +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + platform = kPlatformLinux; + WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is LINUX"); + #elif defined(WEBRTC_IOS) +@@ -309,7 +311,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() + + // Create the *Linux* implementation of the Audio Device + // +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + if ((audioLayer == kLinuxPulseAudio) || (audioLayer == kPlatformDefaultAudio)) + { + #if defined(LINUX_PULSE) +@@ -355,7 +357,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() + // + ptrAudioDeviceUtility = new AudioDeviceUtilityLinux(Id()); + } +-#endif // #if defined(WEBRTC_LINUX) ++#endif // #if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + + // Create the *iPhone* implementation of the Audio Device + // +diff --git media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc +index defd7f8..906c4a2 100644 +--- media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc ++++ media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc +@@ -197,7 +197,7 @@ class AudioDeviceAPITest: public testing::Test { + // Create default implementation instance + EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create( + kId, AudioDeviceModule::kPlatformDefaultAudio)) != NULL); +-#elif defined(WEBRTC_LINUX) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create( + kId, AudioDeviceModule::kWindowsWaveAudio)) == NULL); + EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create( +@@ -1690,7 +1690,7 @@ TEST_F(AudioDeviceAPITest, CPULoad) { + + // TODO(kjellander): Fix flakiness causing failures on Windows. + // TODO(phoglund): Fix flakiness causing failures on Linux. +-#if !defined(_WIN32) && !defined(WEBRTC_LINUX) ++#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) + TEST_F(AudioDeviceAPITest, StartAndStopRawOutputFileRecording) { + // NOTE: this API is better tested in a functional test + CheckInitialPlayoutStates(); +@@ -1759,7 +1759,7 @@ TEST_F(AudioDeviceAPITest, StartAndStopRawInputFileRecording) { + // - size of raw_input_not_recording.pcm shall be 0 + // - size of raw_input_not_recording.pcm shall be > 0 + } +-#endif // !WIN32 && !WEBRTC_LINUX ++#endif // !WIN32 && !WEBRTC_LINUX && !defined(WEBRTC_BSD) + + TEST_F(AudioDeviceAPITest, RecordingSampleRate) { + uint32_t sampleRate(0); diff --git a/www/firefox/files/patch-bug916216 b/www/firefox/files/patch-bug916216 new file mode 100644 index 000000000000..ca82967fa78c --- /dev/null +++ b/www/firefox/files/patch-bug916216 @@ -0,0 +1,39 @@ +--- media/webrtc/trunk/build/build_config.h~ ++++ media/webrtc/trunk/build/build_config.h +@@ -37,9 +37,15 @@ + #elif defined(_WIN32) + #define OS_WIN 1 + #define TOOLKIT_VIEWS 1 +-#elif defined(__FreeBSD__) ++#elif defined(__DragonFly__) ++#define OS_DRAGONFLY 1 ++#define TOOLKIT_GTK ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + #define OS_FREEBSD 1 + #define TOOLKIT_GTK ++#elif defined(__NetBSD__) ++#define OS_NETBSD 1 ++#define TOOLKIT_GTK + #elif defined(__OpenBSD__) + #define OS_OPENBSD 1 + #define TOOLKIT_GTK +@@ -56,15 +62,15 @@ + + // For access to standard BSD features, use OS_BSD instead of a + // more specific macro. +-#if defined(OS_FREEBSD) || defined(OS_OPENBSD) ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ ++ || defined(OS_NETBSD) || defined(OS_OPENBSD) + #define OS_BSD 1 + #endif + + // For access to standard POSIXish features, use OS_POSIX instead of a + // more specific macro. +-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \ +- defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \ +- defined(OS_NACL) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ ++ defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL) + #define OS_POSIX 1 + #endif + diff --git a/www/firefox/files/patch-bug916589 b/www/firefox/files/patch-bug916589 new file mode 100644 index 000000000000..664a7b167314 --- /dev/null +++ b/www/firefox/files/patch-bug916589 @@ -0,0 +1,40 @@ +diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h +index 5b50785..7cf47d5 100644 +--- media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h ++++ media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h +@@ -31,11 +31,14 @@ + */ + +-#ifndef _SYS_QUEUE_H_ ++#if (defined(BSD) && !defined(__OpenBSD__)) || defined(DARWIN) ++#include_next <sys/queue.h> ++#elif !defined(_SYS_QUEUE_H_) + #define _SYS_QUEUE_H_ + +-#if !defined(__FreeBSD__) && !defined(DARWIN) + #include <stddef.h> +-#define __offsetof offsetof ++ ++#ifndef offsetof ++#define offsetof(type, field) ((size_t)(&((type *)0)->field)) + #endif + + #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ +@@ -43,8 +46,6 @@ + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) + +-// #define __offsetof(type, field) ((size_t)(&((type *)0)->field)) +- + /* + * This file defines four types of data structures: singly-linked lists, + * singly-linked tail queues, lists and tail queues. +@@ -285,7 +286,7 @@ struct { \ + (STAILQ_EMPTY((head)) ? \ + NULL : \ + ((struct type *) \ +- ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ ((char *)((head)->stqh_last) - offsetof(struct type, field)))) + + #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) + diff --git a/www/firefox/files/patch-build-pgo-profileserver.py b/www/firefox/files/patch-build-pgo-profileserver.py index fdab788f8fe4..31a3a0889c0a 100644 --- a/www/firefox/files/patch-build-pgo-profileserver.py +++ b/www/firefox/files/patch-build-pgo-profileserver.py @@ -1,18 +1,11 @@ --- build/pgo/profileserver.py.orig 2011-02-24 21:49:47.000000000 +0100 +++ build/pgo/profileserver.py 2011-02-24 21:50:30.000000000 +0100 -@@ -43,13 +43,13 @@ if __name__ == '__main__': - t.setDaemon(True) # don't hang on exit - t.start() - -- automation.setServerInfo("localhost", PORT) -+ automation.setServerInfo("127.0.0.1", PORT) - automation.initializeProfile(PROFILE_DIRECTORY) - browserEnv = automation.environment() - browserEnv["XPCOM_DEBUG_BREAK"] = "warn" - browserEnv["MOZ_JAR_LOG_FILE"] = MOZ_JAR_LOG_FILE +@@ -59,7 +59,7 @@ if __name__ == '__main__': + env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog) + print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"] -- url = "http://localhost:%d/index.html" % PORT -+ url = "http://127.0.0.1:%d/index.html" % PORT - appPath = os.path.join(SCRIPT_DIR, automation.DEFAULT_APP) - status = automation.runApp(url, browserEnv, appPath, PROFILE_DIRECTORY, {}, - debuggerInfo=debuggerInfo, +- cmdargs = ["http://localhost:%d/index.html" % PORT] ++ cmdargs = ["http://127.0.0.1:%d/index.html" % PORT] + runner = FirefoxRunner(profile=profile, + binary=build.get_binary_path(where="staged-package"), + cmdargs=cmdargs, diff --git a/www/firefox/files/patch-duckduckgo b/www/firefox/files/patch-duckduckgo index de6b18f3afc0..bc3a7e321f41 100644 --- a/www/firefox/files/patch-duckduckgo +++ b/www/firefox/files/patch-duckduckgo @@ -1,11 +1,7 @@ diff -r f2fa4ae74ee1 browser/locales/en-US/chrome/browser-region/region.properties --- browser/locales/en-US/chrome/browser-region/region.properties Mon Oct 24 22:54:18 2011 +0300 +++ browser/locales/en-US/chrome/browser-region/region.properties Tue Oct 25 21:13:40 2011 -0400 -@@ -4,15 +4,16 @@ - # Default search engine - browser.search.defaultenginename=Google - - # Search engine order (order displayed in the search bar dropdown)s +@@ -9,6 +9,7 @@ browser.search.order.1=Google browser.search.order.2=Yahoo browser.search.order.3=Bing @@ -13,11 +9,6 @@ diff -r f2fa4ae74ee1 browser/locales/en-US/chrome/browser-region/region.properti # This is the default set of web based feed handlers shown in the reader # selection UI - browser.contentHandlers.types.0.title=My Yahoo! - browser.contentHandlers.types.0.uri=http://add.my.yahoo.com/rss?url=%s - - # increment this number when anything gets changed in the list below. This will - # cause Firefox to re-read these prefs and inject any new handlers into the --- /dev/null 2013-02-09 00:33:00.000000000 +0100 +++ browser/locales/en-US/searchplugins/duckduckgo.xml 2013-02-09 00:40:19.000000000 +0100 @@ -0,0 +1,11 @@ diff --git a/www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp b/www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp deleted file mode 100644 index d29c15ccc05a..000000000000 --- a/www/firefox/files/patch-js-src-methodjit-MethodJIT.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- js/src/methodjit/MethodJIT.cpp~ -+++ js/src/methodjit/MethodJIT.cpp -@@ -171,7 +171,7 @@ - - JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0); - --#if defined(__linux__) && defined(JS_CPU_X64) -+#if defined(__ELF__) && defined(JS_CPU_X64) - # define SYMBOL_STRING_RELOC(name) #name "@plt" - #else - # define SYMBOL_STRING_RELOC(name) SYMBOL_STRING(name) -@@ -149,7 +149,7 @@ - - #if defined(XP_MACOSX) - # define HIDE_SYMBOL(name) ".private_extern _" #name --#elif defined(__linux__) -+#elif defined(__ELF__) - # define HIDE_SYMBOL(name) ".hidden" #name - #else - # define HIDE_SYMBOL(name) diff --git a/www/firefox/files/patch-media-webrtc-trunk-testing-gtest-include-gtest-internal-gtest-port.h b/www/firefox/files/patch-media-webrtc-trunk-testing-gtest-include-gtest-internal-gtest-port.h deleted file mode 100644 index 14c7d3a684a9..000000000000 --- a/www/firefox/files/patch-media-webrtc-trunk-testing-gtest-include-gtest-internal-gtest-port.h +++ /dev/null @@ -1,17 +0,0 @@ ---- media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-port.h.orig 2012-12-09 16:28:45.641625374 +0100 -+++ media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-port.h 2012-12-09 19:09:11.664625374 +0100 -@@ -490,10 +490,10 @@ - # define GTEST_ENV_HAS_TR1_TUPLE_ 1 - # endif - --// C++11 specifies that <tuple> provides std::tuple. Users can't use --// gtest in C++11 mode until their standard library is at least that --// compliant. --# if GTEST_LANG_CXX11 -+// C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used -+// in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6 -+// can build with clang but need to use gcc4.2's libstdc++). -+# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325) - # define GTEST_ENV_HAS_STD_TUPLE_ 1 - # endif - diff --git a/www/firefox/files/patch-no-videoio.h b/www/firefox/files/patch-no-videoio.h new file mode 100644 index 000000000000..c20c0e039827 --- /dev/null +++ b/www/firefox/files/patch-no-videoio.h @@ -0,0 +1,22 @@ +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc +@@ -19,7 +19,7 @@ + #include <stdlib.h> + + //v4l includes +-#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + #include <sys/videoio.h> + #elif defined(__sun) + #include <sys/videodev2.h> +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc +@@ -18,7 +18,7 @@ + #include <string.h> + + //v4l includes +-#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + #include <sys/videoio.h> + #elif defined(__sun) + #include <sys/videodev2.h> |