From: Björn Ketelaars Date: Mon, 11 Feb 2019 23:03:11 +0000 (+0100) Subject: Detect symbolic links on OpenBSD X-Git-Tag: v1.4.0^2~38^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e4dc2e5f1964e453942210fb584135de17d7a8c;p=thirdparty%2Fzstd.git Detect symbolic links on OpenBSD 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. --- diff --git a/programs/util.c b/programs/util.c index 49eea148e..0001cc3d8 100644 --- a/programs/util.c +++ b/programs/util.c @@ -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)) \