Created attachment 50103 [details] [review]
In the file dbus/sysdeps-util-unix.c LOG_PERROR is used which is not define on solaris 10
A workaround is in the attached patch
Does Solaris have a way to achieve the same effect as LOG_PERROR? In glibc, it's documented as:
LOG_PERROR (Not in POSIX.1-2001.) Print to stderr as well.
The LOG_PERROR value for option is not specified
by POSIX.1-2001, but is available in most versions of UNIX.
If there isn't such a thing, we could either use a workaround similar to yours (and just not get output to stderr), or use both vsyslog() and vfprintf() to get output to syslog and stderr at the same time if LOG_PERROR doesn't exist.
(I'd prefer to do an autoconf check rather than #ifndef, though, because LOG_PERROR might be an enum member on some platforms.)
There is no equivalent to LOG_PERROR on Solaris.
The error is still present in 1.5.6 and it would be nice if it would be fixed.
Best regards -- Dago
Created attachment 50497 [details] [review]
[1/2] Cope with Unixes that don't have LOG_PERROR, like Solaris 10
Created attachment 50498 [details] [review]
[2/2] Add a semi-automatic test for _dbus_system_log
Review of attachment 50497 [details] [review]:
Review of attachment 50498 [details] [review]:
This patch looks fine!
g_test_trap_* is nifty: I hadn't seen it before.
Fixed in git for 1.4.16 and 1.5.8, thanks
In GIT HEAD I just noticed that when LOG_PERROR is not defined the definition in config.h is
#define HAVE_DECL_LOG_PERROR 0
which means that the check with #ifdef is always true. The attached patch changing this to #if resolves the issue.
Created attachment 77372 [details] [review]
Change #ifdef to #if
The error was just recently introduced in commit 88642f6fee46a4c6d1fde8ae221494a6b3188bd4
Re-fixed in git for 1.7.2, thanks. As far as I can see, this was a regression in master which never affected a release.