Hi Thomas, Thomas Petazzoni wrote,
Waldemar,
On Thu, 12 Nov 2015 06:13:07 +0100 (CET), wbx wrote:
commit ae04402816efe99e55e83cf086f695829bf9febc Author: Waldemar Brodkorb wbx@openadk.org Date: Sun Nov 8 20:41:42 2015 +0100
fanotify: include needed Linux definitions To support older Linux kernel f.e. 2.6.32.68 include all required definitions. Copied from musl libc fanotify.h. Reported by Thomas Petazzoni from Buildroot project.
Is this really the right approach? Bartosz proposed instead to enclose the header include in
#if defined(__NR_fanotify_init) && defined(__NR_fanotify_mark)
Since anyway the corresponding uClibc functions are not going to be defined when such definitions are not available.
I talked about this with nsz and others in #musl. The conclusion was to better not include linux headers files directly, as you include more then you need and does not has full control about the includes. The opinion is that defines for making syscalls working should be better included in the C library.
And Bartosz told us that he is fine with both methods.
best regards Waldemar