]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Detect symbolic links on OpenBSD
authorBjörn Ketelaars <bjorn.ketelaars@hydroxide.nl>
Mon, 11 Feb 2019 23:03:11 +0000 (00:03 +0100)
committerBjörn Ketelaars <bjorn.ketelaars@hydroxide.nl>
Tue, 12 Feb 2019 00:56:05 +0000 (01:56 +0100)
In #1520 it is described that FreeBSD doesn't detect symbolic links. The
same is true for OpenBSD. This diff fixes this issue for OpenBSD. I'm
guessing that something similar works for FreeBSD as well. However, I'm
unable to test this.

programs/util.c

index 49eea148ec1834748aa243bf1f368e299753860d..0001cc3d83ed1d9b2b1faea7844302393447d3b0 100644 (file)
@@ -92,6 +92,7 @@ U32 UTIL_isLink(const char* infilename)
 /* macro guards, as defined in : https://linux.die.net/man/2/lstat */
 #ifndef __STRICT_ANSI__
 #if defined(_BSD_SOURCE) \
+    || defined(__OpenBSD__) \
     || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) \
     || (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) \
     || (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) \