rocksdb/port
Changyu Bi 496eebaee8 Fix compilation error using CLANG (#13864)
Summary:
fix the following error showing up in continuous tests:
```
Makefile:186: Warning: Compiling in debug mode. Don't use the resulting binary in production
port/mmap.cc:46:15: error: first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'rocksdb::MemMapping' [-Werror,-Wnontrivial-memcall]
   46 |   std::memcpy(this, &other, sizeof(*this));
      |               ^
port/mmap.cc:46:15: note: explicitly cast the pointer to silence this warning
   46 |   std::memcpy(this, &other, sizeof(*this));
      |               ^
      |               (void*)
1 error generated.
make: *** [Makefile:2580: port/mmap.o] Error 1
make: *** Waiting for unfinished jobs....
```

Pull Request resolved: https://github.com/facebook/rocksdb/pull/13864

Test Plan: `make USE_CLANG=1 j=150 check` with 13f054febb/build_tools/build_detect_platform (L61-L70) commented out.

Reviewed By: mszeszko-meta

Differential Revision: D80033441

Pulled By: cbi42

fbshipit-source-id: b2330eea71fe28243236b75128ec6f3f1e971873
2025-08-11 15:15:26 -07:00
..
win Compressor::CompressBlock API change and refactoring/improvement (#13805) 2025-07-31 08:39:56 -07:00
jemalloc_helper.h Fix deprecated dynamic exception in infra_asic_fpga/validation/freya/bmtc/ssp/src/gcc-arm-none-eabi-9-2019-q4-major/arm-none-eabi/include/c++/9.2.1/tr1/special_function_util.h +5 2024-06-24 09:30:20 -07:00
lang.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
likely.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
malloc.h Charge block cache for cache internal usage (#5797) 2019-09-16 15:26:21 -07:00
mmap.cc Fix compilation error using CLANG (#13864) 2025-08-11 15:15:26 -07:00
mmap.h More minor HCC refactoring + typed mmap (#11670) 2023-08-07 12:20:23 -07:00
port.h Add abort check to yield hook (#13164) 2024-11-27 16:45:59 -08:00
port_dirent.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
port_example.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
port_posix.cc Port codemod changes from fbcode/rocksdb (#13714) 2025-06-20 17:56:24 -07:00
port_posix.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
README reverting disastrous MOE commit, returning to r21 2011-04-19 23:11:15 +00:00
stack_trace.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
stack_trace.h Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
sys_time.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
util_logger.h Use EnvLogger instead of PosixLogger (#10436) 2022-08-01 14:37:18 -07:00
xpress.h Change RocksDB License 2017-07-15 16:11:23 -07:00

This directory contains interfaces and implementations that isolate the
rest of the package from platform details.

Code in the rest of the package includes "port.h" from this directory.
"port.h" in turn includes a platform specific "port_<platform>.h" file
that provides the platform specific implementation.

See port_posix.h for an example of what must be provided in a platform
specific header file.