bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] build fails on OS X


From: Mansour Moufid
Subject: [Bug-tar] build fails on OS X
Date: Sat, 16 Jan 2016 20:03:32 -0500

Hello,

I'm trying to build tar version 1.28 on OS X.  (1.27 builds fine.)

It fails with a few errors like this:

      CC       xattr-at.o
    In file included from xattr-at.c:40:
    ../gnu/at-func.c:77:12: error: too few arguments to function call,
          expected 6, have 5
        return CALL_FUNC (file);
               ^~~~~~~~~~~~~~~~
    ../gnu/at-func.c:46:60: note: expanded from macro 'CALL_FUNC'
    # define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS))
                           ~~~~~~~~~~                          ^

    /.../MacOSX10.9.sdk/usr/include/sys/xattr.h:65:1: note:
          'setxattr' declared here
    int setxattr(const char *path, const char *name...
    ^


The declaration of setxattr on OS X is: [1]

    #include <sys/xattr.h>
    int setxattr(const char *path, const char *name,
        const void *value, size_t size,
        u_int32_t position, int options);

On Linux: [2]

    #include <sys/types.h>
    #include <attr/xattr.h>
    int setxattr(const char *path, const char *name,
        const void *value, size_t size,
        int flags);

Note the extra parameter named position in the declaration on OS X.
So the functions defined in lib/xattr-at.c (with AT_FUNC_NAME,
AT_FUNC_F1, AT_FUNC_POST_FILE_PARAM_DECLS and so on) don't match.

The build system currently checks for the presence of the headers
but assumes these functions have the same declarations as on Linux.

The functions affected are setxattr, getxattr, and listxattr.

Note that the build fails even when configured with the option
--without-xattrs.


Mansour


[1] 
<https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/setxattr.2.html>
[2] <http://linux.die.net/man/2/setxattr>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]