std::counting_semaphore has the bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928,
go back to our homebrew version
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit
c884db34e049716577f7868b76685df182f82678)
#include <seastar/core/semaphore.hh>
#include <seastar/core/sharded.hh>
-#if __cplusplus > 201703L
-#include <semaphore>
-namespace crimson {
- using std::counting_semaphore;
-}
-#else
+// std::counting_semaphore is buggy in libstdc++-11
+// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928),
+// so we switch back to the homebrew version for now.
#include "semaphore.h"
-#endif
namespace crimson::os {