SIGN IN SIGN UP

qa/cephfs: iogen: fix compilation errors on modern distros (Rocky 10, CentOS 9, Ubuntu Noble)

Modern GLIBC (2.36+) and GCC toolchains strictly enforce type signatures
and function declarations, causing iogen 3.1p0 compilation to fail.

The original Makefile used command-line macro overrides (-Dstrlcpy=strncpy
and -Darc4random=rand). On newer distributions where these functions are
either natively declared in system headers or strictly type-checked, this
led to type-mismatch errors and macro collisions.

Fix the build issue across distributions by:
1. Stripping forced -Dstrlcpy and -Darc4random flags from the Makefile.
2. Inlining custom `my_arc4random` and `my_strlcpy` implementations into
   src/iogen.c with standard C signatures (uint32_t/size_t).
3. Renaming internal function calls to avoid naming collisions with
   system-provided GLIBC header declarations.

Fixes: http://tracker.ceph.com/issues/76501
Signed-off-by: Venky Shankar <vshankar@redhat.com>
V
Venky Shankar committed
5a9405ce4ce5e596695d1da6867f633982334da2
Parent: 9b761f0