mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
00d1e6c75e
Looking into /usr/include/stdlib.h, there's a `devname()` function defined under some #ifdef's which conflicts with the `static char *devname` definition in `src/mkwrggimg.c`. Defining `_ANSI_SOURCE` in the `src/mkwrggimg.c` file, omits that part of the header. Another more intrusive approach is to rename `devname` to something like `g_devname` in `src/mkwrggimg.c`. But I think the `_ANSI_SOURCE` define should be enough. Compilation error is: src/mkwrggimg.c:64:14: error: redefinition of 'devname' as different kind of symbol static char *devname; ^ /usr/include/stdlib.h:286:7: note: previous definition is here char *devname(dev_t, mode_t); ^ src/mkwrggimg.c:147:12: error: non-object type 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') is not assignable devname = optarg; ~~~~~~~ ^ src/mkwrggimg.c:192:6: warning: comparison of function 'devname' equal to a null pointer is always false [-Wtautological-pointer-compare] if (devname == NULL) { ^~~~~~~ ~~~~ src/mkwrggimg.c:192:6: note: prefix with the address-of operator to silence this warning if (devname == NULL) { ^ & src/mkwrggimg.c:251:27: warning: incompatible pointer types passing 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') to parameter of type 'const char *' [-Wincompatible-pointer-types] strncpy(header->devname, devname, sizeof(header->devname)); ^~~~~~~ /usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy' __builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest)) Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> [Jo-Philipp Wich: slightly reformat commit message] Signed-off-by: Jo-Philipp Wich <jo@mein.io> |
||
---|---|---|
.. | ||
autoconf | ||
automake | ||
b43-tools | ||
bc | ||
bison | ||
ccache | ||
cloog | ||
cmake | ||
coreutils | ||
dosfstools | ||
e2fsprogs | ||
elftosb | ||
expat | ||
findutils | ||
firmware-utils | ||
flex | ||
flock | ||
genext2fs | ||
gengetopt | ||
gmp | ||
include | ||
isl | ||
kernel2minor | ||
libelf | ||
libressl | ||
libtool | ||
lzma | ||
lzma-old | ||
m4 | ||
make-ext4fs | ||
missing-macros | ||
mkimage | ||
mklibs | ||
mm-macros | ||
mpc | ||
mpfr | ||
mtd-utils | ||
mtools | ||
padjffs2 | ||
patch | ||
patch-image | ||
patchelf | ||
pkg-config | ||
ppl | ||
qemu | ||
quilt | ||
scons | ||
sdimage | ||
sed | ||
sparse | ||
squashfs | ||
squashfs4 | ||
sstrip | ||
tar | ||
upslug2 | ||
upx | ||
wrt350nv2-builder | ||
xz | ||
yaffs2 | ||
Makefile |