58 | buses[busnumber].driverdata = malloc(sizeof(struct _IB_DATA)); | ^~~~~~ ib.c:58:35: note: include ‘’ or provide a declaration of ‘malloc’ ib.c:97:35: error: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration] 97 | __ib->number_fb = atoi((char *) txt); | ^~~~ ib.c: In function ‘end_bus_thread’: ib.c:1005:5: error: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] 1005 | free(buses[btd->bus].driverdata); | ^~~~ ib.c:1005:5: note: include ‘’ or provide a declaration of ‘free’ ib.c:1005:5: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch] ib.c:1005:5: note: include ‘’ or provide a declaration of ‘free’ ib.c: In function ‘thr_sendrec_IB’: ib.c:1819:42: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 1819 | bus_thread_t *btd = (bus_thread_t *) malloc(sizeof(bus_thread_t)); | ^~~~~~ ib.c:1819:42: note: include ‘’ or provide a declaration of ‘malloc’ make[2]: *** [Makefile:518: ib.o] Error 1 make[2]: Leaving directory '/builddir/build/BUILD/srcpd-2.1.6/src' make[2]: *** Waiting for unfinished jobs.... make[2]: Entering directory '/builddir/build/BUILD/srcpd-2.1.6/src' gcc -D_REENTRANT -DSYSCONFDIR=\"/etc\" -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -c -o ddl_maerklin.o ddl_maerklin.c make[2]: Leaving directory '/builddir/build/BUILD/srcpd-2.1.6/src' make[2]: Entering directory '/builddir/build/BUILD/srcpd-2.1.6/src' gcc -D_REENTRANT -DSYSCONFDIR=\"/etc\" -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -c -o ddl_nmra.o ddl_nmra.c make[2]: Leaving directory '/builddir/build/BUILD/srcpd-2.1.6/src' make[2]: Entering directory '/builddir/build/BUILD/srcpd-2.1.6/src' gcc -D_REENTRANT -DSYSCONFDIR=\"/etc\" -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -c -o ddl.o ddl.c make[2]: Leaving directory '/builddir/build/BUILD/srcpd-2.1.6/src' make[1]: *** [Makefile:367: all] Error 2 make: *** [Makefile:439: all-recursive] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.rOupoV (%build) RPM build warnings: %patchN is deprecated (2 usages found), use %patch N (or %patch -P N) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.rOupoV (%build) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 600, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target riscv64 --nodeps /builddir/build/SPECS/srcpd.spec