socketpair.h 581 B

12345678910111213141516171819
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #ifndef TOR_SOCKETPAIR_H
  6. #define TOR_SOCKETPAIR_H
  7. #include "orconfig.h"
  8. #include "lib/testsupport/testsupport.h"
  9. #include "lib/net/nettypes.h"
  10. #if !defined(HAVE_SOCKETPAIR) || defined(_WIN32) || defined(TOR_UNIT_TESTS)
  11. #define NEED_ERSATZ_SOCKETPAIR
  12. int tor_ersatz_socketpair(int family, int type, int protocol,
  13. tor_socket_t fd[2]);
  14. #endif
  15. #endif