]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
xattr: skip unittest on unsupported platforms
authorDaniel Gustafsson <daniel@yesql.se>
Thu, 11 Apr 2019 07:22:22 +0000 (09:22 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Thu, 11 Apr 2019 07:22:22 +0000 (09:22 +0200)
The stripcredentials unittest fails to compile on platforms without
xattr support, for example the Solaris member in the buildfarm which
fails with the following:

  CC unit1621-unit1621.o
  CC ../libtest/unit1621-first.o
  CCLD unit1621
  Undefined first referenced
  symbol in file
  stripcredentials unit1621-unit1621.o
  goto problem 2
  ld: fatal: symbol referencing errors. No output written to .libs/unit1621
  collect2: error: ld returned 1 exit status
  gmake[2]: *** [Makefile:996: unit1621] Error 1

Fix by excluding the test on such platforms by using the reverse
logic from where stripcredentials() is defined.

Closes #3759
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
tests/unit/unit1621.c

index 6e07b6ea9975a28b0dd2dec66e7fae2d2ea08354..618abedfa9821bd273e5c362f30036c96bbca1e4 100644 (file)
@@ -35,7 +35,9 @@ static void unit_stop(void)
 {
 }
 
-#ifdef __MINGW32__
+#if defined(__MINGW32__)  || \
+  (!defined(HAVE_FSETXATTR) && \
+  (!defined(__FreeBSD_version) || (__FreeBSD_version < 500000)))
 UNITTEST_START
 {
   return 0;