From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] Allow usage of <sys/xattr.h> header.
Date: Mon, 3 Oct 2016 14:19:50 +0200 [thread overview]
Message-ID: <20161003121950.GC7583@rei.suse.cz> (raw)
In-Reply-To: <1475063587-24552-1-git-send-email-dejan.jovicevic@rt-rk.com>
Hi!
> <sys/xattr.h> is nowdays much more common than <attr/xattr.h>. Man
> pages also list <sys/xattr.h> as needed header for syscalls getxattr,
> setxattr, lgetxattr, llistxattr and removexattr.
Well it's not about being common, these headers are part of different
libraries. The sys/xattr.h is glibc one while the attr/xattr.h is part
of attr library[1].
[1] https://savannah.nongnu.org/projects/attr
And the only difference between these two headers is that the glibc one
does not define ENOATTR.
> Currently, related ltp tests are disabled if <attr/xattr.h> is not
> found during configuration process. This patch allows compilation
> if <attr/xattr.h> is not present, but <sys/xattr.h> is present. If
> <sys/xattr.h> is not present, configuration and compilation will
> remain unchanged.
Hmm, I wonder why we don't default to the glibc header since it's
available since glibc 2.3.4 (that is more than ten years old).
And since we do not actually use -llibattr we link agains the glibc
anyway. So I guess that the current code is buggy and that we should
use the glibc header instead.
So what about to switing to sys/xattr.h instead of cluttering the code
with more ifdefs?
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-10-03 12:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 11:53 [LTP] [PATCH] Allow usage of <sys/xattr.h> header Dejan Jovicevic
2016-10-03 12:19 ` Cyril Hrubis [this message]
2016-10-03 12:26 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161003121950.GC7583@rei.suse.cz \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.