busybox
The function copySubFile is not defined when !BB_AR.
Bug fixed by commit ebee301c8b0
| Type | UndefinedSymbol |
| Config | BB_CP_MV && !BB_AR (2nd degree) |
| Fix-in | mapping |
| Location | root/ |
#include<stdio.h>
#include<stdlib.h>
#if defined (BB_AR)
void copySubFile(int src, int dst)
{
printf("Copy readSize bytes between two file descriptors");
}
#endif
#if defined (BB_CP_MV)
void copyFile()
{
int src, dst;
src = rand() % 100;
dst = rand() % 200;
copySubFile(src, dst);
}
#endif
int main(int argc, char **argv)
{
#if defined (BB_CP_MV)
copyFile();
#endif
return 0;
}
diff --git a/simple/ebee301.c b/simple/ebee301.c
--- a/simple/ebee301.c
+++ b/simple/ebee301.c
@@ -2,7 +2,7 @@
#include<stdio.h>
#include<stdlib.h>
-#if defined (BB_AR)
+#if defined (BB_AR) || defined (BB_CP_MV)
void copySubFile(int src, int dst)
{
printf("Copy readSize bytes between two file descriptors");
. call coreutils/mv.c:76:copyFile() .. [BB_CP_MV] root/utility.c:396:copySubFile(rfd, wfd, srcStatBuf.st_size); ... [BB_AR] call root/utility.c:271:copySubFile()