- Always include <sys/types.h> in affected files, not only when building

with GCC [1]
- Fix inclusion of some other headers [2]
- Fix build with libc++ [3]

Submitted by:	jkim [1-3]
Tested by:	jkim, bapt, myself
Obtained from:	upstream [2]
This commit is contained in:
Rene Ladan 2013-09-15 16:36:16 +00:00
parent cf0ecd6699
commit 79095c847f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=327345
9 changed files with 385 additions and 29 deletions

View file

@ -141,6 +141,9 @@ CXX= clang++
.endif
GYP_DEFINES+= clang=1
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang
.if ${OSVERSION} >= 1000054
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libc++
.endif
.endif
.if ${PORT_OPTIONS:MTEST}

View file

@ -28,26 +28,3 @@
#include <string>
#include "base/gtest_prod_util.h"
--- third_party/libjingle/source/talk/base/network.h.orig 2013-05-26 21:44:12.257312749 +0200
+++ third_party/libjingle/source/talk/base/network.h 2013-05-26 21:45:08.869297313 +0200
@@ -38,6 +38,10 @@
#include "talk/base/messagehandler.h"
#include "talk/base/sigslot.h"
+#if defined(OS_FREEBSD)
+#include <sys/types.h>
+#endif
+
#if defined(POSIX)
struct ifaddrs;
#endif // defined(POSIX)
--- base/sys_info_freebsd.cc.orig 2013-05-17 22:44:42.000000000 +0200
+++ base/sys_info_freebsd.cc 2013-05-26 22:57:45.885322785 +0200
@@ -4,6 +4,7 @@
#include "base/sys_info.h"
+#include <sys/types.h>
#include <sys/sysctl.h>
#include "base/logging.h"

View file

