Skip to content

Commit

Permalink
workaround on missing _POSIX_SEM_VALUE_MAX with gcc11/12 when using c…
Browse files Browse the repository at this point in the history
…lang
  • Loading branch information
wlav committed Nov 1, 2023
1 parent a8dc8dd commit ab9033a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cling/src/core/thread/inc/ROOT/TReentrantRWLock.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
#include "ROOT/TSpinMutex.hxx"
#include "TVirtualRWMutex.h"

#if defined(__linux__) && defined(__GNUC__)
#include <climits>
#ifndef _POSIX_SEM_VALUE_MAX
// workaround for cases where gcc's limits.h is pulled in by clang's include_next,
// as opposed to the system limits.h that defines the posix limits
#if __has_include (<syslimits.h>)
#include <syslimits.h>
#endif
#endif
#endif

#include <atomic>
#include <condition_variable>
#include <thread>
Expand Down

0 comments on commit ab9033a

Please sign in to comment.