[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compile error on OS X 10.13
From: |
Jeffrey Walton |
Subject: |
Compile error on OS X 10.13 |
Date: |
Wed, 18 Nov 2020 22:25:06 -0500 |
Hi Everyone,
I'm working on OS X 10.13. I'm encountering a compile failure for
libattr 2.4.48.
It looks like OS X provides man pages for functions like flistxattr:
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/flistxattr.2.html.
Jeff
libtool: compile: clang -DHAVE_CONFIG_H -I. -I./include -I./include
-I./include -DLOCALEDIR=\"/Users/jwalton/tmp/ok2delete/share/locale\"
-DSYSCONFDIR=\"/Users/jwalton/tmp/ok2delete/etc\"
-I/Users/jwalton/tmp/ok2delete/include -DNDEBUG -DNDEBUG -include
libattr/libattr.h -g2 -O2 -march=native -fPIC -pthread -MT
libattr/libattr_la-libattr.lo -MD -MP -MF
libattr/.deps/libattr_la-libattr.Tpo -c libattr/libattr.c -fno-common
-DPIC -o libattr/.libs/libattr_la-libattr.o
libattr/attr_copy_fd.c:76:36: error: too few arguments to function call,
expected 4, have 3
size = flistxattr (src_fd, NULL, 0);
~~~~~~~~~~ ^
/usr/include/sys/xattr.h:75:1: note: 'flistxattr' declared here
ssize_t flistxattr(int fd, char *namebuff, size_t size, int options);
^
libattr/attr_copy_fd.c:92:40: error: too few arguments to function call,
expected 4, have 3
size = flistxattr (src_fd, names, size);
~~~~~~~~~~ ^
/usr/include/sys/xattr.h:75:1: note: 'flistxattr' declared here
ssize_t flistxattr(int fd, char *namebuff, size_t size, int options);
^
libattr/attr_copy_fd.c:111:42: error: too few arguments to function call,
expected 6, have 4
size = fgetxattr (src_fd, name, NULL, 0);
~~~~~~~~~ ^
/usr/include/sys/xattr.h:63:1: note: 'fgetxattr' declared here
ssize_t fgetxattr(int fd, const char *name, void *value, size_t size, u_...
^
libattr/attr_copy_fd.c:128:46: error: too few arguments to function call,
expected 6, have 4
size = fgetxattr (src_fd, name, value, size);
~~~~~~~~~ ^
/usr/include/sys/xattr.h:63:1: note: 'fgetxattr' declared here
ssize_t fgetxattr(int fd, const char *name, void *value, size_t size, u_...
^
libattr/attr_copy_fd.c:139:46: error: too few arguments to function call,
expected 6, have 5
if (fsetxattr (dst_fd, name, value, size, 0) != 0) {
~~~~~~~~~ ^
/usr/include/sys/xattr.h:67:1: note: 'fsetxattr' declared here
int fsetxattr(int fd, const char *name, const void *value, size_t size, ...
^
5 errors generated.
libattr/attr_copy_file.c:74:9: warning: implicit declaration of function
'llistxattr' is invalid in C99 [-Wimplicit-function-declaration]
size = llistxattr (src_path, NULL, 0);
^
libattr/attr_copy_file.c:109:10: warning: implicit declaration of function
'lgetxattr' is invalid in C99 [-Wimplicit-function-declaration]
size = lgetxattr (src_path, name, NULL, 0);
^
libattr/attr_copy_file.c:137:7: warning: implicit declaration of function
'lsetxattr' is invalid in C99 [-Wimplicit-function-declaration]
if (lsetxattr (dst_path, name, value, size, 0) != 0) {
^
libattr/libattr.c:114:29: error: use of undeclared identifier 'lgetxattr'
flags & ATTR_DONTFOLLOW ? lgetxattr : getxattr;
^
libattr/libattr.c:150:50: error: too few arguments to function call, expected 6,
have 4
c = fgetxattr(fd, name, attrvalue, *valuelength);
~~~~~~~~~ ^
/usr/include/sys/xattr.h:63:1: note: 'fgetxattr' declared here
ssize_t fgetxattr(int fd, const char *name, void *value, size_t size, u_...
^
libattr/libattr.c:156:41: error: too few arguments to function call, expected 6,
have 4
int size = fgetxattr(fd, name, NULL, 0);
~~~~~~~~~ ^
/usr/include/sys/xattr.h:63:1: note: 'fgetxattr' declared here
ssize_t fgetxattr(int fd, const char *name, void *value, size_t size, u_...
^
libattr/libattr.c:186:8: warning: implicit declaration of function 'lsetxattr'
is invalid in C99 [-Wimplicit-function-declaration]
c = lsetxattr(path, name, buffer, valuelength, lflags);
^
libattr/libattr.c:188:56: error: too few arguments to function call, expected 6,
have 5
c = setxattr(path, name, buffer, valuelength, lflags);
~~~~~~~~ ^
/usr/include/sys/xattr.h:65:1: note: 'setxattr' declared here
int setxattr(const char *path, const char *name, const void *value, size...
^
libattr/libattr.c:212:54: error: too few arguments to function call, expected 6,
have 5
c = fsetxattr(fd, name, buffer, valuelength, lflags);
~~~~~~~~~ ^
/usr/include/sys/xattr.h:67:1: note: 'fsetxattr' declared here
int fsetxattr(int fd, const char *name, const void *value, size_t size, ...
^
libattr/libattr.c:230:8: warning: implicit declaration of function
'lremovexattr' is invalid in C99 [-Wimplicit-function-declaration]
c = lremovexattr(path, name);
^
libtool: compile: clang -DHAVE_CONFIG_H -I. -I./include -I./include
-I./include -DLOCALEDIR=\"/Users/jwalton/tmp/ok2delete/share/locale\"
-DSYSCONFDIR=\"/Users/jwalton/tmp/ok2delete/etc\"
-I/Users/jwalton/tmp/ok2delete/include -DNDEBUG -DNDEBUG -include
libattr/libattr.h -g2 -O2 -march=native -fPIC -pthread -MT
libattr/libattr_la-attr_copy_check.lo -MD -MP -MF
libattr/.deps/libattr_la-attr_copy_check.Tpo -c
libattr/attr_copy_check.c -o libattr/libattr_la-attr_copy_check.o
>/dev/null 2>&1
libattr/libattr.c:232:30: error: too few arguments to function call, expected 3,
have 2
c = removexattr(path, name);
~~~~~~~~~~~ ^
/usr/include/sys/xattr.h:69:1: note: 'removexattr' declared here
int removexattr(const char *path, const char *name, int options);
^
make[1]: *** [libattr/libattr_la-attr_copy_fd.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libattr/libattr.c:249:28: error: too few arguments to function call, expected 3,
have 2
c = fremovexattr(fd, name);
~~~~~~~~~~~~ ^
/usr/include/sys/xattr.h:71:1: note: 'fremovexattr' declared here
int fremovexattr(int fd, const char *name, int options);
^
libattr/libattr.c:304:12: warning: implicit declaration of function 'llistxattr'
is invalid in C99 [-Wimplicit-function-declaration]
length = llistxattr(path, lbuf, sizeof(lbuf));
^
libattr/libattr.c:306:46: error: too few arguments to function call, expected 4,
have 3
length = listxattr(path, lbuf, sizeof(lbuf));
~~~~~~~~~ ^
/usr/include/sys/xattr.h:73:1: note: 'listxattr' declared here
ssize_t listxattr(const char *path, char *namebuff, size_t size, int options);
^
libattr/libattr.c:317:14: warning: implicit declaration of function 'lgetxattr'
is invalid in C99 [-Wimplicit-function-declaration]
vlength = lgetxattr(path, l, NULL, 0);
^
libattr/libattr.c:319:40: error: too few arguments to function call, expected 6,
have 4
vlength = getxattr(path, l, NULL, 0);
~~~~~~~~ ^
/usr/include/sys/xattr.h:61:1: note: 'getxattr' declared here
ssize_t getxattr(const char *path, const char *name, void *value, size_...
^
libattr/libattr.c:353:44: error: too few arguments to function call, expected 4,
have 3
length = flistxattr(fd, lbuf, sizeof(lbuf));
~~~~~~~~~~ ^
/usr/include/sys/xattr.h:75:1: note: 'flistxattr' declared here
ssize_t flistxattr(int fd, char *namebuff, size_t size, int options);
^
libattr/libattr.c:363:37: error: too few arguments to function call, expected 6,
have 4
vlength = fgetxattr(fd, l, NULL, 0);
~~~~~~~~~ ^
/usr/include/sys/xattr.h:63:1: note: 'fgetxattr' declared here
ssize_t fgetxattr(int fd, const char *name, void *value, size_t size, u_...
^
4 warnings and 11 errors generated.
- Compile error on OS X 10.13,
Jeffrey Walton <=