Bug 85563 - build failure: implicit declaration of _dbus_fd_set_close_on_exec
Summary: build failure: implicit declaration of _dbus_fd_set_close_on_exec
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other NetBSD
: medium normal
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-28 15:31 UTC by Patrick Welche
Modified: 2014-10-28 17:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
include relevant header file (693 bytes, patch)
2014-10-28 15:35 UTC, Patrick Welche
Details | Splinter Review

Description Patrick Welche 2014-10-28 15:31:04 UTC
Building today's git-head 66b15d177 I get:


../../bus/dir-watch-kqueue.c: In function 'bus_set_watched_dirs':
../../bus/dir-watch-kqueue.c:292:15: error: implicit declaration of function '_dbus_fd_set_close_on_exec' [-Werror=implicit-function-declaration]
               _dbus_fd_set_close_on_exec (fd);
               ^
../../bus/dir-watch-kqueue.c:292:15: error: nested extern declaration of '_dbus_fd_set_close_on_exec' [-Werror=nested-externs]

The trivial patch about to be attached assumes that using kqueue implies running on unix.
Comment 1 Patrick Welche 2014-10-28 15:35:21 UTC
Created attachment 108575 [details] [review]
include relevant header file
Comment 2 Alban Crequy 2014-10-28 16:21:10 UTC
In other places where <dbus/dbus-sysdeps-unix.h> is included, it is surrounded by either #ifdef HAVE_UNIX_FD_PASSING or #ifdef DBUS_UNIX.

But bus/dir-watch-kqueue.c is only compiled on DBUS_BUS_ENABLE_KQUEUE, on *BSD/MacOSX, so it should be fine?
Comment 3 Patrick Welche 2014-10-28 16:23:39 UTC
That's what I thought, hence the assumption...
Comment 4 Simon McVittie 2014-10-28 17:09:50 UTC
(In reply to Alban Crequy from comment #2)
> But bus/dir-watch-kqueue.c is only compiled on DBUS_BUS_ENABLE_KQUEUE, on
> *BSD/MacOSX, so it should be fine?

I think that reasoning is fine.
Comment 5 Simon McVittie 2014-10-28 17:20:30 UTC
Applied your patch for dbus 1.9.2, thanks.

I believe this regressed in the 1.9 branch so it is not needed in 1.8.
Comment 6 Simon McVittie 2014-10-28 17:21:03 UTC
(It regressed while fixing Bug #39610)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.