nfs-kernel-server: fix build
authorJohn Audia <redacted>
Tue, 15 Jul 2025 14:05:43 +0000 (10:05 -0400)
committerTianling Shen <redacted>
Fri, 1 Aug 2025 02:05:08 +0000 (10:05 +0800)
commitb606b58ac26918de474cd50b96bce65c355d3395
tree2d0347591f265baefdfa63bafd467b32286b0175
parent9318a696ffb782f7806b39773974ae25ce51b0d8
nfs-kernel-server: fix build

Add nls.mk and patch to avoid the build ending in an error:
In function 'write_table',
    inlined from 'write_tables' at rpc_tblout.c:73:4,
    inlined from 't_output.constprop' at rpc_main.c:841:3:
rpc_tblout.c:91:26: error: '%s' directive writing likely 1 or more bytes into a region of size between 0 and 99 [-Werror=format-overflow=]
   91 |       s_print (progvers, "%s_%s",
      |                          ^
rpc_tblout.c:91:26: note: assuming directive output of 1 byte
In function 'sprintf',
    inlined from 'write_table' at rpc_tblout.c:91:7,
    inlined from 'write_tables' at rpc_tblout.c:73:4,
    inlined from 't_output.constprop' at rpc_main.c:841:3:
/scratch/union/staging_dir/toolchain-x86_64_gcc-15.1.0_glibc/include/bits/stdio2.h:30:10: note: '__builtin___sprintf_chk' output 2 or more bytes (assuming 102) into a destination of size 100
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^
lto1: some warnings being treated as errors
make[6]: *** [/scratch/union/tmp/ccHfYNRX.mk:2: /scratch/union/tmp/ccudJcWZ.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
mold: fatal: lto-wrapper failed

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Co-developed-by: Rosen Penev <redacted>
Signed-off-by: John Audia <redacted>
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/220-fix-ld-error.patch [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT