From 8554d74a0d5807bf9f6a2d9be3b63416164c44a2 Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Mon, 8 Jan 2024 18:21:56 +0100 Subject: [PATCH] fix check of existense of closefrom function --- src/webfuse/util/authenticator.cpp | 3 ++- test-src/integration/webfuse/test/process.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webfuse/util/authenticator.cpp b/src/webfuse/util/authenticator.cpp index 990aab9..7cf7e15 100644 --- a/src/webfuse/util/authenticator.cpp +++ b/src/webfuse/util/authenticator.cpp @@ -4,7 +4,8 @@ #include #include -#ifndef closefrom +// closefrom was introduced in glibc 2.34 +#if __GLIBC__ <= 2 && __GLIBC_MINOR__ < 34 namespace { diff --git a/test-src/integration/webfuse/test/process.cpp b/test-src/integration/webfuse/test/process.cpp index 86e657e..b4964ab 100644 --- a/test-src/integration/webfuse/test/process.cpp +++ b/test-src/integration/webfuse/test/process.cpp @@ -9,7 +9,8 @@ #include -#ifndef closefrom +// closefrom was introduced in glibc 2.34 +#if __GLIBC__ <= 2 && __GLIBC_MINOR__ < 34 namespace {