[systemd-bugs] [Bug 63423] New: sd-daemon.c: include POSIX fcntl.h rather than OS-specific sys/fcntl.h
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Apr 11 06:21:11 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=63423
Priority: medium
Bug ID: 63423
CC: matt.fischer at garmin.com
Assignee: systemd-bugs at lists.freedesktop.org
Summary: sd-daemon.c: include POSIX fcntl.h rather than
OS-specific sys/fcntl.h
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: simon.mcvittie at collabora.co.uk
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: systemd
On Bug #61176, Matt Fischer points out that QNX does not have the
popular-but-non-standard header <sys/fcntl.h>, only the "official" POSIX
<fcntl.h>. This broke libdbus builds in the embedded copy of sd-daemon.c (which
we should probably get rid of, but that's not the point right now). Matt said
he'd open a systemd bug, but I couldn't find one, so I'm opening this.
sd-daemon.c currently does this:
#ifdef __BIONIC__
# include <linux/fcntl.h>
#else
# include <sys/fcntl.h>
#endif
but if we used <fcntl.h> we shouldn't need the ugly conditional, unless there's
some special reason why you prefer the OS-specific version - more contents or
something?
libdbus already uses #include <fcntl.h> in its other Unix-specific files, so
this is at least as portable as D-Bus - in particular, it compiles on Android.
Given the sort of esoteric platforms I've heard about people putting D-Bus on,
I think we can safely assume that <fcntl.h> is portable.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130411/946b7035/attachment.html>
More information about the systemd-bugs
mailing list