@ -0,0 +1,314 @@
--- AUTHORS.orig 2013-09-03 03:10:29.000000000 -0400
+++ AUTHORS 2013-09-13 13:21:24.000000000 -0400
@@ -268,3 +268,4 @@
Jingwei Liu <kingweiliu@gmail.com>
Zheng Chuang <zhengchuangscu@gmail.com>
Kevin M. McCormick <mckev@amazon.com>
+Zeno Albisser <zeno.albisser@digia.com>
--- content/browser/renderer_host/pepper/browser_ppapi_host_impl.h.orig 2013-09-03 03:09:02.000000000 -0400
+++ content/browser/renderer_host/pepper/browser_ppapi_host_impl.h 2013-09-12 18:01:57.000000000 -0400
@@ -13,6 +13,7 @@
#include "base/files/file_path.h"
#include "content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h"
#include "content/common/content_export.h"
+#include "content/common/pepper_renderer_instance_data.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/common/process_type.h"
#include "ipc/ipc_channel_proxy.h"
@@ -20,8 +21,6 @@
namespace content {
-struct PepperRendererInstanceData;
-
class CONTENT_EXPORT BrowserPpapiHostImpl : public BrowserPpapiHost {
public:
// The creator is responsible for calling set_plugin_process_handle as soon
--- content/browser/in_process_webkit/indexed_db_dispatcher_host.h.orig 2013-09-03 03:09:01.000000000 -0400
+++ content/browser/in_process_webkit/indexed_db_dispatcher_host.h 2013-09-12 18:03:26.000000000 -0400
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/id_map.h"
#include "content/public/browser/browser_message_filter.h"
+#include "url/gurl.h"
-class GURL;
struct IndexedDBDatabaseMetadata;
struct IndexedDBHostMsg_DatabaseCount_Params;
struct IndexedDBHostMsg_DatabaseCreateIndex_Params;
--- content/public/test/test_file_error_injector.h.orig 2013-09-03 03:08:59.000000000 -0400
+++ content/public/test/test_file_error_injector.h 2013-09-12 18:02:11.000000000 -0400
@@ -13,8 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
#include "content/public/browser/download_interrupt_reasons.h"
-
-class GURL;
+#include "url/gurl.h"
namespace content {
--- content/renderer/media/media_stream_center.h.orig 2013-09-03 03:08:58.000000000 -0400
+++ content/renderer/media/media_stream_center.h 2013-09-12 18:02:11.000000000 -0400
@@ -11,6 +11,7 @@
#include "third_party/WebKit/public/platform/WebMediaStream.h"
#include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
+#include "third_party/WebKit/public/platform/WebMediaStreamTrackSourcesRequest.h"
namespace WebKit {
class WebMediaStreamCenterClient;
--- net/http/http_auth_cache.h.orig 2013-09-03 03:10:07.000000000 -0400
+++ net/http/http_auth_cache.h 2013-09-12 18:02:08.000000000 -0400
@@ -26,7 +26,77 @@
// Entries can be looked up by either (origin, realm, scheme) or (origin, path).
class NET_EXPORT_PRIVATE HttpAuthCache {
public:
- class Entry;
+ class NET_EXPORT_PRIVATE Entry {
+ public:
+ ~Entry();
+
+ const GURL& origin() const {
+ return origin_;
+ }
+
+ // The case-sensitive realm string of the challenge.
+ const std::string realm() const {
+ return realm_;
+ }
+
+ // The authentication scheme of the challenge.
+ HttpAuth::Scheme scheme() const {
+ return scheme_;
+ }
+
+ // The authentication challenge.
+ const std::string auth_challenge() const {
+ return auth_challenge_;
+ }
+
+ // The login credentials.
+ const AuthCredentials& credentials() const {
+ return credentials_;
+ }
+
+ int IncrementNonceCount() {
+ return ++nonce_count_;
+ }
+
+ void UpdateStaleChallenge(const std::string& auth_challenge);
+
+ private:
+ friend class HttpAuthCache;
+ FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddPath);
+ FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddToExistingEntry);
+
+ typedef std::list<std::string> PathList;
+
+ Entry();
+
+ // Adds a path defining the realm's protection space. If the path is
+ // already contained in the protection space, is a no-op.
+ void AddPath(const std::string& path);
+
+ // Returns true if |dir| is contained within the realm's protection
+ // space. |*path_len| is set to the length of the enclosing path if
+ // such a path exists and |path_len| is non-NULL. If no enclosing
+ // path is found, |*path_len| is left unmodified.
+ //
+ // Note that proxy auth cache entries are associated with empty
+ // paths. Therefore it is possible for HasEnclosingPath() to return
+ // true and set |*path_len| to 0.
+ bool HasEnclosingPath(const std::string& dir, size_t* path_len);
+
+ // |origin_| contains the {protocol, host, port} of the server.
+ GURL origin_;
+ std::string realm_;
+ HttpAuth::Scheme scheme_;
+
+ // Identity.
+ std::string auth_challenge_;
+ AuthCredentials credentials_;
+
+ int nonce_count_;
+
+ // List of paths that define the realm's protection space.
+ PathList paths_;
+ };
// Prevent unbounded memory growth. These are safeguards for abuse; it is
// not expected that the limits will be reached in ordinary usage.
@@ -106,78 +176,6 @@
};
// An authentication realm entry.
-class NET_EXPORT_PRIVATE HttpAuthCache::Entry {
- public:
- ~Entry();
-
- const GURL& origin() const {
- return origin_;
- }
-
- // The case-sensitive realm string of the challenge.
- const std::string realm() const {
- return realm_;
- }
-
- // The authentication scheme of the challenge.
- HttpAuth::Scheme scheme() const {
- return scheme_;
- }
-
- // The authentication challenge.
- const std::string auth_challenge() const {
- return auth_challenge_;
- }
-
- // The login credentials.
- const AuthCredentials& credentials() const {
- return credentials_;
- }
-
- int IncrementNonceCount() {
- return ++nonce_count_;
- }
-
- void UpdateStaleChallenge(const std::string& auth_challenge);
-
- private:
- friend class HttpAuthCache;
- FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddPath);
- FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddToExistingEntry);
-
- typedef std::list<std::string> PathList;
-
- Entry();
-
- // Adds a path defining the realm's protection space. If the path is
- // already contained in the protection space, is a no-op.
- void AddPath(const std::string& path);
-
- // Returns true if |dir| is contained within the realm's protection
- // space. |*path_len| is set to the length of the enclosing path if
- // such a path exists and |path_len| is non-NULL. If no enclosing
- // path is found, |*path_len| is left unmodified.
- //
- // Note that proxy auth cache entries are associated with empty
- // paths. Therefore it is possible for HasEnclosingPath() to return
- // true and set |*path_len| to 0.
- bool HasEnclosingPath(const std::string& dir, size_t* path_len);
-
- // |origin_| contains the {protocol, host, port} of the server.
- GURL origin_;
- std::string realm_;
- HttpAuth::Scheme scheme_;
-
- // Identity.
- std::string auth_challenge_;
- AuthCredentials credentials_;
-
- int nonce_count_;
-
- // List of paths that define the realm's protection space.
- PathList paths_;
-};
-
} // namespace net
#endif // NET_HTTP_HTTP_AUTH_CACHE_H_
--- ui/gfx/image/image_family.h.orig 2013-09-03 03:09:09.000000000 -0400
+++ ui/gfx/image/image_family.h 2013-09-12 18:02:08.000000000 -0400
@@ -27,8 +27,16 @@
// include high-DPI representations).
class UI_EXPORT ImageFamily {
private:
- // Forward declaration.
- struct MapKey;
+ // An <aspect ratio, DIP width> pair.
+ // A 0x0 image has aspect ratio 1.0. 0xN and Nx0 images are treated as 0x0.
+ struct MapKey : std::pair<float, int> {
+ MapKey(float aspect, int width)
+ : std::pair<float, int>(aspect, width) {}
+
+ float aspect() const { return first; }
+
+ int width() const { return second; }
+ };
public:
// Type for iterating over all images in the family, in order.
@@ -127,17 +135,6 @@
const gfx::Image* GetBest(const gfx::Size& size) const;
private:
- // An <aspect ratio, DIP width> pair.
- // A 0x0 image has aspect ratio 1.0. 0xN and Nx0 images are treated as 0x0.
- struct MapKey : std::pair<float, int> {
- MapKey(float aspect, int width)
- : std::pair<float, int>(aspect, width) {}
-
- float aspect() const { return first; }
-
- int width() const { return second; }
- };
-
// Find the closest aspect ratio in the map to |desired_aspect|.
// Ties are broken by the thinner aspect.
// |map_| must not be empty. |desired_aspect| must be > 0.0.
--- webkit/browser/dom_storage/dom_storage_namespace.h.orig 2013-09-03 03:10:02.000000000 -0400
+++ webkit/browser/dom_storage/dom_storage_namespace.h 2013-09-12 18:05:35.000000000 -0400
@@ -11,8 +11,7 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "webkit/browser/webkit_storage_browser_export.h"
-
-class GURL;
+#include "url/gurl.h"
namespace dom_storage {
--- webkit/support/weburl_loader_mock_factory.cc.orig 2013-09-03 03:10:02.000000000 -0400
+++ webkit/support/weburl_loader_mock_factory.cc 2013-09-12 18:02:11.000000000 -0400
@@ -23,11 +23,6 @@
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-struct WebURLLoaderMockFactory::ResponseInfo {
- WebKit::WebURLResponse response;
- base::FilePath file_path;
-};
-
WebURLLoaderMockFactory::WebURLLoaderMockFactory() {}
WebURLLoaderMockFactory::~WebURLLoaderMockFactory() {}
--- webkit/support/weburl_loader_mock_factory.h.orig 2013-09-03 03:10:02.000000000 -0400
+++ webkit/support/weburl_loader_mock_factory.h 2013-09-12 18:02:11.000000000 -0400
@@ -9,12 +9,12 @@
#include "base/files/file_path.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
namespace WebKit {
class WebData;
-struct WebURLError;
class WebURLLoader;
}
@@ -75,7 +75,11 @@
void CancelLoad(WebURLLoaderMock* loader);
private:
- struct ResponseInfo;
+ struct ResponseInfo {
+ WebKit::WebURLResponse response;
+ base::FilePath file_path;
+ };
+
// Loads the specified request and populates the response, error and data
// accordingly.

View file

@ -1,6 +1,14 @@
--- base/sys_info_freebsd.cc.orig 2012-11-27 10:01:52.000000000 +0200
+++ base/sys_info_freebsd.cc 2012-12-09 18:04:30.000000000 +0200
@@ -23,6 +23,19 @@
--- base/sys_info_freebsd.cc.orig 2013-09-03 03:09:04.000000000 -0400
+++ base/sys_info_freebsd.cc 2013-09-12 14:46:12.000000000 -0400
@@ -4,6 +4,7 @@
#include "base/sys_info.h"
+#include <sys/types.h>
#include <sys/sysctl.h>
#include "base/logging.h"
@@ -23,6 +24,19 @@
}
// static
@ -20,7 +28,7 @@
size_t SysInfo::MaxSharedMemorySize() {
size_t limit;
size_t size = sizeof(limit);
@@ -33,4 +46,25 @@
@@ -33,4 +47,25 @@
return limit;
}

View file

@ -0,0 +1,11 @@
--- chrome/browser/ui/gtk/accelerators_gtk.h.orig 2013-09-13 13:12:50.000000000 -0400
+++ chrome/browser/ui/gtk/accelerators_gtk.h 2013-09-13 13:13:09.000000000 -0400
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_GTK_ACCELERATORS_GTK_H_
#define CHROME_BROWSER_UI_GTK_ACCELERATORS_GTK_H_
+#include <vector>
+
#include "base/containers/hash_tables.h"
#include "ui/base/accelerators/accelerator.h"

View file

@ -0,0 +1,13 @@
--- third_party/libjingle/source/talk/base/network.h.orig 2013-05-26 21:44:12.257312749 +0200
+++ third_party/libjingle/source/talk/base/network.h 2013-05-26 21:45:08.869297313 +0200
@@ -38,6 +38,10 @@
#include "talk/base/messagehandler.h"
#include "talk/base/sigslot.h"
+#if defined(OS_FREEBSD)
+#include <sys/types.h>
+#endif
+
#if defined(POSIX)
struct ifaddrs;
#endif // defined(POSIX)

View file

@ -1,5 +1,14 @@
--- third_party/libjingle/source/talk/base/systeminfo.cc.orig 2013-07-15 17:40:34.000000000 +0300
+++ third_party/libjingle/source/talk/base/systeminfo.cc 2013-07-15 17:41:14.000000000 +0300
--- third_party/libjingle/source/talk/base/systeminfo.cc.orig 2013-09-03 03:20:59.000000000 -0400
+++ third_party/libjingle/source/talk/base/systeminfo.cc 2013-09-12 15:47:30.000000000 -0400
@@ -36,7 +36,7 @@
#elif defined(OSX)
#include <ApplicationServices/ApplicationServices.h>
#include <CoreServices/CoreServices.h>
-#elif defined(LINUX) || defined(ANDROID)
+#elif defined(LINUX) || defined(ANDROID) || defined(BSD)
#include <unistd.h>
#endif
#if defined(OSX) || defined(IOS)
@@ -48,7 +48,7 @@
#include "talk/base/win32.h"
#elif defined(OSX)

View file

@ -0,0 +1,10 @@
--- third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig 2013-09-03 03:23:27.000000000 -0400
+++ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc 2013-09-12 14:54:49.000000000 -0400
@@ -12,6 +12,7 @@
#include <algorithm>
#include <cassert>
+#include <cstdlib>
#include <cstring>
#include <iterator>

View file

@ -0,0 +1,11 @@
--- third_party/webrtc/video_engine/stream_synchronization.cc.orig 2013-09-03 03:23:20.000000000 -0400
+++ third_party/webrtc/video_engine/stream_synchronization.cc 2013-09-12 15:58:27.000000000 -0400
@@ -12,7 +12,7 @@
#include <algorithm>
#include <assert.h>
-#include <cmath>
+#include <cstdlib>
#include "webrtc/system_wrappers/interface/trace.h"