]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fileio: Disable BACKTRACE under uClibc 1613/head
authorRosen Penev <rosenp@gmail.com>
Mon, 6 May 2019 22:02:47 +0000 (15:02 -0700)
committerGitHub <noreply@github.com>
Mon, 6 May 2019 22:02:47 +0000 (15:02 -0700)
uClibc does not support BACKTRACE. It also defines __GLIBC__ and minor as both 2.
This fixes compilation under such a setup.

programs/fileio.c

index 6a8ec3a1c10160a2eaca613951db82fbfd0ee9d4..dc8479ab061fc4282522b6dde911fa139dfe085f 100644 (file)
@@ -175,7 +175,7 @@ static void clearHandler(void)
 
 #if !defined(BACKTRACE_ENABLE)
 /* automatic detector : backtrace enabled by default on linux+glibc and osx */
-#  if (defined(__linux__) && defined(__GLIBC__)) \
+#  if (defined(__linux__) && (defined(__GLIBC__) && !defined(__UCLIBC__))) \
      || (defined(__APPLE__) && defined(__MACH__))
 #    define BACKTRACE_ENABLE 1
 #  else