view lib/net.c @ 1565:a3500bd8b322 draft

Fixups for the android/bionic build probes patch. The CFG_* symbols are always defined so if() can use them as compile-time constants, so don't if defined() them. Doing USE_BLAH() around variable definitions opens up the same potential for config-dependent build breaks as #ifdefs do, just make the whole command depend on the symbol for now, factor out the utmpx infrastructure later. The PTY probe was always failing because it used NULL without #including the header that defines it. Substitute 0 instead.
author Rob Landley <rob@landley.net>
date Wed, 19 Nov 2014 16:55:12 -0600
parents e11684e3bbc5
children
line wrap: on
line source

#include "toys.h"

int xsocket(int domain, int type, int protocol)
{
  int fd = socket(domain, type, protocol);

  if (fd < 0) perror_exit("socket %x %x", type, protocol);
  return fd;
}