Kouhei Sutou created THRIFT-5842:
------------------------------------

             Summary: Mutex.h uses int64_t but cstdint isn't included
                 Key: THRIFT-5842
                 URL: https://issues.apache.org/jira/browse/THRIFT-5842
             Project: Thrift
          Issue Type: Improvement
          Components: C++ - Library
         Environment: * Debian GNU/Linux sid
* {{g++-15 (Debian 15-20241220-1) 15.0.0 20241220 (experimental) [master 
r15-6385-g92216cbc59b]}}

            Reporter: Kouhei Sutou


{{Mutex.h}} uses {{int64_t}} but doesn't include {{cstdint}}. So the following 
error is happen with GCC 15. (Note that GCC 15 isn't released yet.)

{noformat}
[80/359] Building CXX object 
lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o
FAILED: 
lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o 
/bin/g++-15 -DBOOST_ALL_DYN_LINK -DBOOST_TEST_DYN_LINK -DTHRIFT_STATIC_DEFINE 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/kou/work/cpp/thrift.kou.build/lib/cpp 
-I/home/kou/work/cpp/thrift.kou/lib/cpp -I/home/kou/work/cpp/thrift.kou.build 
-I/home/kou/work/cpp/thrift.kou/lib/cpp/src -g -std=c++11 -MD -MT 
lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -MF 
lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o.d -o 
lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -c 
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp
In file included from 
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TServerSocket.h:25,
                 from 
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.h:23,
                 from 
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp:21:
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:47:26: 
error: ‘int64_t’ has not been declared
   47 |   virtual bool timedlock(int64_t milliseconds) const;
      |                          ^~~~~~~
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:25:1: 
note: ‘int64_t’ is defined in header ‘<cstdint>’; this is probably fixable by 
adding ‘#include <cstdint>’
   24 | #include <thrift/TNonCopyable.h>
  +++ |+#include <cstdint>
   25 | 
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: 
error: ‘int64_t’ has not been declared
   60 |   Guard(const Mutex& value, int64_t timeout = 0) : mutex_(&value) {
      |                             ^~~~~~~
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: 
note: ‘int64_t’ is defined in header ‘<cstdint>’; this is probably fixable by 
adding ‘#include <cstdint>’
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to