Merge changes If5359c26,I5d09be41

* changes:
  Use a function instead of a macro.
  Mark sockets on accept().