]> git.ipfire.org Git - thirdparty/util-linux.git/commit - misc-utils/logger.c
logger: use SCM_CREDENTIALS on LINUX only
authorRuediger Meier <ruediger.meier@ga-group.nl>
Fri, 19 Feb 2016 00:44:14 +0000 (01:44 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Fri, 26 Feb 2016 02:29:41 +0000 (03:29 +0100)
commit4199e9891eb4b024792b18b21f576331d370fdc1
tree55a7dd9c1a9b083d49231af529c127b94c4a1703
parentb64dc52a53fe33286d305f5e3af4dbe4afdf6fff
logger: use SCM_CREDENTIALS on LINUX only

This is a build fix of FreeBSD and OSX. Basically we revert
the following commit for non-linux systems:
27a9eb53 "use --id as local socket credentials"

Note I could also compile it like this:

  #ifdef HAVE_SYS_UCRED_H
  # define _WANT_UCRED
  # include <sys/param.h>
  # include <sys/ucred.h>
  # define SCM_CREDENTIALS SCM_CREDS
  #endif

  [...]
  #ifdef _linux_
  cred->pid = ctl->pid;
  #endif
  [...]

... but don't know how to test whether it does what it
should.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
misc-utils/logger.c