Skip to content

Instantly share code, notes, and snippets.

@ncopa
Created July 18, 2014 08:07
Show Gist options
  • Save ncopa/56d5c7027c4933c3ead7 to your computer and use it in GitHub Desktop.
Save ncopa/56d5c7027c4933c3ead7 to your computer and use it in GitHub Desktop.
static gboolean
wtmp_helper_start (void)
{
#if defined(UTXDB_LOG)
if (setutxdb (UTXDB_LOG, NULL) != 0) {
return FALSE;
}
#elif defined(WTMPX_FILENAME)
if (utmpxname (WTMPX_FILENAME) != 0) {
return FALSE;
}
setutxent ();
#else
#error You have utmpx.h, but no known way to use it for wtmp entries
#endif
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment