Update socket_libevent.cc to build on android

Android ships with crazy old system headers that don't include the
SOCK_NONBLOCK define. Since this is easy to live without, update the
domain socket code to set the socket to nonblocking using an fcntl when
built without this define. Still use SOCK_NONBLOCK when available since
it's cheaper to avoid the fcntl.

R=cmasone@chromium.org

Review URL: https://codereview.chromium.org/670773004
1 file changed
tree: b0beb82fc758971e740ea0d9edd917750ead4082
  1. base/
  2. build/
  3. cc/
  4. crypto/
  5. gin/
  6. gpu/
  7. mojo/
  8. net/
  9. sandbox/
  10. sdch/
  11. skia/
  12. sky/
  13. testing/
  14. third_party/
  15. tools/
  16. ui/
  17. url/
  18. .clang-format
  19. .gitattributes
  20. .gitignore
  21. .gn
  22. AUTHORS
  23. BUILD.gn
  24. codereview.settings
  25. DEPS
  26. LICENSE
  27. OWNERS
  28. PRESUBMIT.py
  29. PRESUBMIT_test.py
  30. README.md
  31. WATCHLISTS
README.md

Mojo

This repo uses gclient to manage dependencies, so to build things from this repo you have to first download depot_tools and make sure it is in your path:

http://www.chromium.org/developers/how-tos/install-depot-tools

Then, create a directory somewhere for your checkout, cd into it, and run the following commands:

$ fetch mojo # use --target_os=android if you want an Android build.
$ cd src
$ ./build/install-build-deps.sh

This creates a directory called ‘src’ under your checkout directory, clones the repository and its dependencies, and installs any packages needed to build.

You can then build Mojo by running:

$ gn gen out/Debug
$ ninja -C out/Debug root

If you're a Googler and want to use Goma:

$ gn args out/Debug

and add

use_goma = true

Assuming Goma is installed in the default location (~/goma).

Run the tests:

mojo/tools/mojob.sh test