You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/tools
Alexandru Ardelean 00d1e6c75e firmware-utils: fix compilation on MacOS X
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>
8 years ago
..
autoconf tools/autoconf: fix compile on musl hosts 9 years ago
automake automake: portability fixes 9 years ago
b43-tools source: Switch to xz for packages and tools where possible 8 years ago
bc bc: add download mirrors 9 years ago
bison tools/bison: update to 3.0.4 9 years ago
ccache ccache: disable assembler support, it breaks kernel initramfs images 8 years ago
cloog cloog: update to 0.18.1 11 years ago
cmake tools/cmake: update to 3.6.1 8 years ago
coreutils tools: build GNU date from coreutils on non-Linux systems 8 years ago
dosfstools dosfstools: fix autotools dependency 8 years ago
e2fsprogs tools/e2fsprogs: Update to 1.43.3 8 years ago
elftosb tools: remove static linking support 9 years ago
expat tools/expat: Update to 2.2.0 8 years ago
findutils tools/findutils: Update to 4.6.0 8 years ago
firmware-utils firmware-utils: fix compilation on MacOS X 8 years ago
flex tools/flex: update to 2.6.1 8 years ago
flock tools: flock: add NFSv4 compatibility 8 years ago
genext2fs tools: bring back genext2fs for apm821xx 8 years ago
gengetopt tools: gengetopt: Disable doc and tests builds 9 years ago
gmp tools/gmp: update to 6.1.1 8 years ago
include tools: host/include/getline.h: fix FreeBSD 8.0+ support 9 years ago
isl tools/isl: bump to 0.17.1 8 years ago
kernel2minor tools: add kernel2minor utility for Mikrotik devices 8 years ago
libelf
libressl tools/libressl: Update to 2.5.0 and use mirrors 8 years ago
libtool source: Switch to xz for packages and tools where possible 8 years ago
lzma tools: lzma: reduce copyright noise 8 years ago
lzma-old
m4 tools: remove static linking support 9 years ago
make-ext4fs source: Switch to xz for packages and tools where possible 8 years ago
missing-macros tools: remove a bunch of unused automake macros 9 years ago
mkimage tools: mkimage: sync include/linux/compiler*.h with u-boot master 8 years ago
mklibs tools: remove static linking support 9 years ago
mm-macros mm-macros: update to 0.9.10 8 years ago
mpc tools/mpc: update to 1.0.3 9 years ago
mpfr tools/mpfr: Update to 3.1.5 and change to xz tarball 8 years ago
mtd-utils source: Switch to xz for packages and tools where possible 8 years ago
mtools mtools: build and install mmd 9 years ago
padjffs2 tools: padjffs2: add option to output padding data to stdout 8 years ago
patch tools/patch: enable parallel build 9 years ago
patch-image tools: patch-image: Added optional size option 8 years ago
patchelf tools/patchelf: Update to 0.9 and remove patch 8 years ago
pkg-config tools: pkg-config: fix build with GCC 6 8 years ago
ppl tools/ppl: Update to 1.2 8 years ago
qemu tools: remove static linking support 9 years ago
quilt tools/quilt: fix build error during kernel_menuconfig on a cleaned env 9 years ago
scons tools/scons: update to 2.5.0 8 years ago
sdimage source: Switch to xz for packages and tools where possible 8 years ago
sed tools/sed: fix compile on musl hosts 9 years ago
sparse sparse: update to support llvm 3.5.0 8 years ago
squashfs tools/squashfs: refresh patches 9 years ago
squashfs4 squashfs4: use upstream xz compression header format 8 years ago
sstrip tools: remove static linking support 9 years ago
tar tools: tar: use .bz2 archive 8 years ago
upslug2 source: Switch to xz for packages and tools where possible 8 years ago
upx tools/upx: Update to 3.91 and use new tarball url 8 years ago
wrt350nv2-builder tools: remove static linking support 9 years ago
xz tools: xz: force building without ccache 8 years ago
yaffs2 source: Switch to xz for packages and tools where possible 8 years ago
Makefile tools: add missing dependency for dosfstools 8 years ago