apache / brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
https://brpc.apache.org
Apache License 2.0
16.56k stars 3.98k forks source link

Add missing #include <cstdint> #2800

Closed Menci closed 3 weeks ago

Menci commented 3 weeks ago

What problem does this PR solve?

It doesn't compile with GCC 13.

What is changed and the side effects?

Changed:

Adding missing #include <cstdint> for int64_t usage.

Side effects:


Check List:

wasphin commented 3 weeks ago

maybe add in the header file?

Menci commented 3 weeks ago

@wasphin

A bit strange. brpc.h is not using <cstdint>, as it doesn't expose this API ConvertGrpcTimeoutToUS, while the caller in http_rpc_protocol.cpp declared this API manually:

https://github.com/apache/brpc/blob/dae4b4df23fe7fff3c62ef4eb8088540d9cc1789/src/brpc/policy/http_rpc_protocol.cpp#L58-L59

wwbmmm commented 3 weeks ago

LGTM