You are not logged in.
These are the filesystem extended attributes functions. Consider:
test.c
#include <sys/types.h>
#include <attr/attributes.h>
int main(int argc, char* argv[])
{
char value[255];
int len = sizeof(value);
attr_get("foo", "bar", value, &len, 0);
return 0;
}
Compiling fails:
$ gcc test.c
/tmp/ccXHfmjE.o: In function `main':
test.c:(.text+0x5a): undefined reference to `attr_get'
collect2: error: ld returned 1 exit status
What gives? I can't find any library that might contain the functions under /lib /usr/lib other than libc and looking in the attr/attributes.h they don't seem to be inline either. What gives?
Last edited by oz (2018-06-14 22:36:46)
Offline
To answer my own question it's "libattr" which didn't exist (compiling 32-bit on 64-bit platform). lib32-attr has it.
Offline
For future reference, if the problem wasn't due to needing the 32-bit library, libattr certainly does exist:
$ pac -Qo /usr/include/attr/attributes.h
/usr/include/attr/attributes.h is owned by attr 2.4.47-3
$ pac -Qlq attr | grep so$
/usr/lib/libattr.so
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Handy, thanks!
Offline