test644: verify --xattr (with redirect)

This commit is contained in:
Daniel Stenberg 2022-10-19 11:40:11 +02:00
parent 3ab3c16b2c
commit f5e5384ec3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 111 additions and 22 deletions

View file

@ -22,17 +22,6 @@
*
***************************************************************************/
#include "tool_setup.h"
#ifdef HAVE_FSETXATTR
# include <sys/xattr.h> /* header from libc, not from libattr */
# define USE_XATTR
#elif (defined(__FreeBSD_version) && (__FreeBSD_version > 500000)) || \
defined(__MidnightBSD_version)
# include <sys/types.h>
# include <sys/extattr.h>
# define USE_XATTR
#endif
#include "tool_xattr.h"
#include "memdebug.h" /* keep this as LAST include */
@ -144,13 +133,4 @@ int fwrite_xattr(CURL *curl, const char *url, int fd)
}
return err;
}
#else
int fwrite_xattr(CURL *curl, const char *url, int fd)
{
(void)curl;
(void)url;
(void)fd;
return 0;
}
#endif

View file

@ -25,6 +25,21 @@
***************************************************************************/
#include "tool_setup.h"
#ifdef HAVE_FSETXATTR
# include <sys/xattr.h> /* header from libc, not from libattr */
# define USE_XATTR
#elif (defined(__FreeBSD_version) && (__FreeBSD_version > 500000)) || \
defined(__MidnightBSD_version)
# include <sys/types.h>
# include <sys/extattr.h>
# define USE_XATTR
#endif
#ifdef USE_XATTR
int fwrite_xattr(CURL *curl, const char *url, int fd);
#else
#define fwrite_xattr(a,b,c) 0
#endif
#endif /* HEADER_CURL_TOOL_XATTR_H */